From owner-freebsd-questions@FreeBSD.ORG Mon Mar 5 10:52:05 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 53561106564A for ; Mon, 5 Mar 2012 10:52:05 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id C26C68FC19 for ; Mon, 5 Mar 2012 10:52:04 +0000 (UTC) Received: from seedling.local (seedling.black-earth.co.uk [IPv6:2001:8b0:151:1:fa1e:dfff:feda:c0bb]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.5/8.14.5) with ESMTP id q25Aq065017182 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Mon, 5 Mar 2012 10:52:00 GMT (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: OpenDKIM Filter v2.4.3 smtp.infracaninophile.co.uk q25Aq065017182 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1330944720; bh=mmuxL2Jq00w0PfqcMmSeqVTri7/PtRQk+NWkP4qZAa0=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Cc; b=tbZV2cdEo/KYFNVnR8ZRNgTDpD5OBsNNlt/SPOjD8r8sL9TbMrX4cbpnL2jYXEBLq 7T9vnRR3bnAPRiIVzGJ2HwkTGvMTrZAALJRUiLkcqcoTdTUmETwcv+23fG0gS9ve/e bGfaOpSV7c6OCizzQUYgJEwOs45/jXL5hzmI6NZw= X-Authentication-Warning: lucid-nonsense.infracaninophile.co.uk: Host seedling.black-earth.co.uk [IPv6:2001:8b0:151:1:fa1e:dfff:feda:c0bb] claimed to be seedling.local Message-ID: <4F549AC8.4030305@infracaninophile.co.uk> Date: Mon, 05 Mar 2012 10:51:52 +0000 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <4F54919A.6050108@Haakh.de> In-Reply-To: <4F54919A.6050108@Haakh.de> X-Enigmail-Version: 1.3.5 OpenPGP: id=60AE908C Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigC290EDA2F25A9BF2298A47FF" X-Virus-Scanned: clamav-milter 0.97.3 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk Subject: Re: on purpose or forgotten ? hardcoded compiler in basesystem-makefiles X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2012 10:52:05 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigC290EDA2F25A9BF2298A47FF Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On 05/03/2012 10:12, Dr. A. Haakh wrote: > a quick search revealed following usages: Some of the instances you've found are legitimate, some are in upstream code in contributed software -- the FreeBSD build process may not even use the Makefiles concerned. But, yes on the whole, I think you're on to something that needs fixing here. > FreeBSD abaton.Haakh.de 9.0-STABLE FreeBSD 9.0-STABLE #0: Wed Feb 29 > 13:49:36 CET 2012 toor@abaton.Haakh.de:/usr/obj/usr/src/sys/ABATON = > i386 >=20 > ah@abaton:~$ find /usr/src/ -name Makefile\* -exec egrep > '^[[:blank:]]+[gc+]{2,3}[[:blank:]]+..' {} \; -print [...] > /usr/src/usr.bin/make/Makefile.dist > gcc -M $(CFLAGS) $(SRC) >> Makefile.tmp Although it doesn't seem to appear in the clang(1) man page, clang supports the -M flag: lucid-nonsense:/tmp:# clang -M hello.c hello.o: hello.c /usr/include/stdio.h /usr/include/sys/cdefs.h \ /usr/include/sys/_null.h /usr/include/sys/_types.h \ /usr/include/machine/_types.h No need for this sort of construct to be gcc specific. > /usr/src/tools/test/dtrace/Makefile > c++ -o $@ $< -lpthread Not sure about this -- the intent may be to test the default system compiler -- as of this last weekend you can install clang(1) as /usr/bin/cc in stable/9, so this isn't necessarily gcc specific. > /usr/src/tools/regression/pthread/unwind/Makefile > gcc -c -o elftls.o ${.CURDIR}/elftls.S > gcc -c -o tls-test.o ${.CURDIR}/tls-test-lib.c > gcc $(CFLAGS) -rdynamic -o ttls3 ${.CURDIR}/tls-test.c Whereas this looks like an oversight to me. > /usr/src/crypto/openssl/demos/engines/ibmca/Makefile > cc -I../../include divtest.c -o divtest ../../libcrypto.a > cc -g -I../../include bnbug.c -o bnbug ../../libcrypto.a > gcc -I../../include -g2 -ggdb -o exptest exptest.c ../../libcrypto.= a > gcc -I.. -g div.c ../../libcrypto.a /usr/src/crypto holds raw sources imported from upstream; hard-coded compiler names here is a problem the openssl project should address. > /usr/src/contrib/ncurses/Makefile.os2 > g++ -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION) > g++ -o $@ paranoia.o real.o $(LIBIBERTY) Ditto /usr/src/contrib -- raw upstream sources. > /usr/src/contrib/gcc/Makefile.in > gcc -o asyncwatch asyncwatch.c ${CFLAGS} > gcc -o devinfo devinfo.c ${CFLAGS} > gcc -o device_list device_list.c ${CFLAGS} > gcc -o rc_pingpong rc_pingpong.c pingpong.c ${CFLAGS} > gcc -o srq_pingpong srq_pingpong.c pingpong.c ${CFLAGS} =2E.. although gcc being hardwired in the gcc sources is probably intentional and quite legitimate. I suggest that you repost your question on freebsd-hackers@freebsd.org, as that will bring it to the attention of the people both interested in and capable of addressing this sort of problem. Submitting a PR wouldn't go amiss either. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matthew@infracaninophile.co.uk Kent, CT11 9PW --------------enigC290EDA2F25A9BF2298A47FF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9UmtAACgkQ8Mjk52CukIwL1ACglEAniZtfy/PLnDiW2mloP3XC hZEAn2ZVyAZKnW5DBrFYbbJTnS0INetb =q+Xb -----END PGP SIGNATURE----- --------------enigC290EDA2F25A9BF2298A47FF--