klang refuses to compile kernel
Dimitry Andric
dim at FreeBSD.org
Sun Nov 30 15:52:33 UTC 2014
On 30 Nov 2014, at 03:50, Dieter BSD <dieterbsd at gmail.com> wrote:
>
> 10.1 on amd64
> Attempting to compile a kernel, but klang throws up:
>
>>>> stage 3.1: making dependencies
> ...
> cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -std=c99 -g -Wall
> -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes
> -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign
> -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option
> -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq
> -I/usr/src/sys/contrib/ipfilter -I/usr/src/sys/dev/ath
> -I/usr/src/sys/dev/ath/ath_hal -I/usr/src/sys/contrib/dev/ath/ath_hal
> -I/usr/src/sys/contrib/ngatm -I/usr/src/sys/dev/twa -I/usr/src/sys/dev/cxgb
> -I/usr/src/sys/dev/cxgbe -I/usr/src/sys/contrib/libfdt -D_KERNEL
> -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -finline-limit=8000
> --param inline-unit-growth=100 --param large-function-growth=1000
> -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mcmodel=kernel
> -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables
> -ffreestanding -fstack-protector /usr/src/sys/amd64/amd64/genassym.c
> cc: error: unknown argument: '-frename-registers'
> cc: error: unknown argument: '-finline-limit=8000'
> *** Error code 1
>
> The mighty google found 7 hits, none of which are useful.
Well, Google will most likely not be able to find that clang just does
not support those options.
> Find(1) did not find gcc.
>
> The source of -frename-registers must be:
>
> /usr/src/sys/conf/kern.pre.mk
>
> .if ${COMPILER_TYPE} != "clang"
> COPTFLAGS?=-O2 -frename-registers -pipe
> .else
> COPTFLAGS?=-O2 -pipe
> .endif
>
> So it looks like make doesn't know what compiler it is using?
Maybe you are forcing COMPILER_TYPE in your build environment? Please
post your full make.conf, src.conf and other relevant configuration
files.
-Dimitry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20141130/2f6a9a24/attachment.sig>
More information about the freebsd-hackers
mailing list