Module Name:    src
Committed By:   uwe
Date:           Wed Sep 18 22:53:39 UTC 2013

Modified Files:
        src/lib/csu/common: Makefile.inc

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 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.18 src/lib/csu/common/Makefile.inc:1.19
--- src/lib/csu/common/Makefile.inc:1.18	Thu Sep 12 15:36:15 2013
+++ src/lib/csu/common/Makefile.inc	Wed Sep 18 22:53:39 2013
@@ -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 @@ crtbegin.o: crtbegin.c crtbegin.h
 .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

Reply via email to