Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/csu/common Fix previous: use PICFLAGS for crtbeginS.o



details:   https://anonhg.NetBSD.org/src/rev/11761b4b1763
branches:  trunk
changeset: 790095:11761b4b1763
user:      uwe <uwe%NetBSD.org@localhost>
date:      Wed Sep 18 22:53:39 2013 +0000

description:
Fix previous: use PICFLAGS for crtbeginS.o
Should unbreak sh3 builds.

XXX: PICFLAGS is defined in bsd.lib.mk which lib/csu does not use.
For now supply a local definition.  joerg@, please fix appropriately.

diffstat:

 lib/csu/common/Makefile.inc |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r a4741ae703d1 -r 11761b4b1763 lib/csu/common/Makefile.inc
--- a/lib/csu/common/Makefile.inc       Wed Sep 18 16:33:14 2013 +0000
+++ b/lib/csu/common/Makefile.inc       Wed Sep 18 22:53:39 2013 +0000
@@ -1,7 +1,10 @@
-#      $NetBSD: Makefile.inc,v 1.18 2013/09/12 15:36:15 joerg Exp $
+#      $NetBSD: Makefile.inc,v 1.19 2013/09/18 22:53:39 uwe Exp $
 
 .include <bsd.own.mk>
 
+# XXX: FIXME: This is defined in bsd.lib.mk
+PICFLAGS ?= -fPIC
+
 COMMON_DIR:=   ${.CURDIR}/common
 .PATH:         ${COMMON_DIR}
 
@@ -38,11 +41,11 @@
 .if exists(${ARCHDIR}/crtbegin.S)
 crtbeginS.o: crtbegin.S
        ${_MKTARGET_COMPILE}
-       ${COMPILE.S} -DPIC -DSHARED ${ARCHDIR}/crtbegin.S -o ${.TARGET}.o
+       ${COMPILE.S} ${PICFLAGS} -DSHARED ${ARCHDIR}/crtbegin.S -o ${.TARGET}.o
 .else
 crtbeginS.o: crtbegin.c crtbegin.h
        ${_MKTARGET_COMPILE}
-       ${COMPILE.c} -fPIC -DPIC -DSHARED ${COMMON_DIR}/crtbegin.c -o ${.TARGET}.o
+       ${COMPILE.c} ${PICFLAGS} -DSHARED ${COMMON_DIR}/crtbegin.c -o ${.TARGET}.o
 .endif
        ${LD} -x -r -o ${.TARGET} ${.TARGET}.o
        rm -f ${.TARGET}.o



Home | Main Index | Thread Index | Old Index