From owner-svn-src-head@FreeBSD.ORG Sun Jun 14 15:29:30 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3DE1B47A; Sun, 14 Jun 2015 15:29:30 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay102.isp.belgacom.be (mailrelay102.isp.belgacom.be [195.238.20.129]) by mx1.freebsd.org (Postfix) with ESMTP id 4A32235B; Sun, 14 Jun 2015 15:29:28 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=d6O4W030xngO5QkzyDOul/vmjwC4sFqcTOV5kZr+d1k= c=1 sm=2 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=-9BD_NaV-UemQAqXyQoA:9 a=CjuIK1q_8ugA:10 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2CQCwCfnH1V/++YsFtcgxBUUg29fQmBYYV6AoEeORQBAQEBAQEBgQpBBYNdAQEEJxMcIxALFAQJJQ8qHgYTiDMBCMhsAQEBAQEBAQMBAQEBAQEBFwSLRIRTMweELQEEk1uEUIZxmBEmg3s8MYJHAQEB Received: from 239.152-176-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.176.152.239]) by relay.skynet.be with ESMTP; 14 Jun 2015 17:28:18 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.9/8.14.9) with ESMTP id t5EFSGvd002863; Sun, 14 Jun 2015 17:28:16 +0200 (CEST) (envelope-from tijl@FreeBSD.org) Date: Sun, 14 Jun 2015 17:28:16 +0200 From: Tijl Coosemans To: Adrian Chadd Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r284356 - head/usr.sbin/crunch/crunchgen Message-ID: <20150614172816.0695d45e@kalimero.tijl.coosemans.org> In-Reply-To: References: <201506132201.t5DM1LCV025599@svn.freebsd.org> <20150614114116.2ba761da@kalimero.tijl.coosemans.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2015 15:29:30 -0000 On Sun, 14 Jun 2015 08:07:17 -0700 Adrian Chadd wrote: > On 14 June 2015 at 02:41, Tijl Coosemans wrote: >> On Sat, 13 Jun 2015 22:01:21 +0000 (UTC) Adrian Chadd wrote: >>> Author: adrian >>> Date: Sat Jun 13 22:01:21 2015 >>> New Revision: 284356 >>> URL: https://svnweb.freebsd.org/changeset/base/284356 >>> >>> Log: >>> Fix up crunchgen binary generation to work with external cross-build >>> tools. >>> >>> * Allow STRIP to be overridden by the environment >>> * Use CC to tie things together, not LD >>> >>> Tested: >>> >>> * i386, mips32 >>> >>> Submitted by: kan >>> >>> Modified: >>> head/usr.sbin/crunch/crunchgen/crunchgen.c >>> >>> Modified: head/usr.sbin/crunch/crunchgen/crunchgen.c >>> ============================================================================== >>> --- head/usr.sbin/crunch/crunchgen/crunchgen.c Sat Jun 13 20:15:44 2015 (r284355) >>> +++ head/usr.sbin/crunch/crunchgen/crunchgen.c Sat Jun 13 22:01:21 2015 (r284356) >>> @@ -1109,7 +1110,7 @@ prog_makefile_rules(FILE *outmk, prog_t >>> fprintf(outmk, " $(%s_LIBS)", p->ident); >>> >>> fprintf(outmk, "\n"); >>> - fprintf(outmk, "\t$(LD) -dc -r -o %s.lo %s_stub.o $(%s_OBJPATHS)", >>> + fprintf(outmk, "\t$(CC) -nostdlibs -dc -r -o %s.lo %s_stub.o $(%s_OBJPATHS)", >> >> Does CC understand -dc and -r? > > Apparently? Hmm, it's undocumented but it seems to recognise -r and pass it on to the linker. Not -dc though. It's safer to use: -Wl,-dc -Wl,-r