diff options
-rw-r--r-- | distrib/special/Makefile.inc | 2 | ||||
-rw-r--r-- | share/mk/bsd.lib.mk | 4 | ||||
-rw-r--r-- | usr.sbin/crunchgen/crunchgen.c | 7 |
3 files changed, 7 insertions, 6 deletions
diff --git a/distrib/special/Makefile.inc b/distrib/special/Makefile.inc index c6454a08a0b..733d4964d8b 100644 --- a/distrib/special/Makefile.inc +++ b/distrib/special/Makefile.inc @@ -1,6 +1,6 @@ # options for all the directories below -COPTS+=-Oz -fno-stack-protector +COPTS+=-Oz -fno-stack-protector -fno-unwind-tables MAN= LDSTATIC=-static NOPIE= diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index aea8bfc468c..abe6060625a 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -1,4 +1,4 @@ -# $OpenBSD: bsd.lib.mk,v 1.93 2018/06/06 00:14:29 mortimer Exp $ +# $OpenBSD: bsd.lib.mk,v 1.94 2018/10/18 14:25:14 naddy Exp $ # $NetBSD: bsd.lib.mk,v 1.67 1996/01/17 20:39:26 mycroft Exp $ # @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91 @@ -34,8 +34,6 @@ CXXFLAGS+= ${NOPIE_FLAGS} AFLAGS+= ${NOPIE_FLAGS} .endif -DIST_CFLAGS+= -Oz -fno-stack-protector - .c.o: @echo "${COMPILE.c} ${.IMPSRC} -o ${.TARGET}" @${COMPILE.c} ${DFLAGS} ${.IMPSRC} -o ${.TARGET}.o diff --git a/usr.sbin/crunchgen/crunchgen.c b/usr.sbin/crunchgen/crunchgen.c index 5e088b9844b..48b5f06784c 100644 --- a/usr.sbin/crunchgen/crunchgen.c +++ b/usr.sbin/crunchgen/crunchgen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crunchgen.c,v 1.20 2018/02/06 00:05:24 henning Exp $ */ +/* $OpenBSD: crunchgen.c,v 1.21 2018/10/18 14:25:14 naddy Exp $ */ /* * Copyright (c) 1994 University of Maryland @@ -895,6 +895,8 @@ top_makefile_rules(FILE * outmk) fprintf(outmk, ".include <bsd.own.mk>\n"); fprintf(outmk, "CFLAGS+=$(NOPIE_FLAGS)\n"); fprintf(outmk, "CFLAGS+=-Oz\n"); + fprintf(outmk, "CFLAGS+=-fno-stack-protector\n"); + fprintf(outmk, "CFLAGS+=-fno-unwind-tables\n"); fprintf(outmk, "LDFLAGS+=$(NOPIE_LDFLAGS)\n"); fprintf(outmk, "STRIP?=strip\n"); fprintf(outmk, "LINK=$(LD) -dc -r ${LDFLAGS}\n"); @@ -934,7 +936,8 @@ top_makefile_rules(FILE * outmk) fprintf(outmk, ".olist.a:\n"); fprintf(outmk, "\t@rm -f ${.TARGET}\n"); fprintf(outmk, "\t@cd ${SRCLIBDIR}/${.PREFIX} &&\t\t\t\t\\\n"); - fprintf(outmk, "\t${MAKE} DIST_OBJS=\"`cat ${.OBJDIR}/${.IMPSRC}`\"\t\t\\\n"); + fprintf(outmk, "\t${MAKE} DIST_CFLAGS=\"${CFLAGS}\"\t\t\t\t\\\n"); + fprintf(outmk, "\t DIST_OBJS=\"`cat ${.OBJDIR}/${.IMPSRC}`\"\t\t\\\n"); fprintf(outmk, "\t DIST_LIB=${.OBJDIR}/${.TARGET} ${.OBJDIR}/${.TARGET}\n\n"); fprintf(outmk, "%s.map: %s.o $(CRUNCHED_OBJS)\n", execfname, execfname); |