Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/gcc import the non-arch specific makefiles we ...
details: https://anonhg.NetBSD.org/src/rev/8e16c98d9bb2
branches: trunk
changeset: 766345:8e16c98d9bb2
user: mrg <mrg%NetBSD.org@localhost>
date: Tue Jun 21 02:48:27 2011 +0000
description:
import the non-arch specific makefiles we use to build GCC 4.1
as a base reference.
diffstat:
external/gpl3/gcc/lib/crtstuff4/Makefile | 82 ++
external/gpl3/gcc/lib/crtstuff4/crtbegin.c | 9 +
external/gpl3/gcc/lib/crtstuff4/crtbeginS.c | 10 +
external/gpl3/gcc/lib/crtstuff4/crtbeginT.c | 10 +
external/gpl3/gcc/lib/crtstuff4/crtend.c | 9 +
external/gpl3/gcc/lib/crtstuff4/crtendS.c | 10 +
external/gpl3/gcc/lib/libgcc4/Makefile | 13 +
external/gpl3/gcc/lib/libgcc4/Makefile.inc | 154 +++++
external/gpl3/gcc/lib/libgcc4/Makefile.srcs | 13 +
external/gpl3/gcc/lib/libgcc4/Makefile.wrapper | 62 ++
external/gpl3/gcc/lib/libgcc4/libgcc/Makefile | 74 ++
external/gpl3/gcc/lib/libgcc4/libgcc_eh/Makefile | 37 +
external/gpl3/gcc/lib/libgcc4/libgcc_s/Makefile | 69 ++
external/gpl3/gcc/lib/libgcc4/libgcov/Makefile | 53 +
external/gpl3/gcc/lib/libobjc4/Makefile | 115 +++
external/gpl3/gcc/lib/libstdc++-v3_4/Makefile | 134 ++++
external/gpl3/gcc/lib/libstdc++-v3_4/include/Makefile | 33 +
external/gpl3/gcc/lib/libstdc++-v3_4/include/backward/Makefile | 17 +
external/gpl3/gcc/lib/libstdc++-v3_4/include/bits/Makefile | 45 +
external/gpl3/gcc/lib/libstdc++-v3_4/include/debug/Makefile | 17 +
external/gpl3/gcc/lib/libstdc++-v3_4/include/ext/Makefile | 22 +
external/gpl3/gcc/lib/libstdc++-v3_4/include/tr1/Makefile | 17 +
external/gpl3/gcc/lib/libsupc++4/Makefile | 45 +
external/gpl3/gcc/lib/libsupc++4/Makefile.common | 19 +
external/gpl3/gcc/usr.bin/gcc4/Makefile | 21 +
external/gpl3/gcc/usr.bin/gcc4/Makefile.backend | 44 +
external/gpl3/gcc/usr.bin/gcc4/Makefile.frontend | 23 +
external/gpl3/gcc/usr.bin/gcc4/Makefile.inc | 66 ++
external/gpl3/gcc/usr.bin/gcc4/Makefile.libcpp | 4 +
external/gpl3/gcc/usr.bin/gcc4/backend/Makefile | 307 ++++++++++
external/gpl3/gcc/usr.bin/gcc4/cc1/Makefile | 12 +
external/gpl3/gcc/usr.bin/gcc4/cc1obj/Makefile | 15 +
external/gpl3/gcc/usr.bin/gcc4/cc1plus/Makefile | 15 +
external/gpl3/gcc/usr.bin/gcc4/cpp/Makefile | 24 +
external/gpl3/gcc/usr.bin/gcc4/frontend/Makefile | 37 +
external/gpl3/gcc/usr.bin/gcc4/g++/Makefile | 17 +
external/gpl3/gcc/usr.bin/gcc4/gcc/Makefile | 26 +
external/gpl3/gcc/usr.bin/gcc4/gcov/Makefile | 18 +
external/gpl3/gcc/usr.bin/gcc4/host-libiberty/Makefile | 18 +
external/gpl3/gcc/usr.bin/gcc4/include/Makefile | 21 +
external/gpl3/gcc/usr.bin/gcc4/libcpp/Makefile | 25 +
external/gpl3/gcc/usr.bin/gcc4/libiberty/Makefile | 27 +
external/gpl3/gcc/usr.bin/gcc4/libiberty/defs.mk | 8 +
external/gpl3/gcc/usr.bin/gcc4/protoize/Makefile | 21 +
external/gpl3/gcc/usr.bin/gcc4/unprotoize/Makefile | 21 +
45 files changed, 1839 insertions(+), 0 deletions(-)
diffs (truncated from 2019 to 300 lines):
diff -r 5067505424a9 -r 8e16c98d9bb2 external/gpl3/gcc/lib/crtstuff4/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/lib/crtstuff4/Makefile Tue Jun 21 02:48:27 2011 +0000
@@ -0,0 +1,82 @@
+# $NetBSD: Makefile,v 1.1.1.1 2011/06/21 02:48:27 mrg Exp $
+
+REQUIRETOOLS= yes
+NOLINT= # defined
+
+.include <bsd.own.mk>
+
+# If using an external toolchain, we expect crtbegin/crtend to be
+# supplied by that toolchain's run-time support.
+.if !defined(EXTERNAL_TOOLCHAIN) && ${MKGCC} != "no"
+
+DIST= ${NETBSDSRCDIR}/gnu/dist/gcc4
+GNUHOSTDIST= ${DIST}
+GCCARCH= ${NETBSDSRCDIR}/gnu/usr.bin/gcc4/arch/${MACHINE_ARCH}
+
+GALLCFLAGS= ${G_CRTSTUFF_CFLAGS} ${G_CRTSTUFF_T_CFLAGS}
+
+CPPFLAGS+= -I${GCCARCH} ${GALLCFLAGS:M-D*} ${GALLCFLAGS:M-I*:N-I.*}
+CPPFLAGS+= -I.
+
+GCFLAGS= ${GALLCFLAGS:N-D*:N-I*:N-i*:N./*}
+
+DPSRCS+= ${.CURDIR}/arch/${MACHINE_ARCH}.mk tconfig.h
+CLEANFILES+= cs-tconfig.h tconfig.h
+
+.include "${.CURDIR}/arch/${MACHINE_ARCH}.mk"
+
+SRCS+= crtbegin.c crtend.c
+OBJS+= crtbegin.o crtend.o
+.if ${MKPIC} != "no"
+SRCS+= crtbeginS.c crtendS.c
+OBJS+= crtbeginS.o crtendS.o # for shared libraries
+SRCS+= crtbeginT.c
+OBJS+= crtbeginT.o # for -static links
+.endif
+
+realall: ${OBJS}
+
+FILES=${OBJS}
+FILESDIR=${LIBDIR}
+
+.PATH: ${DIST}/gcc ${DIST}/gcc/config ${G_CONFIGDIR}
+
+tconfig.h:
+ ${_MKTARGET_CREATE}
+ TM_DEFINES="$(G_tm_defines)" \
+ HEADERS="$(G_xm_file)" XM_DEFINES="$(G_xm_defines)" \
+ TARGET_CPU_DEFAULT="" \
+ ${HOST_SH} $(GNUHOSTDIST)/gcc/mkconfig.sh tconfig.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}
+
+${OBJS}: ${DPSRCS}
+
+.include <bsd.prog.mk>
+
+# Override the default .c -> .o rule.
+.c.o:
+ ${_MKTARGET_COMPILE}
+ ${CC} ${CPPFLAGS} ${GCFLAGS} ${CPUFLAGS} -c ${.IMPSRC} -o ${.TARGET}.o
+ mv ${.TARGET}.o ${.TARGET}
+
+.if (${MACHINE_ARCH} == "mips64eb") || (${MACHINE_ARCH} == "mips64el")
+# Turn off as(1) warnings on MIPS, since warnings are fatal with WARNS>0
+# and GCC configury passes -finhibit-size-directive which causes mips-gas
+# to barf. Don't know what the real fix for this is...
+#
+# XXX should be COPTS, but that's too early
+CPUFLAGS+=-Wa,--no-warn
+.endif
+
+.else
+
+.include <bsd.prog.mk> # do nothing
+
+.endif # ! EXTERNAL_TOOLCHAIN && MKGCC != no
diff -r 5067505424a9 -r 8e16c98d9bb2 external/gpl3/gcc/lib/crtstuff4/crtbegin.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/lib/crtstuff4/crtbegin.c Tue Jun 21 02:48:27 2011 +0000
@@ -0,0 +1,9 @@
+/* $NetBSD: crtbegin.c,v 1.1.1.1 2011/06/21 02:48:27 mrg Exp $ */
+
+/*
+ * Written by Jason R. Thorpe, August 24, 2004.
+ * Public domain.
+ */
+
+#define CRT_BEGIN
+#include "crtstuff.c"
diff -r 5067505424a9 -r 8e16c98d9bb2 external/gpl3/gcc/lib/crtstuff4/crtbeginS.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/lib/crtstuff4/crtbeginS.c Tue Jun 21 02:48:27 2011 +0000
@@ -0,0 +1,10 @@
+/* $NetBSD: crtbeginS.c,v 1.1.1.1 2011/06/21 02:48:27 mrg Exp $ */
+
+/*
+ * Written by Jason R. Thorpe, August 24, 2004.
+ * Public domain.
+ */
+
+#define CRT_BEGIN
+#define CRTSTUFFS_O
+#include "crtstuff.c"
diff -r 5067505424a9 -r 8e16c98d9bb2 external/gpl3/gcc/lib/crtstuff4/crtbeginT.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/lib/crtstuff4/crtbeginT.c Tue Jun 21 02:48:27 2011 +0000
@@ -0,0 +1,10 @@
+/* $NetBSD: crtbeginT.c,v 1.1.1.1 2011/06/21 02:48:27 mrg Exp $ */
+
+/*
+ * Written by Jason R. Thorpe, August 24, 2004.
+ * Public domain.
+ */
+
+#define CRT_BEGIN
+#define CRTSTUFFT_O
+#include "crtstuff.c"
diff -r 5067505424a9 -r 8e16c98d9bb2 external/gpl3/gcc/lib/crtstuff4/crtend.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/lib/crtstuff4/crtend.c Tue Jun 21 02:48:27 2011 +0000
@@ -0,0 +1,9 @@
+/* $NetBSD: crtend.c,v 1.1.1.1 2011/06/21 02:48:27 mrg Exp $ */
+
+/*
+ * Written by Jason R. Thorpe, August 24, 2004.
+ * Public domain.
+ */
+
+#define CRT_END
+#include "crtstuff.c"
diff -r 5067505424a9 -r 8e16c98d9bb2 external/gpl3/gcc/lib/crtstuff4/crtendS.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/lib/crtstuff4/crtendS.c Tue Jun 21 02:48:27 2011 +0000
@@ -0,0 +1,10 @@
+/* $NetBSD: crtendS.c,v 1.1.1.1 2011/06/21 02:48:27 mrg Exp $ */
+
+/*
+ * Written by Jason R. Thorpe, August 24, 2004.
+ * Public domain.
+ */
+
+#define CRT_END
+#define CRTSTUFFS_O
+#include "crtstuff.c"
diff -r 5067505424a9 -r 8e16c98d9bb2 external/gpl3/gcc/lib/libgcc4/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/lib/libgcc4/Makefile Tue Jun 21 02:48:27 2011 +0000
@@ -0,0 +1,13 @@
+# $NetBSD: Makefile,v 1.1.1.1 2011/06/21 02:48:27 mrg Exp $
+
+SUBDIR+= libgcc
+
+.include <bsd.own.mk>
+
+.if ${MKPIC} != "no"
+SUBDIR+= libgcc_eh libgcc_s
+.endif
+
+SUBDIR+= libgcov
+
+.include <bsd.subdir.mk>
diff -r 5067505424a9 -r 8e16c98d9bb2 external/gpl3/gcc/lib/libgcc4/Makefile.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/lib/libgcc4/Makefile.inc Tue Jun 21 02:48:27 2011 +0000
@@ -0,0 +1,154 @@
+# $NetBSD: Makefile.inc,v 1.1.1.1 2011/06/21 02:48:27 mrg Exp $
+
+.if ${MKGCC} != "no"
+.if exists(${.CURDIR}/../arch/${MACHINE_ARCH}.mk)
+.include "${.CURDIR}/../arch/${MACHINE_ARCH}.mk"
+.endif
+.endif
+
+UNSUPPORTED_COMPILER.clang= # defined
+
+DIST= ${NETBSDSRCDIR}/gnu/dist/gcc4
+GNUHOSTDIST= ${DIST}
+GCCARCH= ${NETBSDSRCDIR}/gnu/usr.bin/gcc4/arch/${MACHINE_ARCH}
+GCCARCHLIBGCC= ${NETBSDSRCDIR}/gnu/lib/libgcc4/arch/${MACHINE_ARCH}
+GCCARCHXX= ${NETBSDSRCDIR}/gnu/lib/libstdc++-v3_4/arch/${MACHINE_ARCH}
+
+GCPPFLAGS= ${G_LIBGCC2_CFLAGS} ${G_USE_COLLECT2} ${G_INCLUDES}
+CPPFLAGS+= -I${.CURDIR} -I${GCCARCHLIBGCC}
+CPPFLAGS+= -I${GCCARCH} ${GCPPFLAGS:M-D*} ${GCPPFLAGS:M-I*:N-I.*}
+CPPFLAGS+= -I${G_EXTRA_HEADERS:M/*:H:u}
+CPPFLAGS+= -I${DIST} -I${DIST}/gcc/cp -I${DIST}/gcc/config -I${GCCARCHXX} -I.
+
+.if ${MACHINE_ARCH} == "powerpc" || \
+ ${MACHINE_ARCH} == "sh3el" || \
+ ${MACHINE_ARCH} == "sh3eb" || \
+ ${MACHINE_ARCH} == "m68000"
+_TRADITIONAL_CPP=
+COMPILE.S= ${CC} ${AFLAGS} ${CPPFLAGS} -c
+.endif
+
+.if !defined(MKNATIVE_LIBGCC_NEW)
+
+#
+# Old style libgcc build procedure.
+#
+
+# This is copied from gcc/mklibgcc.in:$lib2funcs
+LIB2FUNCS_ALL= _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 \
+ _cmpdi2 _ucmpdi2 _floatdidf _floatdisf _fixunsdfsi _fixunssfsi \
+ _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi _fixxfdi _fixunsxfdi \
+ _floatdixf _fixunsxfsi _fixtfdi _fixunstfdi _floatditf _clear_cache \
+ _enable_execute_stack _trampoline __main _absvsi2 _absvdi2 _addvsi3 \
+ _addvdi3 _subvsi3 _subvdi3 _mulvsi3 _mulvdi3 _negvsi2 _negvdi2 _ctors \
+ _ffssi2 _ffsdi2 _clz _clzsi2 _clzdi2 _ctzsi2 _ctzdi2 _popcount_tab \
+ _popcountsi2 _popcountdi2 _paritysi2 _paritydi2 _powisf2 _powidf2 \
+ _powixf2 _powitf2 \
+
+LIB2FUNCS_ALL+= \
+ _mulsc3 _muldc3 _mulxc3 _multc3 _divsc3 _divdc3 _divxc3 _divtc3
+
+LIB2FUNCS_SHORT:=${LIB2FUNCS_ALL}
+LIB2_DIVMOD_FUNCS:=${G_LIB2_DIVMOD_FUNCS}
+.for f in ${G_LIB1ASMFUNCS}; do
+LIB2FUNCS_SHORT:=${LIB2FUNCS_SHORT:N${f}}
+LIB2_DIVMOD_FUNCS:=${LIB2_DIVMOD_FUNCS:N${f}}
+.endfor
+
+LIB2FUNCS= ${LIB2FUNCS_SHORT:=.c}
+LIB2FUNCS_ST= ${G_LIB2FUNCS_ST:=.c}
+LIB2DIVMOD= ${LIB2_DIVMOD_FUNCS:=.c}
+LIB2_EH= ${G_LIB2ADDEH:M*.c:T}
+.if !empty(G_LIB1ASMFUNCS)
+LIB1ASMFUNCS= ${G_LIB1ASMFUNCS:=.S}
+.endif
+
+DPSRCS+= ${.CURDIR}/../arch/${MACHINE_ARCH}.mk
+CLEANFILES+= ${LIB2FUNCS} ${LIB2FUNCS_ST} ${LIB2DIVMOD} cs-tconfig.h
+.if !empty(G_LIB1ASMFUNCS)
+CLEANFILES+= ${LIB1ASMFUNCS}
+.endif
+
+.for file in ${G_LIB2ADD:M${GNUHOSTDIST}*}
+BUILDSYMLINKS+= ${file} ${file:T:S/.asm$/.S/}
+.endfor
+
+# XXX
+.if ${MACHINE_ARCH} == "m68000"
+CPICFLAGS:=
+BUILDSYMLINKS+= ${DIST}/gcc/config/m68k/fpgnulib.c fpgnulib.c
+BUILDSYMLINKS+= ${DIST}/gcc/config/m68k/fpgnulib.c xfgnulib.c
+CPPFLAGS.xfgnulib.c+=-DEXTFLOAT=1
+.endif
+
+.if ${MACHINE_ARCH} == "powerpc64"
+COPTS+= -mlong-double-128
+.endif
+
+${LIB2FUNCS} ${LIB2FUNCS_ST}: ${.CURDIR}/Makefile
+ ${_MKTARGET_CREATE}
+ printf '#define L${.PREFIX}\n#include <libgcc2.c>\n' >${.TARGET}
+
+${LIB2DIVMOD}: ${.CURDIR}/Makefile
+ ${_MKTARGET_CREATE}
+ printf '#define L${.PREFIX}\n#include <libgcc2.c>\n' >${.TARGET}
+
+.if !empty(G_LIB1ASMFUNCS)
+${LIB1ASMFUNCS}: ${.CURDIR}/Makefile
+ ${_MKTARGET_CREATE}
+ printf '#define L${.PREFIX}\n#include <${G_LIB1ASMSRC}>\n' >${.TARGET}
+.endif
+
+${LIB2_EH:.c=.o}:
+ ${_MKTARGET_COMPILE}
+ ${COMPILE.c} -fexceptions ${COPTS.${.IMPSRC:T}} -o ${.TARGET} ${.IMPSRC}
+
+${LIB2_EH:.c=.pico}:
+ ${_MKTARGET_COMPILE}
+ ${COMPILE.c} ${CPICFLAGS} -fexceptions ${COPTS.${.IMPSRC:T}} -o ${.TARGET} ${.IMPSRC}
+
+${G_LIB2_DIVMOD_FUNCS:=.o}:
+ ${_MKTARGET_COMPILE}
+ ${COMPILE.c} -fexceptions -fnon-call-exceptions ${COPTS.${.IMPSRC:T}} -o ${.TARGET} ${.IMPSRC}
+
+${G_LIB2_DIVMOD_FUNCS:=.pico}:
+ ${_MKTARGET_COMPILE}
+ ${COMPILE.c} ${CPICFLAGS} -fexceptions -fnon-call-exceptions ${COPTS.${.IMPSRC:T}} -o ${.TARGET} ${.IMPSRC}
+
+dp-bit.c: ${.CURDIR}/Makefile
+ ${_MKTARGET_CREATE}
+ printf '#define FLOAT\n#include <fp-bit.c>\n' >${.TARGET}
+
+.else # defined(MKNATIVE_LIBGCC_NEW)
+
+#
+# New style libgcc build procedure.
Home |
Main Index |
Thread Index |
Old Index