Module Name:    src
Committed By:   mrg
Date:           Sun Jul  3 08:35:42 UTC 2011

Modified Files:
        src/external/gpl3/gcc/lib/libgcc: Makefile.inc
        src/external/gpl3/gcc/lib/libgcc/libgcc: Makefile

Log Message:
- Makefile.hacks isn't working here; revert this portion for now.
- support ${COPTS.${.IMPSRC:T}} in the .c.pico rule
- add a hack for m68k and _fixunsxfdi, uses above
- add support to build LIB2ADD_ST stuff


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gcc/lib/libgcc/Makefile.inc
cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/lib/libgcc/libgcc/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/libgcc/Makefile.inc
diff -u src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.8 src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.9
--- src/external/gpl3/gcc/lib/libgcc/Makefile.inc:1.8	Fri Jul  1 10:04:13 2011
+++ src/external/gpl3/gcc/lib/libgcc/Makefile.inc	Sun Jul  3 08:35:41 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.8 2011/07/01 10:04:13 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.9 2011/07/03 08:35:41 mrg Exp $
 
 .if ${MKGCC} != "no"
 .if exists(${.CURDIR}/../arch/${MACHINE_ARCH}.mk)
@@ -151,21 +151,31 @@
 .include "../Makefile.tconfigh"
 DPSRCS+=	tconfig.h
 
-${SRCS}: unwind.h
+# XXX figure out why Makefile.hacks doesn't work
 BUILDSYMLINKS+=	${G_UNWIND_H} unwind.h
 DPSRCS+=	unwind.h
 
-.include "../../Makefile.hacks"
-
-${SRCS}: options.h
-
-optionlist: ${G_ALL_OPT_FILES} ${GCCARCH}/defs.mk Makefile ${DIST}/gcc/opt-gather.awk
-	${TOOL_AWK} -f ${DIST}/gcc/opt-gather.awk ${G_ALL_OPT_FILES} \
-		> ${.TARGET}
-
-options.h: optionlist ${DIST}/gcc/opt-functions.awk ${DIST}/gcc/opth-gen.awk
-	${TOOL_AWK} -f ${DIST}/gcc/opt-functions.awk \
-		-f ${DIST}/gcc/opth-gen.awk \
-		< optionlist > ${.TARGET}
+# these aren't necessary but are #include'd
+FAKEHEADERS=options.h insn-flags.h insn-constants.h sysroot-suffix.h
+${FAKEHEADERS}:
+	${_MKTARGET_CREATE}
+	touch ${.TARGET}
+DPSRCS+=	${FAKEHEADERS}
+CLEANFILES+=	${FAKEHEADERS}
+
+# XXX arm hack
+.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "armeb"
+${SRCS}: 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
 
-CLEANFILES+=	options.h optionlist
+# XXX
+.if defined(HAVE_GCC) && ${HAVE_GCC} == 45 && ${MACHINE_ARCH} == "m68k"
+COPTS._fixunsxfdi.c+=	-O0
+.endif

Index: src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile
diff -u src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile:1.1 src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile:1.2
--- src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile:1.1	Tue Jun 21 06:02:25 2011
+++ src/external/gpl3/gcc/lib/libgcc/libgcc/Makefile	Sun Jul  3 08:35:42 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2011/06/21 06:02:25 mrg Exp $
+#	$NetBSD: Makefile,v 1.2 2011/07/03 08:35:42 mrg Exp $
 
 REQUIRETOOLS=	yes
 NOLINT=		# defined
@@ -14,11 +14,21 @@
 .if !defined(MKNATIVE_LIBGCC_NEW)
 
 SRCS+=		${LIB2FUNCS} ${LIB2FUNCS_ST} ${LIB2DIVMOD} \
-		${G_LIB2ADD:T:S/.asm/.S/} ${LIB1ASMFUNCS}
+		${G_LIB2ADD:T:S/.asm/.S/} ${G_LIB2ADD_ST} ${LIB1ASMFUNCS}
 .if ${MKPIC} == "no"
 SRCS+=		${LIB2_EH}
 .endif
 
+# These usually just have "foo.S", we need to link from the
+# gcc/config/$PLATFORM/foo.asm to it.  So far, only rs6000 uses it,
+# so we hack it for now.
+#.for file in ${G_LIB2ADD_ST}
+.   if ${MACHINE_ARCH} == "powerpc"  # XXX XXX why does the above work?*
+.for file in crtsavfpr.S crtresfpr.S crtsavgpr.S crtresgpr.S crtresxfpr.S crtresxgpr.S
+BUILDSYMLINKS+=	${GNUHOSTDIST}/gcc/config/rs6000/${file:S/.S$/.asm/} ${file}
+.endfor
+.   endif
+
 .else	# defined(MKNATIVE_LIBGCC_NEW)
 
 .include "../Makefile.srcs"
@@ -41,7 +51,7 @@
 
 .c.pico:
 	${_MKTARGET_COMPILE}
-	${COMPILE.c} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}.tmp1
+	${COMPILE.c} ${COPTS.${.IMPSRC:T}} ${CSHLIBFLAGS} ${.IMPSRC} -o ${.TARGET}.tmp1
 	${NM} -pg ${.TARGET}.tmp1 | \
 	    ${TOOL_AWK} 'NF == 3 { print "\t.hidden", $$3 }' | \
 	    ${CC} ${COPTS} -Wl,-x -r -nostdinc -nostdlib ${CPUFLAGS} -o ${.TARGET}.tmp2 ${.TARGET}.tmp1 -xassembler -

Reply via email to