Module Name: src
Committed By: matt
Date: Thu Jul 18 18:43:56 UTC 2013
Modified Files:
src/lib/csu/common: Makefile.inc
Log Message:
Only supplie -fPIE to crtbegin.c if MKPIC is yes.
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/lib/csu/common/Makefile.inc
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/csu/common/Makefile.inc
diff -u src/lib/csu/common/Makefile.inc:1.14 src/lib/csu/common/Makefile.inc:1.15
--- src/lib/csu/common/Makefile.inc:1.14 Wed Jul 17 14:23:45 2013
+++ src/lib/csu/common/Makefile.inc Thu Jul 18 18:43:56 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.14 2013/07/17 14:23:45 martin Exp $
+# $NetBSD: Makefile.inc,v 1.15 2013/07/18 18:43:56 matt Exp $
.include <bsd.own.mk>
@@ -12,6 +12,7 @@ OBJS+= crtbegin.o crtend.o
.if ${MKPIC} == "yes"
OBJS+= crtbeginS.o
+CFLAGS.crtbegin.c+= -fPIE
.endif
realall: ${OBJS}
@@ -23,7 +24,7 @@ crtbegin.o: crtbegin.S
.else
crtbegin.o: crtbegin.c crtbegin.h
${_MKTARGET_COMPILE}
- ${COMPILE.c} -fPIE ${COMMON_DIR}/crtbegin.c -o ${.TARGET}.o
+ ${COMPILE.c} ${CFLAGS.crtbegin.c} ${COMMON_DIR}/crtbegin.c -o ${.TARGET}.o
.endif
${LD} -x -r -o ${.TARGET} ${.TARGET}.o
rm -f ${.TARGET}.o