Module Name:    src
Committed By:   mrg
Date:           Fri Jul  1 01:24:53 UTC 2011

Modified Files:
        src/external/gpl3/gcc/lib/crtstuff: Makefile
        src/external/gpl3/gcc/lib/libgcc: Makefile.inc
        src/external/gpl3/gcc/lib/libobjc: Makefile
Added Files:
        src/external/gpl3/gcc/lib: Makefile.hacks

Log Message:
consolidate unwind.h and other hacks into a new Makefile.hacks that
everyone else can use


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/lib/Makefile.hacks
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/lib/crtstuff/Makefile
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/lib/libgcc/Makefile.inc
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/lib/libobjc/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/lib/crtstuff/Makefile
diff -u src/external/gpl3/gcc/lib/crtstuff/Makefile:1.3 src/external/gpl3/gcc/lib/crtstuff/Makefile:1.4
--- src/external/gpl3/gcc/lib/crtstuff/Makefile:1.3	Wed Jun 29 01:56:57 2011
+++ src/external/gpl3/gcc/lib/crtstuff/Makefile	Fri Jul  1 01:24:53 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2011/06/29 01:56:57 mrg Exp $
+#	$NetBSD: Makefile,v 1.4 2011/07/01 01:24:53 mrg Exp $
 
 REQUIRETOOLS=	yes
 NOLINT=		# defined
@@ -51,14 +51,7 @@
 .PATH: ${DIST}/gcc ${DIST}/gcc/config ${G_CONFIGDIR}
 
 .include "../Makefile.tconfigh"
-
-# these aren't necessary but are #include'd
-FAKEHEADERS=options.h insn-flags.h insn-constants.h
-${FAKEHEADERS}:
-	${_MKTARGET_CREATE}
-	touch ${.TARGET}
-DPSRCS+=	${FAKEHEADERS}
-CLEANFILES+=	${FAKEHEADERS}
+.include "../Makefile.hacks"
 
 ${OBJS}: ${DPSRCS}
 

Index: src/external/gpl3/gcc/lib/libgcc/Makefile.inc
diff -u src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.5 src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.6
--- src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.5	Wed Jun 29 08:05:52 2011
+++ src/external/gpl3/gcc/lib/libgcc/Makefile.inc	Fri Jul  1 01:24:53 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.5 2011/06/29 08:05:52 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.6 2011/07/01 01:24:53 mrg Exp $
 
 .if ${MKGCC} != "no"
 .if exists(${.CURDIR}/../arch/${MACHINE_ARCH}.mk)
@@ -82,7 +82,7 @@
 CLEANFILES+=	${LIB1ASMFUNCS}
 .endif
 
-.for file in ${G_LIB2ADD:M${GNUHOSTDIST}*}
+.for file in ${G_LIB2ADD:M${GNUHOSTDIST}*:N*.c}
 BUILDSYMLINKS+=	${file} ${file:T:S/.asm$/.S/}
 .endfor
 
@@ -150,13 +150,8 @@
 .include "../Makefile.tconfigh"
 DPSRCS+=	tconfig.h
 
+${SRCS}: unwind.h
 BUILDSYMLINKS+=	${G_UNWIND_H} unwind.h
 DPSRCS+=	unwind.h
 
-# these aren't necessary but are #include'd
-FAKEHEADERS=options.h insn-flags.h insn-constants.h
-${FAKEHEADERS}:
-	${_MKTARGET_CREATE}
-	touch ${.TARGET}
-DPSRCS+=	${FAKEHEADERS}
-CLEANFILES+=	${FAKEHEADERS}
+.include "../../Makefile.hacks"

Index: src/external/gpl3/gcc/lib/libobjc/Makefile
diff -u src/external/gpl3/gcc/lib/libobjc/Makefile:1.3 src/external/gpl3/gcc/lib/libobjc/Makefile:1.4
--- src/external/gpl3/gcc/lib/libobjc/Makefile:1.3	Wed Jun 29 01:56:58 2011
+++ src/external/gpl3/gcc/lib/libobjc/Makefile	Fri Jul  1 01:24:53 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2011/06/29 01:56:58 mrg Exp $
+#	$NetBSD: Makefile,v 1.4 2011/07/01 01:24:53 mrg Exp $
 
 REQUIRETOOLS=	yes
 NOLINT=		# defined
@@ -73,24 +73,13 @@
 
 ${OBJS} ${POBJS} ${SOBJS}: runtime-info.h
 
-# these aren't necessary but are #include'd
-FAKEHEADERS=	${EXTRA_FAKEHEADERS} insn-flags.h insn-constants.h
-${FAKEHEADERS}:
-	${_MKTARGET_CREATE}
-	touch ${.TARGET}
-tm.h ${SRCS}: ${FAKEHEADERS}
-CLEANFILES+=	${FAKEHEADERS}
-
 ${SRCS}: tconfig.h unwind.h options.h
 
-.include "../Makefile.tconfigh"
-
-unwind.h: ${G_UNWIND_H}
-	${_MKTARGET_CREATE}
-	rm -f ${.TARGET}
-	ln -s ${G_UNWIND_H} ${.TARGET}
+BUILDSYMLINKS+=	${G_UNWIND_H} unwind.h
+DPSRCS+=	unwind.h
 
-CLEANFILES+= unwind.h
+.include "../Makefile.tconfigh"
+.include "../Makefile.hacks"
 
 # XXX just while all platforms defs.mk are updated..
 .if exists(${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk)

Added files:

Index: src/external/gpl3/gcc/lib/Makefile.hacks
diff -u /dev/null src/external/gpl3/gcc/lib/Makefile.hacks:1.1
--- /dev/null	Fri Jul  1 01:24:53 2011
+++ src/external/gpl3/gcc/lib/Makefile.hacks	Fri Jul  1 01:24:53 2011
@@ -0,0 +1,26 @@
+#	$NetBSD: Makefile.hacks,v 1.1 2011/07/01 01:24:53 mrg Exp $
+
+# some random crap we need in a few places
+
+# these aren't necessary but are #include'd
+FAKEHEADERS=	${EXTRA_FAKEHEADERS} insn-flags.h insn-constants.h
+${FAKEHEADERS}:
+	${_MKTARGET_CREATE}
+	touch ${.TARGET}
+tm.h ${SRCS}: ${FAKEHEADERS}
+CLEANFILES+=	${FAKEHEADERS}
+
+# arm.h wants MACHMODE aka "enum machine_mode" so we provide a hackful
+# one here to help build libs before gcc itself is built.
+
+# XXX arm hack
+.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "armeb"
+${OBJS}: insn-modes.h
+# XXX XXX
+${__DPSRCS.d}: insn-modes.h
+insn-modes.h:
+	${_MKTARGET_CREATE}
+	echo "enum machine_mode { X };" > ${.TARGET}
+DPSRCS+=	insn-modes.h
+CLEANFILES+=	insn-modes.h
+.endif

Reply via email to