Tell the compiler that -dc and -r are linker flags.

Reviewed by:	adrian
This commit is contained in:
Tijl Coosemans 2015-06-14 15:40:17 +00:00
parent cedab3c72c
commit 7a51826c2a

View File

@ -1110,7 +1110,7 @@ prog_makefile_rules(FILE *outmk, prog_t *p)
fprintf(outmk, " $(%s_LIBS)", p->ident);
fprintf(outmk, "\n");
fprintf(outmk, "\t$(CC) -nostdlib -dc -r -o %s.lo %s_stub.o $(%s_OBJPATHS)",
fprintf(outmk, "\t$(CC) -nostdlib -Wl,-dc -Wl,-r -o %s.lo %s_stub.o $(%s_OBJPATHS)",
p->name, p->name, p->ident);
if (p->libs)
fprintf(outmk, " $(%s_LIBS)", p->ident);