From owner-svn-src-all@FreeBSD.ORG Sun Jun 14 15:07:19 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 E914DCA1; Sun, 14 Jun 2015 15:07:18 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x235.google.com (mail-ig0-x235.google.com [IPv6:2607:f8b0:4001:c05::235]) (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 B3084E7F; Sun, 14 Jun 2015 15:07:18 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igbsb11 with SMTP id sb11so35907420igb.0; Sun, 14 Jun 2015 08:07:18 -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=qhKDhOKlXRJlhxcPXZ+Fk0gKLUc+ze4PTr5n2LMapyw=; b=M0sHYE2vFguNAJ4C3kjBiYxp046NeHGrPaQ4X/9RDbNGMu0Cq4YkNyoye0R+aPzSVm dGbee+ffwItNuTlEKR8rarAot3xG1h0GlVmGfj9Oz/zHj2qz9mlyeCZ9jp5sbWzJcBd7 SR5u1ROfaSaaEkV8acFCyapUwCfmCZ5FWbFHfxBThsx2pRDcIu2Ami3pQ/moXr7mf/sO 9tKSF5+Dx5tJKbj0ecyhzttcp+rtkwXb2KBQbQiRkp6ztnWbBvaabjHlvkwo5kQ1lCeU cNxKV+BBpVtxCf1LDvOAVhZOaL7u/aO5+lGJN35ctIXf+cfrfarXDe6FIn4Q0r1zWThk ybfg== MIME-Version: 1.0 X-Received: by 10.42.120.66 with SMTP id e2mr25683161icr.37.1434294438040; Sun, 14 Jun 2015 08:07:18 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.38.133 with HTTP; Sun, 14 Jun 2015 08:07:17 -0700 (PDT) In-Reply-To: <20150614114116.2ba761da@kalimero.tijl.coosemans.org> References: <201506132201.t5DM1LCV025599@svn.freebsd.org> <20150614114116.2ba761da@kalimero.tijl.coosemans.org> Date: Sun, 14 Jun 2015 08:07:17 -0700 X-Google-Sender-Auth: thFcXhK8bAmhyS8PnAZz0HpJSII 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:07:19 -0000 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) >> @@ -980,6 +980,7 @@ top_makefile_rules(FILE *outmk) >> prog_t *p; >> >> fprintf(outmk, "LD?= ld\n"); >> + fprintf(outmk, "STRIP?= strip\n"); >> if ( subtract_strlst(&libs, &libs_so) ) >> fprintf(outmk, "# NOTE: Some LIBS declarations below overridden by LIBS_SO\n"); >> >> @@ -1027,7 +1028,7 @@ top_makefile_rules(FILE *outmk) >> fprintf(outmk, "\t$(CC) -static -o %s %s.o $(CRUNCHED_OBJS) $(LIBS)\n", >> execfname, execfname); >> fprintf(outmk, ".endif\n"); >> - fprintf(outmk, "\tstrip %s\n", execfname); >> + fprintf(outmk, "\t$(STRIP) %s\n", execfname); >> fprintf(outmk, "realclean: clean subclean\n"); >> fprintf(outmk, "clean:\n\trm -f %s *.lo *.o *_stub.c\n", execfname); >> fprintf(outmk, "subclean: $(SUBCLEAN_TARGETS)\n"); >> @@ -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? -a