From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 30 15:52:33 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6639137 for ; Sun, 30 Nov 2014 15:52:33 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 64A3A156 for ; Sun, 30 Nov 2014 15:52:32 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::15d8:6c6:e17b:d806] (unknown [IPv6:2001:7b8:3a7:0:15d8:6c6:e17b:d806]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 2A4C0B80A; Sun, 30 Nov 2014 16:52:23 +0100 (CET) Subject: Re: klang refuses to compile kernel Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_8DE02723-0B40-4504-8868-80CFA69BEE23"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5b1 From: Dimitry Andric In-Reply-To: Date: Sun, 30 Nov 2014 16:52:21 +0100 Message-Id: <29EC5C12-3304-4A00-8A22-0A3DB0221122@FreeBSD.org> References: To: Dieter BSD X-Mailer: Apple Mail (2.1993) Cc: freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Nov 2014 15:52:33 -0000 --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 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--