summaryrefslogtreecommitdiffstats
path: root/usr.sbin/crunchgen
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2012-08-29 16:23:34 +0000
committerderaadt <deraadt@openbsd.org>2012-08-29 16:23:34 +0000
commit586eb32bdc0f71c33434fb9d6f1eb4e59cdd6f2c (patch)
tree55f9b32afa8c23fbc4efeadf472311a7dde81226 /usr.sbin/crunchgen
parentImplement pci_min_powerstate(). (diff)
downloadwireguard-openbsd-586eb32bdc0f71c33434fb9d6f1eb4e59cdd6f2c.tar.xz
wireguard-openbsd-586eb32bdc0f71c33434fb9d6f1eb4e59cdd6f2c.zip
Using the currently chosen (and in my opinion insane) abstraction, pass
-nopie to the linker if needed; ok pascal
Diffstat (limited to 'usr.sbin/crunchgen')
-rw-r--r--usr.sbin/crunchgen/crunchgen.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/crunchgen/crunchgen.c b/usr.sbin/crunchgen/crunchgen.c
index ee9d699349c..e4a158951df 100644
--- a/usr.sbin/crunchgen/crunchgen.c
+++ b/usr.sbin/crunchgen/crunchgen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crunchgen.c,v 1.7 2012/08/22 17:12:47 pascal Exp $ */
+/* $OpenBSD: crunchgen.c,v 1.8 2012/08/29 16:23:34 deraadt Exp $ */
/*
* Copyright (c) 1994 University of Maryland
@@ -889,8 +889,9 @@ top_makefile_rules(FILE * outmk)
fprintf(outmk, ".include <bsd.own.mk>\n");
fprintf(outmk, "CFLAGS+=$(NOPIE_FLAGS)\n");
+ fprintf(outmk, "LDFLAGS+=$(NOPIE_LDFLAGS)\n");
fprintf(outmk, "STRIP?=strip\n");
- fprintf(outmk, "LINK=$(LD) -dc -r\n");
+ fprintf(outmk, "LINK=$(LD) -dc -r ${LDFLAGS}\n");
fprintf(outmk, "LIBS=");
for (l = libdirs; l != NULL; l = l->next)
fprintf(outmk, " -L%s", l->str);
@@ -908,7 +909,7 @@ top_makefile_rules(FILE * outmk)
fprintf(outmk, "%s: %s.o $(CRUNCHED_OBJS)\n",
execfname, execfname);
- fprintf(outmk, "\t$(CC) -static -o $@ %s.o $(CRUNCHED_OBJS) $(LIBS)\n",
+ fprintf(outmk, "\t$(CC) -static ${LDFLAGS} -o $@ %s.o $(CRUNCHED_OBJS) $(LIBS)\n",
execfname);
fprintf(outmk, "\t$(STRIP) %s\n", execfname);
fprintf(outmk, "all: objs exe\nobjs: $(SUBMAKE_TARGETS)\n");