Source-Changes-HG archive

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

[src/trunk]: src/external/gpl3/gcc/usr.bin move the gcc 4.5 usr.bin build mak...



details:   https://anonhg.NetBSD.org/src/rev/b0c5d610667f
branches:  trunk
changeset: 766367:b0c5d610667f
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Jun 21 06:03:13 2011 +0000

description:
move the gcc 4.5 usr.bin build makefiles to the right place.

diffstat:

 external/gpl3/gcc/usr.bin/Makefile                |   23 +
 external/gpl3/gcc/usr.bin/Makefile.backend        |   44 +++
 external/gpl3/gcc/usr.bin/Makefile.frontend       |   23 +
 external/gpl3/gcc/usr.bin/Makefile.inc            |   66 ++++
 external/gpl3/gcc/usr.bin/Makefile.libcpp         |    4 +
 external/gpl3/gcc/usr.bin/backend/Makefile        |  307 ++++++++++++++++++++++
 external/gpl3/gcc/usr.bin/cc1/Makefile            |   12 +
 external/gpl3/gcc/usr.bin/cc1obj/Makefile         |   15 +
 external/gpl3/gcc/usr.bin/cc1plus/Makefile        |   15 +
 external/gpl3/gcc/usr.bin/cpp/Makefile            |   24 +
 external/gpl3/gcc/usr.bin/frontend/Makefile       |   37 ++
 external/gpl3/gcc/usr.bin/g++/Makefile            |   17 +
 external/gpl3/gcc/usr.bin/gcc/Makefile            |   26 +
 external/gpl3/gcc/usr.bin/gcov/Makefile           |   18 +
 external/gpl3/gcc/usr.bin/host-libiberty/Makefile |   18 +
 external/gpl3/gcc/usr.bin/include/Makefile        |   21 +
 external/gpl3/gcc/usr.bin/libcpp/Makefile         |   20 +
 external/gpl3/gcc/usr.bin/protoize/Makefile       |   21 +
 external/gpl3/gcc/usr.bin/unprotoize/Makefile     |   21 +
 19 files changed, 732 insertions(+), 0 deletions(-)

diffs (truncated from 808 to 300 lines):

diff -r f7d2655fcc6a -r b0c5d610667f external/gpl3/gcc/usr.bin/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/usr.bin/Makefile        Tue Jun 21 06:03:13 2011 +0000
@@ -0,0 +1,23 @@
+#      $NetBSD: Makefile,v 1.1 2011/06/21 06:03:13 mrg Exp $
+
+NOOBJ=# defined
+
+.include <bsd.own.mk>
+
+.if ${MKGCC} != "no" && exists(${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk)
+
+# We keep libcpp here since it depends upon frontend.
+
+SUBDIR+=       host-libiberty .WAIT \
+               backend .WAIT \
+               frontend .WAIT \
+               libcpp gcov .WAIT \
+               cc1 cc1obj cc1plus cpp g++ gcc \
+               include protoize unprotoize
+
+.include <bsd.subdir.mk>
+
+.else
+# Do nothing. (PROG undefined)
+.include <bsd.prog.mk>
+.endif
diff -r f7d2655fcc6a -r b0c5d610667f external/gpl3/gcc/usr.bin/Makefile.backend
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/usr.bin/Makefile.backend        Tue Jun 21 06:03:13 2011 +0000
@@ -0,0 +1,44 @@
+#      $NetBSD: Makefile.backend,v 1.1 2011/06/21 06:03:13 mrg Exp $
+
+NOMAN=         # defined
+BINDIR=                /usr/libexec
+
+CPPFLAGS+=     -I${GCCARCH} -I${BACKENDOBJ} \
+               ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*}
+
+.include <bsd.own.mk>
+
+DPADD=         ${BACKENDOBJ}/libbackend.a ${LIBIBERTYOBJ}/libiberty.a
+LDADD=         -L${BACKENDOBJ} -lbackend -L${LIBIBERTYOBJ} -liberty
+
+CLEANFILES+=   ${PROG}-checksum.c ${PROG}-dummy dummy-checksum.d \
+               dummy-checksum.o genchecksum genchecksum.lo
+
+.include <bsd.prog.mk>
+
+# Don't auto-frob .y or .l files.
+.l.c .y.c .y.h:
+       @true
+
+CPPFLAGS.genchecksum.c+=       -DGENERATOR_FILE -I${GCCARCH} -I${DIST}/include -I${BACKENDOBJ}
+
+genchecksum.lo:
+genchecksum: genchecksum.lo
+       ${_MKTARGET_LINK}
+       ${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY}
+# This is a copy of the ${PROG} target from bsd.prog.mk.
+DUMMYOBJS=     ${SRCS:N${PROG}-checksum.c:.c=.o} dummy-checksum.o
+${PROG}-dummy: ${DUMMYOBJS}
+       ${_MKTARGET_LINK}
+.if defined(DESTDIR)
+       ${_CCLINK} -Wl,-nostdlib \
+           ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${_PROGLDOPTS} \
+           -B${_GCC_CRTDIR}/ -B${DESTDIR}/usr/lib/  \
+           ${DUMMYOBJS} ${LDADD} \
+           -L${_GCC_LIBGCCDIR} -L${DESTDIR}/usr/lib
+.else
+       ${_CCLINK} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${_PROGLDOPTS} ${DUMMYOBJS} ${LDADD}
+.endif # defined(DESTDIR)
+${PROG}-checksum.c: genchecksum ${PROG}-dummy
+       ${_MKTARGET_CREATE}
+       ./genchecksum ${PROG}-dummy >${.TARGET}
diff -r f7d2655fcc6a -r b0c5d610667f external/gpl3/gcc/usr.bin/Makefile.frontend
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/usr.bin/Makefile.frontend       Tue Jun 21 06:03:13 2011 +0000
@@ -0,0 +1,23 @@
+#      $NetBSD: Makefile.frontend,v 1.1 2011/06/21 06:03:13 mrg Exp $
+
+BINDIR=                /usr/bin
+
+CPPFLAGS+=     -I${GCCARCH} -I${FRONTENDOBJ} \
+               ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*}
+
+.include <bsd.own.mk>
+
+DPADD=         ${FRONTENDOBJ}/libfrontend.a ${LIBIBERTYOBJ}/libiberty.a
+LDADD=         -L${FRONTENDOBJ} -lfrontend -L${LIBIBERTYOBJ} -liberty
+
+.include <bsd.prog.mk>
+
+gcc-vers.texi:
+       (echo "@set version-GCC $(BASEVER)"; \
+       if [ "$(DEVPHASE)" = "experimental" ]; then \
+               echo "@set DEVELOPMENT"; \
+       else \
+               echo "@clear DEVELOPMENT"; \
+       fi) > ${.TARGET}
+
+CLEANFILES+=   gcc-vers.texi
diff -r f7d2655fcc6a -r b0c5d610667f external/gpl3/gcc/usr.bin/Makefile.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/usr.bin/Makefile.inc    Tue Jun 21 06:03:13 2011 +0000
@@ -0,0 +1,66 @@
+#      $NetBSD: Makefile.inc,v 1.1 2011/06/21 06:03:13 mrg Exp $
+
+.include <bsd.own.mk>
+
+TOP=           ${NETBSDSRCDIR}/gnu
+DIST=          ${TOP}/dist/gcc4
+
+GCCARCH=       ${.CURDIR}/../arch/${MACHINE_ARCH}
+
+CPPFLAGS+=     -DLOCALEDIR=\"/usr/share/locale\" -DNETBSD_NATIVE
+HOST_CPPFLAGS+=        -I${.CURDIR}/..
+
+.if ${USETOOLS} == "yes"
+COMPATOBJDIR!= cd ${NETBSDSRCDIR}/tools/compat && ${PRINTOBJDIR}
+NBCOMPATLIB=   -L${COMPATOBJDIR} -lnbcompat
+.endif
+
+GNUHOSTDIST=   ${DIST}
+BUILD_PREFIX=  ${C_BUILD_PREFIX}
+
+LIBIBERTYOBJ!=         cd ${.CURDIR}/../../lib/libiberty && ${PRINTOBJDIR}
+FRONTENDOBJ!=          cd ${.CURDIR}/../frontend && ${PRINTOBJDIR}
+BACKENDOBJ!=           cd ${.CURDIR}/../backend && ${PRINTOBJDIR}
+LIBCPPOBJ!=            cd ${.CURDIR}/../../lib/libcpp && ${PRINTOBJDIR}
+
+HOSTLIBIBERTYOBJ!=     cd ${.CURDIR}/../host-libiberty && ${PRINTOBJDIR}
+HOSTLIBIBERTY=         ${HOSTLIBIBERTYOBJ}/libiberty/libiberty.a
+
+BASEVER!=              cat ${GNUHOSTDIST}/gcc/BASE-VER
+DEVPHASE!=             cat ${GNUHOSTDIST}/gcc/DEV-PHASE
+DATESTAMP!=            cat ${GNUHOSTDIST}/gcc/DATESTAMP
+
+BASEVERSTR=            "\"$(BASEVER)\""
+.if !empty(DEVPHASE)
+DEVPHASESTR=           "\" $(DEVPHASE)\""
+.else
+DEVPHASESTR=           "\"\""
+.endif
+.if !empty(DEVPHASE)
+DATESTAMPSTR=          "\" $(DATESTAMP)\""
+.else
+DATESTAMPSTR=          "\"\""
+.endif
+
+VER_CPPFLAGS=          -DBASEVER=${BASEVERSTR} \
+                       -DDATESTAMP=${DATESTAMPSTR} \
+                       -DDEVPHASE=${DEVPHASESTR}
+CPPFLAGS.version.c=            ${VER_CPPFLAGS}
+
+.include "${GCCARCH}/defs.mk"
+
+.if ${MKPIC} != "no"
+.if ${G_ENABLE_SHARED} == "yes" && ${G_SHLIB_LINK} != ""
+CPPFLAGS+=     -DENABLE_SHARED_LIBGCC
+.endif
+
+.if empty(G_SHLIB_MULTILIB)
+CPPFLAGS+=     -DNO_SHARED_LIBGCC_MULTILIB
+.endif
+.endif
+
+# This depends on the "extern inline" mess, so downgrade to something safe.
+# CPPFLAGS is applied after CFLAGS, which gets the -std=gnu99
+CPPFLAGS+=     -std=gnu89
+
+NOCLANGERROR=  # defined
diff -r f7d2655fcc6a -r b0c5d610667f external/gpl3/gcc/usr.bin/Makefile.libcpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/usr.bin/Makefile.libcpp Tue Jun 21 06:03:13 2011 +0000
@@ -0,0 +1,4 @@
+#      $NetBSD: Makefile.libcpp,v 1.1 2011/06/21 06:03:13 mrg Exp $
+
+DPADD+=                ${LIBCPPOBJ}/libcpp.a
+LDADD+=                ${LIBCPPOBJ}/libcpp.a
diff -r f7d2655fcc6a -r b0c5d610667f external/gpl3/gcc/usr.bin/backend/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/usr.bin/backend/Makefile        Tue Jun 21 06:03:13 2011 +0000
@@ -0,0 +1,307 @@
+#      $NetBSD: Makefile,v 1.1 2011/06/21 06:03:13 mrg Exp $
+
+LIBISPRIVATE=  yes
+
+LIB=           backend
+
+SRCS=          ${G_OBJS:.o=.c} ${G_out_file:T}
+
+CPPFLAGS+=     -I. -I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*} \
+               -DTARGET_NAME=\"${MACHINE_GNU_PLATFORM}\"
+HOST_CPPFLAGS+=        -I. -I${GCCARCH} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*}
+DPSRCS+=       insn-attr.h insn-codes.h insn-config.h insn-flags.h tree-check.h
+CPPFLAGS.prefix.c+=     -DPREFIX=\"/usr\"
+
+.include <bsd.lib.mk>
+
+# For early builders.
+EXTRADEPENDSEARLY=     ${G_BUILD_EARLY_SUPPORT:.o=.lo} ${G_BUILD_RTL:.o=.lo} \
+                       ${G_BUILD_ERRORS:.o=.lo}
+
+# Don't auto-frob .y or .l files.
+.l.c .y.c .y.h:
+       @true
+
+#
+# Independent generation programs.
+#
+CLEANFILES+=   gengenrtl genrtl.c genrtl.h \
+               gengtype gtyp-gen.h gtype-desc.c gtype-desc.h \
+               gtype-c.h gtype-cp.h gtype-f.h gtype-objc.h \
+               genflags genflags.h \
+               gencheck tree-check.h \
+               insn-preds.c genpreds tm-preds.h tm_p.h cs-tm_p.h \
+               genmodes insn-modes.c insn-modes.h min-insn-modes.c \
+               auto-host.h build-print-rtl.c \
+               build-rtl.c build-errors.c build-varray.c \
+               build-bitmap.c build-ggc-none.c \
+               gt-*.h *.o *.lo \
+               cs-config.h \
+               gcov-iov gcov-iov.h \
+
+#
+# These files have special needs
+#
+.for f in \
+       build-errors build-ggc-none build-print-rtl build-rtl build-varray dummy-conditions gcov-iov genattr genattrtab genautomata gencheck genchecksum gencodes genconditions genconfig genconstants 
genemit genextract genflags gengenrtl gengtype gengtype-lex gengtype-yacc genmddeps genmodes genopinit genoutput genpeep genpreds genrecog gensupport insn-conditions min-insn-modes read-rtl
+CPPFLAGS.${f}.c=               -DGENERATOR_FILE
+.endfor
+
+# XXX
+COPTS.varasm.c=                        -Wno-error
+
+
+# Headers that host objects depend on (except gen*rtl*)
+HH_NORTL=      ${G_tm_file_list} ${G_build_xm_include_list}
+HH=            ${HH_NORTL} genrtl.h insn-modes.h
+
+#
+# Generate the various header files we need.
+#
+genrtl.c: gengenrtl
+       ${_MKTARGET_CREATE}
+       ./gengenrtl >${.TARGET}
+genrtl.h: gengenrtl
+       ${_MKTARGET_CREATE}
+       ./gengenrtl -h >${.TARGET}
+gengenrtl.lo: ${HH_NORTL}
+gengenrtl: gengenrtl.lo build-errors.lo
+       ${_MKTARGET_LINK}
+       ${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY}
+
+tm-preds.h: genpreds ${G_md_file}
+       ${_MKTARGET_CREATE}
+       ./genpreds -h ${G_md_file} >${.TARGET}
+insn-preds.c: genpreds ${G_md_file}
+       ${_MKTARGET_CREATE}
+       ./genpreds ${G_md_file} >${.TARGET}
+genpreds.lo: ${HH}
+genpreds: genpreds.lo ${EXTRADEPENDSEARLY}
+       ${_MKTARGET_LINK}
+       ${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY}
+
+tree-check.h: gencheck
+       ${_MKTARGET_CREATE}
+       ./gencheck >${.TARGET}
+gencheck.lo: ${HH}
+gencheck: gencheck.lo
+       ${_MKTARGET_LINK}
+       ${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY}
+
+gtype-desc.c: gtype-desc.h
+gtype-desc.h: gengtype
+       ${_MKTARGET_CREATE}
+       rm -f auto-host.h
+       ln -s ${.CURDIR}/../arch/${MACHINE_ARCH}/auto-host.h .
+       ./gengtype
+# gengtype is the real need for options.h
+gengtype.lo gengtype-lex.lo gengtype-yacc.lo: ${HH} gtyp-gen.h config.h options.h
+gengtype: gengtype.lo gengtype-lex.lo gengtype-yacc.lo build-errors.lo
+       ${_MKTARGET_LINK}
+       ${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY}
+
+gtyp-gen.h: Makefile
+       ${_MKTARGET_CREATE}
+       (\
+       echo "static const char *srcdir = \"$(G_GTFILES_SRCDIR)\";"     ; \
+       echo "static const char *lang_files[] = {"                      ; \
+       for f in $(G_GTFILES_FILES_FILES); do echo "\"$$f\", "; done    ; \
+       echo "NULL };"                                                  ; \
+       echo "static const char *langs_for_lang_files[] = {"            ; \
+       for f in $(G_GTFILES_FILES_LANGS); do echo "\"$$f\", "; done    ; \
+       echo "NULL };"                                                  ; \
+       echo "static const char *all_files[] = {"                       ; \
+       for f in $(G_GTFILES); do echo "\"$$f\", "; done                ; \
+       echo " NULL };"                                                 ; \
+       echo "static const char *lang_dir_names[] = {"                  ; \



Home | Main Index | Thread Index | Old Index