Adapt PIE fixes to new gcc/ld behaviour: Use -nopie as LDFLAGS and -fno-pie as

CFLAGS.

found in a bulk by and ok naddy@
This commit is contained in:
pascal 2012-08-30 20:54:59 +00:00
parent 07d31c5364
commit 07ffe3ec07
11 changed files with 29 additions and 26 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.60 2012/08/11 22:55:39 pascal Exp $
# $OpenBSD: Makefile,v 1.61 2012/08/30 20:54:59 pascal Exp $
COMMENT-main= GNU editor: extensible, customizable, self documenting
COMMENT-el= elisp sources for those who want to read/modify them
@ -43,7 +43,7 @@ CONFIGURE_ARGS= ${GCCARCH} --with-pop --with-system-malloc
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include \
-I${LOCALBASE}/include/libpng" \
LDFLAGS="${ELF_TOOLCHAIN:L:S/yes/-Z/:S/no//} \
-L${LOCALBASE}/lib -fno-pie"
-L${LOCALBASE}/lib -nopie"
CFLAGS += -fno-pie
MAKE_ENV= INSTALL_EMACS="${INSTALL_SCRIPT}"

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.28 2012/08/11 22:55:39 pascal Exp $
# $OpenBSD: Makefile,v 1.29 2012/08/30 20:54:59 pascal Exp $
COMMENT-main= GNU editor: extensible, customizable, self-documenting
COMMENT-el= elisp sources for those who want to read/modify them
@ -41,7 +41,7 @@ CONFIGURE_ARGS= ${GCCARCH} --with-pop --with-system-malloc
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include \
-I${LOCALBASE}/include/libpng" \
LDFLAGS="-L${LOCALBASE}/lib -fno-pie"
LDFLAGS="-L${LOCALBASE}/lib -nopie"
CFLAGS += -fno-pie
MAKE_ENV= INSTALL_EMACS="${INSTALL_SCRIPT}" \

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.19 2012/08/17 09:09:01 jasper Exp $
# $OpenBSD: Makefile,v 1.20 2012/08/30 20:54:59 pascal Exp $
COMMENT-main = GNU editor: extensible, customizable, self-documenting
COMMENT-el = elisp sources for those who want to read/modify them
@ -40,7 +40,7 @@ CONFIGURE_ARGS = ${GCCARCH} --with-system-malloc
CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}/include \
-I${LOCALBASE}/include/libpng" \
LDFLAGS="-L${LOCALBASE}/lib -fno-pie"
LDFLAGS="-L${LOCALBASE}/lib -nopie"
CFLAGS += -fno-pie
MAKE_ENV = INSTALL_EMACS="${INSTALL_SCRIPT}" \

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.25 2012/08/11 22:55:39 pascal Exp $
# $OpenBSD: Makefile,v 1.26 2012/08/30 20:54:59 pascal Exp $
BRANCH= 21.4
VERSION= 22
@ -7,7 +7,7 @@ REVISION = 6
WANTLIB= c m ncurses util
CFLAGS += -fno-pie
#CONFIGURE_ENV = LDFLAGS="-fno-pie"
CONFIGURE_ENV = LDFLAGS="-nopie"
CONFIGURE_ARGS+=--infodir='$${DESTDIR}${PREFIX}/info/${DISTNAME}' \
--infopath='${LOCALBASE}/info/${DISTNAME}:${LOCALBASE}/info:/usr/share/info' \
--site-prefixes='${LOCALBASE}:/usr' \

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.39 2012/08/20 09:23:15 pascal Exp $
# $OpenBSD: Makefile,v 1.40 2012/08/30 20:54:59 pascal Exp $
ONLY_FOR_ARCHS = amd64 i386 powerpc sparc64
@ -49,7 +49,7 @@ CFLAGS += -DSAFETY=2 -DNO_ASM -mcmodel=medany
.if ${MACHINE_ARCH} == "powerpc"
CONFIGURE_ARGS += --with-gmalloc
CFLAGS += -fno-pie
LDFLAGS += -fno-pie
LDFLAGS += -nopie
.else
CONFIGURE_ARGS += --without-gmalloc
.endif

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.50 2012/07/18 13:44:31 jasper Exp $
# $OpenBSD: Makefile,v 1.51 2012/08/30 20:54:59 pascal Exp $
COMMENT= real-time, concurrent and distributed functional language
BROKEN-sparc= Requires v9|v9a|v9b; requested architecture is sparclite.
@ -39,13 +39,16 @@ CONFIGURE_ARGS= --disable-jinterface \
USE_GMAKE= Yes
USE_GROFF = Yes
CONFIGURE_STYLE=autoconf no-autoheader
CONFIGURE_ENV= LDFLAGS="-pthread"
CONFIGURE_ENV= LDFLAGS="${LDFLAGS} -pthread"
AUTOCONF_VERSION=2.59
MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC}/erts/autoconf \
${WRKSRC}/lib/erl_interface/src/auxdir
.if ${MACHINE_ARCH} == i386
CONFIGURE_ARGS+= --enable-ethread-pre-pentium4-compatibility
.elif ${MACHINE_ARCH} == sparc64
CFLAGS+= -fno-pie
LDFLAGS+= -nopie
.endif
MAKE_ENV+= DESTDIR=$(DESTDIR)

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.12 2012/08/11 23:02:23 pascal Exp $
# $OpenBSD: Makefile,v 1.13 2012/08/30 20:54:59 pascal Exp $
ONLY_FOR_ARCHS= amd64 i386
@ -33,7 +33,7 @@ CONFIGURE_ARGS+= --with-install-dir='${PREFIX}/libdata/gprolog' \
--with-examples-dir='${PREFIX}/share/examples/gprolog' \
--with-html-dir='${PREFIX}/share/doc/gprolog/html' \
--with-doc-dir='${PREFIX}/share/doc/gprolog' \
--with-c-flags="${CFLAGS} -fno-pie"
--with-c-flags="${CFLAGS} -fno-pie -nopie"
WRKDIST= ${WRKDIR}/${DISTNAME}/src

View File

@ -1,12 +1,12 @@
$OpenBSD: patch-Fd2C_Makefile_in,v 1.1 2012/08/11 23:02:23 pascal Exp $
$OpenBSD: patch-Fd2C_Makefile_in,v 1.2 2012/08/30 20:54:59 pascal Exp $
--- Fd2C/Makefile.in.orig Fri Jan 23 12:15:03 2009
+++ Fd2C/Makefile.in Sat Aug 11 18:27:50 2012
+++ Fd2C/Makefile.in Tue Aug 28 16:39:14 2012
@@ -11,7 +11,7 @@ OBJS = fd2c@OBJ_SUFFIX@ read_file@OBJ_SUFFIX@ par
fd2c@EXE_SUFFIX@: $(OBJS)
- $(GPLC) -o fd2c@EXE_SUFFIX@ --no-fd-lib --min-bips $(OBJS)
+ $(GPLC) -L -fno-pie -o fd2c@EXE_SUFFIX@ --no-fd-lib --min-bips $(OBJS)
+ $(GPLC) -L -nopie -o fd2c@EXE_SUFFIX@ --no-fd-lib --min-bips $(OBJS)

View File

@ -1,12 +1,12 @@
$OpenBSD: patch-Pl2Wam_Makefile_in,v 1.1 2012/08/11 23:02:23 pascal Exp $
$OpenBSD: patch-Pl2Wam_Makefile_in,v 1.2 2012/08/30 20:54:59 pascal Exp $
--- Pl2Wam/Makefile.in.orig Fri Jan 23 12:15:03 2009
+++ Pl2Wam/Makefile.in Sat Aug 11 18:25:30 2012
+++ Pl2Wam/Makefile.in Tue Aug 28 16:39:01 2012
@@ -19,7 +19,7 @@ WAMS = $(PLS:.pl=.wam)
pl2wam@EXE_SUFFIX@: $(OBJS)
[ ! -f pl2wam@EXE_SUFFIX@ ] || cp pl2wam@EXE_SUFFIX@ pl2wam0@EXE_SUFFIX@
- $(GPLC) -o pl2wam@EXE_SUFFIX@ --no-fd-lib --min-bips $(OBJS)
+ $(GPLC) -L -fno-pie -o pl2wam@EXE_SUFFIX@ --no-fd-lib --min-bips $(OBJS)
+ $(GPLC) -L -nopie -o pl2wam@EXE_SUFFIX@ --no-fd-lib --min-bips $(OBJS)
clean:

View File

@ -1,12 +1,12 @@
$OpenBSD: patch-TopComp_Makefile_in,v 1.1 2012/08/11 23:02:23 pascal Exp $
--- TopComp/Makefile.in.orig Sat Aug 11 18:31:43 2012
+++ TopComp/Makefile.in Sat Aug 11 18:33:24 2012
$OpenBSD: patch-TopComp_Makefile_in,v 1.2 2012/08/30 20:54:59 pascal Exp $
--- TopComp/Makefile.in.orig Fri Jan 23 12:15:03 2009
+++ TopComp/Makefile.in Tue Aug 28 16:38:33 2012
@@ -24,7 +24,7 @@ $(HEXGPLC)@EXE_SUFFIX@: hexfilter.c decode_hexa.c
all: $(ALL_EXECS)
$(TOP_LEVEL)@EXE_SUFFIX@: ../EnginePl/gp_config.h copying.c top_level.c
- $(GPLC) $(TOP_LEVEL_FLAGS) -o $(TOP_LEVEL)@EXE_SUFFIX@ top_level.c
+ $(GPLC) -L -fno-pie $(TOP_LEVEL_FLAGS) -o $(TOP_LEVEL)@EXE_SUFFIX@ top_level.c
+ $(GPLC) -L -nopie $(TOP_LEVEL_FLAGS) -o $(TOP_LEVEL)@EXE_SUFFIX@ top_level.c

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.14 2012/08/27 18:03:32 krw Exp $
# $OpenBSD: Makefile,v 1.15 2012/08/30 20:54:59 pascal Exp $
# not yet ported to other arches
ONLY_FOR_ARCHS = amd64 i386 powerpc
@ -51,7 +51,7 @@ USE_GMAKE= Yes
PORTHOME= ${TMPDIR}
MAKE_ENV= GNUMAKE=${GMAKE} INSTALL_ROOT=${PREFIX} \
MAN_DIR=${PREFIX}/man INFO_DIR=${PREFIX}/info \
LINKFLAGS="-fno-pie"
LINKFLAGS="-nopie" LDFLAGS="-nopie"
CFLAGS += -fno-pie
# Upstream asks that packagers append something like this to the