don't compile/link libraries with pie

This commit is contained in:
christos 2008-10-15 17:31:50 +00:00
parent 9bb26ef454
commit 1269d9a570
2 changed files with 7 additions and 9 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.prog.mk,v 1.236 2008/10/02 17:54:53 joerg Exp $
# $NetBSD: bsd.prog.mk,v 1.237 2008/10/15 17:31:50 christos Exp $
# @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
.ifndef HOSTPROG
@ -51,6 +51,11 @@ CLEANFILES+=strings
@rm -f x.cc
.endif
.if defined(MKPIE) && (${MKPIE} != "no")
CFLAGS+= -fPIC
LDFLAGS+= -Wl,-pie -shared-libgcc
.endif
##### Default values
CPPFLAGS+= ${DESTDIR:D-nostdinc ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include}
CXXFLAGS+= ${DESTDIR:D-nostdinc++ ${CPPFLAG_ISYSTEMXX} ${DESTDIR}/usr/include/g++}

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.sys.mk,v 1.172 2008/10/14 07:24:34 apb Exp $
# $NetBSD: bsd.sys.mk,v 1.173 2008/10/15 17:31:50 christos Exp $
#
# Build definitions used for NetBSD source tree builds.
@ -81,13 +81,6 @@ FFLAGS+= -mieee
.endif
.endif
.if defined(MKPIE) && (${MKPIE} != "no")
.if !defined(KERNEL_BUILD)
CFLAGS+= -fPIC
LDFLAGS+= -Wl,-pie -shared-libgcc
.endif
.endif
.if ${MACHINE} == "sparc64" && ${MACHINE_ARCH} == "sparc"
CFLAGS+= -Wa,-Av8plus
.endif