Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Nov 2014 18:50:54 -0800
From:      Dieter BSD <dieterbsd@gmail.com>
To:        freebsd-hackers@freebsd.org
Subject:   klang refuses to compile kernel
Message-ID:  <CAA3ZYrDcKKHcWB5jgCGaAuAwigwk86v0Z-%2B5yL_uUHmWWOd5pQ@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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.

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?

find /usr/src/ | xargs grep "inline-limit=8000"
didn't find anything.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAA3ZYrDcKKHcWB5jgCGaAuAwigwk86v0Z-%2B5yL_uUHmWWOd5pQ>