From owner-svn-src-all@FreeBSD.ORG Sun Jun 14 15:31:33 2015 Return-Path: Delivered-To: svn-src-all@hub.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 8A0527B9; Sun, 14 Jun 2015 15:31:33 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ie0-x229.google.com (mail-ie0-x229.google.com [IPv6:2607:f8b0:4001:c03::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B86B634; Sun, 14 Jun 2015 15:31:33 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by iesa3 with SMTP id a3so48825675ies.2; Sun, 14 Jun 2015 08:31:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=pNzJJ5h6wrCrj4htgpuDFjaSj+jm0oPt0PKu02rbCCk=; b=CijUe4pS6FnJvh7eiD7+vh2pQtSNgg45eaR01gbHcGoQf8zjX/4rWjioW64I2GI3/2 L812WWaobuK+s3GAfhOQ/b4JSqZI0yR1CIJH3in7C6CDYDhBpSjyJINbdUtgPIUW/XyR jB75gEP4pIWYi1Oad6z6i+//NRpn9mwelWQZ0F6HFP/tCqXyjLtXmDPz6f/rJQcwiE1P F+T28UaZgvZIFpUvIEdCLwa073T5DnBKMzB3jAVzS7/+FQBGiNd1WAiLoHrHSsTD2lGg 5/MWFwAxGYX4ICBSPnrkKcGMFGzoVz7pNYtTEfWGdHRAvXeEOzI7guBCnCbNHWnevSwm dM3g== MIME-Version: 1.0 X-Received: by 10.107.155.74 with SMTP id d71mr29058126ioe.29.1434295892682; Sun, 14 Jun 2015 08:31:32 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.38.133 with HTTP; Sun, 14 Jun 2015 08:31:32 -0700 (PDT) In-Reply-To: <20150614172816.0695d45e@kalimero.tijl.coosemans.org> References: <201506132201.t5DM1LCV025599@svn.freebsd.org> <20150614114116.2ba761da@kalimero.tijl.coosemans.org> <20150614172816.0695d45e@kalimero.tijl.coosemans.org> Date: Sun, 14 Jun 2015 08:31:32 -0700 X-Google-Sender-Auth: 6Rp_duei-0korT0nHdBDXyrzW-k Message-ID: Subject: Re: svn commit: r284356 - head/usr.sbin/crunch/crunchgen From: Adrian Chadd To: Tijl Coosemans Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2015 15:31:33 -0000 On 14 June 2015 at 08:28, Tijl Coosemans wrote: > 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 Ok. Would you mind committing it? I'm not near a FreeBSD machine at the moment. Thanks! -a