Compile FreeBSD kernel with gcc48
avg at FreeBSD.org
Sun Nov 11 12:07:27 UTC 2012
on 11/11/2012 12:26 Garrett Cooper said the following:
> On Sun, Nov 11, 2012 at 1:59 AM, Alie Tan <alie at affle.com> wrote:
>> Anyone have experience compiling FreeBSD kernel with gcc48
>> I have tried it but no success with this in src.conf
It would be more productive to detail "no success".
>> C= /usr/local/bin/gcc48
>> CXX= /usr/local/bin/g++48
>> CWARNFLAGS= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes
>> \-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual
>> \-Wno-pointer-sign -D__FreeBSD_cc_version=0 \-Wno-unused-function
>> -Wno-inline -Wno-format \-Wno-uninitialized -Wno-array-bounds
>> NO_WERROR= 1
>> Another question, is there any benchmark for LLVM/Clang vs gcc45, gcc46,
>> gcc47 or gcc48?
> Uh, probably won't work because of FreeBSD modifications to gcc not being
> present in upstream IIRC...
Which exact modifications do you have in mind?
I was able to compile the kernel with gcc46.
I used these settings:
CWARNFLAGS= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
-Wno-pointer-sign -D__FreeBSD_cc_version=800001 \
I guess that perhaps 'WERROR=' made the difference.
More information about the freebsd-current