Summary: | Can't compile freebsd srcs (/usr/src) with clang/llvm 3.8 and option -march=haswell | ||
---|---|---|---|
Product: | Base System | Reporter: | Leo <l.andro.cs> |
Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> |
Status: | Closed Overcome By Events | ||
Severity: | Affects Only Me | CC: | allanjude, dim, emaste, ngie |
Priority: | --- | ||
Version: | 10.2-RELEASE | ||
Hardware: | Any | ||
OS: | Any |
Description
Leo
2016-01-01 18:27:36 UTC
Building 10.2 with Clang 3.8 isn't supported, but perhaps you can compile with NO_WERROR? (In reply to Ed Maste from comment #1) Hello, adding -DNO_WERROR option to make is ok, but then it stops at /usr/src/sys/boot/i386/boot2 The error is: ===> sys/boot/i386/boot2 (all) --- boot2 --- -265 bytes available *** [boot2] Error code 1 If I compile with the default clang version that comes with Freebsd 10 (3.4.1), even if I modify the CFLAGS/CXXFLAGS (-O3 -march=corei7 -fomit-frame-pointer), all goes well, but if I try to compile with clang 3.6 (/usr/ports/lang/clang36), clang 3.7 and clang 3.8 (clang-devel), then this error appears, with variable "-[X] bytes available" error message. CCing dim@ Without any further information, I'm guessing that your bsd.compiler.mk does not detect the compiler version properly, and that incorrect flags are being used to compile boot2. (The whole sys/boot area is very sensitive to the exact optimization flags, it will almost always grow too large if they aren't correct.) Can you provide a log of the commands being used to compile everything under /usr/src/sys/boot? For example, by running "make clean" in there, and then running make as usual, but redirected to a log file. I'm also interested in the COMPILER_TYPE and COMPILER_VERSION detected by your version of the build system. E.g. in /usr/src, run: make -V COMPILER_TYPE -V COMPILER_VERSION and paste the output here. Having said all that, I think you will run into multiple problems that will be pretty tricky to solve, if you continue this way. 10.2-RELEASE is completely frozen, and misses a lot of important fixes and updates which are in 10-STABLE, making the task even more difficult. Therefore, I think it is wisest to abandon this attempt. You will most likely not gain any significant performance advantage by compiling with -march=haswell, as opposed to e.g. -march=corei7. |