Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Nov 2014 16:52:21 +0100
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Dieter BSD <dieterbsd@gmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: klang refuses to compile kernel
Message-ID:  <29EC5C12-3304-4A00-8A22-0A3DB0221122@FreeBSD.org>
In-Reply-To: <CAA3ZYrDcKKHcWB5jgCGaAuAwigwk86v0Z-%2B5yL_uUHmWWOd5pQ@mail.gmail.com>
References:  <CAA3ZYrDcKKHcWB5jgCGaAuAwigwk86v0Z-%2B5yL_uUHmWWOd5pQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_8DE02723-0B40-4504-8868-80CFA69BEE23
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

On 30 Nov 2014, at 03:50, Dieter BSD <dieterbsd@gmail.com> wrote:
>=20
> 10.1 on amd64
> Attempting to compile a kernel, but klang throws up:
>=20
>>>> stage 3.1: making dependencies
> ...
> cc  -c -O2 -frename-registers -pipe -fno-strict-aliasing -std=3Dc99 -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=3D8000=

> --param inline-unit-growth=3D100 --param large-function-growth=3D1000
> -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mcmodel=3Dkernel
> -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=3D8000'
> *** Error code 1
>=20
> 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.
>=20
> The source of -frename-registers must be:
>=20
> /usr/src/sys/conf/kern.pre.mk
>=20
> .if ${COMPILER_TYPE} !=3D "clang"
> COPTFLAGS?=3D-O2 -frename-registers -pipe
> .else
> COPTFLAGS?=3D-O2 -pipe
> .endif
>=20
> 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


--Apple-Mail=_8DE02723-0B40-4504-8868-80CFA69BEE23
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.26

iEYEARECAAYFAlR7PTgACgkQsF6jCi4glqOmdACg4ebo1+dmA2gD/Be1woK0v6P8
bRUAoK/w02+c1C/12D1BD5NmMUJ3Dcz8
=puXE
-----END PGP SIGNATURE-----

--Apple-Mail=_8DE02723-0B40-4504-8868-80CFA69BEE23--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?29EC5C12-3304-4A00-8A22-0A3DB0221122>