Clang support
Bug #658414 reported by
Stas Boukarev
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
SBCL can be built with Clang (tested with the latest version, 2.8 on linux-x86) with minor tweaks.
The attached patch changes "inline" declartion into "extern inline", otherwise clang removes such symbols from the binary. And for the build infrastructure, don't set CC to gcc unconditionally, only in case it's unset.
To build with clang it's sufficient to set CC variable to "clang" and run make.sh
Changed in sbcl: | |
status: | New → Confirmed |
importance: | Undecided → Wishlist |
Changed in sbcl: | |
status: | Confirmed → Fix Committed |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The inline change isn't correct. In traditional GCC inline semantics, "inline" does get an external symbol emitted. "extern inline" *doesn't*. In C99's inline semantics, it's exactly the opposite. So, with that change, the symbol now won't be emitted in GCC (unless compiled on recent GCCs in C99 mode).
Since this is only supposed to be inline in one file, I think it can be solved by simply changing the declaration in the header file to omit the word "inline", while leaving the definitions marked as simply "inline". That should do the right thing both in traditional GCC rules and C99 rules.
See also: http:// www.greenend. org.uk/ rjk/2003/ 03/inline. html