Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Feb 2013 02:57:59 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r246346 - head/usr.sbin/crunch/crunchgen
Message-ID:  <201302050257.r152vxlF095355@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Tue Feb  5 02:57:59 2013
New Revision: 246346
URL: http://svnweb.freebsd.org/changeset/base/246346

Log:
  crunchgen: Permit use of alternative linkers.
  
  Submitted by:	Pete Chou
  MFC after:	1 week

Modified:
  head/usr.sbin/crunch/crunchgen/crunchgen.c

Modified: head/usr.sbin/crunch/crunchgen/crunchgen.c
==============================================================================
--- head/usr.sbin/crunch/crunchgen/crunchgen.c	Tue Feb  5 02:45:02 2013	(r246345)
+++ head/usr.sbin/crunch/crunchgen/crunchgen.c	Tue Feb  5 02:57:59 2013	(r246346)
@@ -979,6 +979,7 @@ top_makefile_rules(FILE *outmk)
 {
 	prog_t *p;
 
+	fprintf(outmk, "LD?= ld\n");
 	if ( subtract_strlst(&libs, &libs_so) )
 		fprintf(outmk, "# NOTE: Some LIBS declarations below overridden by LIBS_SO\n");
 
@@ -1108,7 +1109,7 @@ prog_makefile_rules(FILE *outmk, prog_t 
 		fprintf(outmk, " $(%s_LIBS)", p->ident);
 
 	fprintf(outmk, "\n");
-	fprintf(outmk, "\tld -dc -r -o %s.lo %s_stub.o $(%s_OBJPATHS)",
+	fprintf(outmk, "\t$(LD) -dc -r -o %s.lo %s_stub.o $(%s_OBJPATHS)",
 	    p->name, p->name, p->ident);
 	if (p->libs)
 		fprintf(outmk, " $(%s_LIBS)", p->ident);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302050257.r152vxlF095355>