summaryrefslogtreecommitdiffstats
path: root/usr.sbin/crunch/crunchgen
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2013-02-05 02:57:59 +0000
committerpfg <pfg@FreeBSD.org>2013-02-05 02:57:59 +0000
commitf48b0cf979342ef25249b2404b5870feaa101416 (patch)
tree617a90f7dc636654ff895a2288e696754d4b1dc1 /usr.sbin/crunch/crunchgen
parent5e7c84227ace667264813a5d2055b26b85057778 (diff)
downloadFreeBSD-src-f48b0cf979342ef25249b2404b5870feaa101416.zip
FreeBSD-src-f48b0cf979342ef25249b2404b5870feaa101416.tar.gz
crunchgen: Permit use of alternative linkers.
Submitted by: Pete Chou MFC after: 1 week
Diffstat (limited to 'usr.sbin/crunch/crunchgen')
-rw-r--r--usr.sbin/crunch/crunchgen/crunchgen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/crunch/crunchgen/crunchgen.c b/usr.sbin/crunch/crunchgen/crunchgen.c
index 0fb4906..e25c1ac 100644
--- a/usr.sbin/crunch/crunchgen/crunchgen.c
+++ b/usr.sbin/crunch/crunchgen/crunchgen.c
@@ -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 *p)
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);
OpenPOWER on IntegriCloud