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 make GCC 9.3.0 build itself:



details:   https://anonhg.NetBSD.org/src/rev/848e70af8635
branches:  trunk
changeset: 943523:848e70af8635
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sat Sep 05 14:24:25 2020 +0000

description:
make GCC 9.3.0 build itself:
- common-target is needed before common now
- complete build-sort.o framework
- fix cyclic dep
- fix .c vs .cc issues

diffstat:

 external/gpl3/gcc/usr.bin/Makefile.backend |   3 ++-
 external/gpl3/gcc/usr.bin/backend/Makefile |  17 +++++++++++------
 external/gpl3/gcc/usr.bin/cc1/Makefile     |   7 ++-----
 external/gpl3/gcc/usr.bin/cc1obj/Makefile  |   7 ++-----
 external/gpl3/gcc/usr.bin/cc1plus/Makefile |   7 ++-----
 external/gpl3/gcc/usr.bin/common/Makefile  |   4 ++--
 external/gpl3/gcc/usr.bin/gcov/Makefile    |   4 ++--
 external/gpl3/gcc/usr.bin/lto1/Makefile    |   5 +----
 8 files changed, 24 insertions(+), 30 deletions(-)

diffs (203 lines):

diff -r a7d74b3269d1 -r 848e70af8635 external/gpl3/gcc/usr.bin/Makefile.backend
--- a/external/gpl3/gcc/usr.bin/Makefile.backend        Sat Sep 05 13:55:08 2020 +0000
+++ b/external/gpl3/gcc/usr.bin/Makefile.backend        Sat Sep 05 14:24:25 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.backend,v 1.8 2019/02/01 10:34:18 mrg Exp $
+#      $NetBSD: Makefile.backend,v 1.9 2020/09/05 14:24:25 mrg Exp $
 
 .ifndef _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_BACKEND_
 _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_BACKEND_=1
@@ -15,6 +15,7 @@
 DPADD+=                        ${BACKENDOBJ}/libbackend.a
 LDADD+=                        ${BACKENDOBJ}/libbackend.a
 
+.include "../Makefile.common-target"
 .include "../Makefile.common"
 .include "../Makefile.libiberty"
 .include "../Makefile.prog"
diff -r a7d74b3269d1 -r 848e70af8635 external/gpl3/gcc/usr.bin/backend/Makefile
--- a/external/gpl3/gcc/usr.bin/backend/Makefile        Sat Sep 05 13:55:08 2020 +0000
+++ b/external/gpl3/gcc/usr.bin/backend/Makefile        Sat Sep 05 14:24:25 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.60 2020/09/05 09:50:16 mrg Exp $
+#      $NetBSD: Makefile,v 1.61 2020/09/05 14:24:26 mrg Exp $
 
 LIBISPRIVATE=  yes
 
@@ -312,6 +312,13 @@
 build-vec.lo: ${HH_NORTL}
 CLEANFILES+=   build-vec.c
 
+build-sort.cc: sort.cc sort.h ${G_GGC_H}
+       ${_MKTARGET_CREATE}
+       rm -f build-sort.cc
+       cat ${GNUHOSTDIST}/gcc/sort.cc >${.TARGET}
+build-sort.lo: ${HH_NORTL}
+CLEANFILES+=   build-sort.cc
+
 build-genattrtab.o: ${G_GGC_H}
 
 #
@@ -334,15 +341,13 @@
 #
 # First we generate the rules for the generators.
 #
-GENDEPS.cfn-macros=    build-sort.lo
-
 .for f in attr attr-common attrtab automata codes conditions config emit \
          extract flags opinit output peep preds recog mddump condmd \
          target-def cfn-macros
-gen${f}.lo: ${HH} gen${f}.c ${G_RTL_BASE_H} ${GENDEPS.${f}}
+gen${f}.lo: ${HH} gen${f}.c ${G_RTL_BASE_H} build-sort.lo
 gen${f}: gen${f}.lo ${GENPROG_RTL_DEPENDS} 
        ${_MKTARGET_LINK}
-       ${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} ${LDFLAGS.${.TARGET}}
+       ${HOST_LINK.cc} -o ${.TARGET} ${.ALLSRC} ${NBCOMPATLIB} ${HOSTLIBIBERTY} ${LDFLAGS.${.TARGET}} build-sort.lo
 CLEANFILES+=   gen${f} gen${f}.lo
 .endfor
 
@@ -489,7 +494,7 @@
 df-scan.d df-scan.o: target-hooks-def.h
 read-md.d read-md.o read-md.lo: auto-build.h
 hash-table.d hash-table.o hash-table.lo: auto-build.h gtype-desc.h
-gencfn-macros.d gencfn-macros.o gencfn-macros.lo: gtype-desc.h case-cfn-macros.h
+gencfn-macros.d gencfn-macros.o gencfn-macros.lo: gtype-desc.h
 pass_manager.h passes.c: pass-instances.def
 context.d coverage.d lto-cgraph.d passes.d statistics.d toplev.d cgraphunit.d: pass_manager.h
 context.o coverage.o lto-cgraph.o passes.o statistics.o toplev.o cgraphunit.o: pass_manager.h
diff -r a7d74b3269d1 -r 848e70af8635 external/gpl3/gcc/usr.bin/cc1/Makefile
--- a/external/gpl3/gcc/usr.bin/cc1/Makefile    Sat Sep 05 13:55:08 2020 +0000
+++ b/external/gpl3/gcc/usr.bin/cc1/Makefile    Sat Sep 05 14:24:25 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.18 2020/06/29 08:34:17 lukem Exp $
+#      $NetBSD: Makefile,v 1.19 2020/09/05 14:24:26 mrg Exp $
 
 PROG=          cc1
 SRCS=          ${G_C_OBJS:S,c-family/,,:S,c/,,:S,known-headers.o,known-headers.cc,:S,c-spellcheck.o,c-spellcheck.cc,:Nlibcpp.a:.o=.c}
@@ -7,17 +7,14 @@
 
 .include "../Makefile.backend"
 .include "../Makefile.backtrace"
-.include "../Makefile.common"
-.include "../Makefile.common-target"
 .include "../Makefile.libcpp"
 .include "../Makefile.libdecnumber"
-.include "../Makefile.libiberty"
 
 CHECKSUM_OBJS= ${BACKENDOBJ}/libbackend.a \
                main.o \
                ${LIBBACKTRACEOBJ}/libbacktrace.a \
+               ${COMMONTARGETOBJ}/libcommon-target.a \
                ${COMMONOBJ}/libcommon.a \
-               ${COMMONTARGETOBJ}/libcommon-target.a \
                ${LIBCPPOBJ}/libcpp.a \
                ${LIBDECNUMBEROBJ}/libdecnumber.a \
                ${LIBIBERTYOBJ}/libiberty.a \
diff -r a7d74b3269d1 -r 848e70af8635 external/gpl3/gcc/usr.bin/cc1obj/Makefile
--- a/external/gpl3/gcc/usr.bin/cc1obj/Makefile Sat Sep 05 13:55:08 2020 +0000
+++ b/external/gpl3/gcc/usr.bin/cc1obj/Makefile Sat Sep 05 14:24:25 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.16 2020/06/29 08:34:17 lukem Exp $
+#      $NetBSD: Makefile,v 1.17 2020/09/05 14:24:26 mrg Exp $
 
 MYOBJS=                ${G_OBJC_OBJS} ${G_C_AND_OBJC_OBJS} 
 PROG=          cc1obj
@@ -10,17 +10,14 @@
 
 .include "../Makefile.backend"
 .include "../Makefile.backtrace"
-.include "../Makefile.common"
-.include "../Makefile.common-target"
 .include "../Makefile.libcpp"
 .include "../Makefile.libdecnumber"
-.include "../Makefile.libiberty"
 
 CHECKSUM_OBJS= ${BACKENDOBJ}/libbackend.a \
                main.o \
                ${LIBBACKTRACEOBJ}/libbacktrace.a \
+               ${COMMONTARGETOBJ}/libcommon-target.a \
                ${COMMONOBJ}/libcommon.a \
-               ${COMMONTARGETOBJ}/libcommon-target.a \
                ${LIBCPPOBJ}/libcpp.a \
                ${LIBDECNUMBEROBJ}/libdecnumber.a \
                ${LIBIBERTYOBJ}/libiberty.a \
diff -r a7d74b3269d1 -r 848e70af8635 external/gpl3/gcc/usr.bin/cc1plus/Makefile
--- a/external/gpl3/gcc/usr.bin/cc1plus/Makefile        Sat Sep 05 13:55:08 2020 +0000
+++ b/external/gpl3/gcc/usr.bin/cc1plus/Makefile        Sat Sep 05 14:24:25 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.13 2020/06/29 08:34:17 lukem Exp $
+#      $NetBSD: Makefile,v 1.14 2020/09/05 14:24:26 mrg Exp $
 
 PROG=          cc1plus
 SRCS=          ${G_CXX_OBJS:S,c-family/,,:S,cp/,,:S,constraint.o,constraint.cc,:S,logic.o,logic.cc,:S,known-headers.o,known-headers.cc,:S,c-spellcheck.o,c-spellcheck.cc,:Nlibcpp.a:.o=.c}
@@ -12,15 +12,12 @@
 
 .include "../Makefile.backend"
 .include "../Makefile.backtrace"
-.include "../Makefile.common"
-.include "../Makefile.common-target"
 .include "../Makefile.libcpp"
 .include "../Makefile.libdecnumber"
-.include "../Makefile.libiberty"
 
 CHECKSUM_OBJS= ${LIBBACKTRACEOBJ}/libbacktrace.a \
+               ${COMMONTARGETOBJ}/libcommon-target.a \
                ${COMMONOBJ}/libcommon.a \
-               ${COMMONTARGETOBJ}/libcommon-target.a \
                ${LIBCPPOBJ}/libcpp.a \
                ${LIBDECNUMBEROBJ}/libdecnumber.a \
                ${LIBIBERTYOBJ}/libiberty.a \
diff -r a7d74b3269d1 -r 848e70af8635 external/gpl3/gcc/usr.bin/common/Makefile
--- a/external/gpl3/gcc/usr.bin/common/Makefile Sat Sep 05 13:55:08 2020 +0000
+++ b/external/gpl3/gcc/usr.bin/common/Makefile Sat Sep 05 14:24:25 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.9 2019/02/04 04:49:20 mrg Exp $
+#      $NetBSD: Makefile,v 1.10 2020/09/05 14:24:26 mrg Exp $
 
 LIBISPRIVATE=  yes
 
@@ -8,7 +8,7 @@
 LIB=           common
 
 .include "${.CURDIR}/defs.mk"
-SRCS=  ${G_OBJS-libcommon:S/memory-block.o/memory-block.cc/:.o=.c}
+SRCS=  ${G_OBJS-libcommon:S/memory-block.o/memory-block.cc/:S/diagnostic-format-json.o/diagnostic-format-json.cc/:S/sort.o/sort.cc/:S/json.o/json.cc/:.o=.c}
 
 # XXX make sure this doesn't have more than it needs
 CPPFLAGS+=     -I${GCCARCH} -I${BACKENDOBJ} -I. \
diff -r a7d74b3269d1 -r 848e70af8635 external/gpl3/gcc/usr.bin/gcov/Makefile
--- a/external/gpl3/gcc/usr.bin/gcov/Makefile   Sat Sep 05 13:55:08 2020 +0000
+++ b/external/gpl3/gcc/usr.bin/gcov/Makefile   Sat Sep 05 14:24:25 2020 +0000
@@ -1,9 +1,9 @@
-#      $NetBSD: Makefile,v 1.10 2020/09/05 09:50:16 mrg Exp $
+#      $NetBSD: Makefile,v 1.11 2020/09/05 14:24:26 mrg Exp $
 
 .include <bsd.init.mk>
 
 PROG=           gcov
-SRCS=          ${G_GCOV_OBJS:.o=.c}
+SRCS=          ${G_GCOV_OBJS:S/json.o/json.cc/:.o=.c}
 
 CPPFLAGS+=     -I${GCCARCH} -I${BACKENDOBJ} ${G_ALL_CFLAGS:M-D*} ${G_INCLUDES:M-I*:N-I.*}
 DPADD+=                ${LIBZ}
diff -r a7d74b3269d1 -r 848e70af8635 external/gpl3/gcc/usr.bin/lto1/Makefile
--- a/external/gpl3/gcc/usr.bin/lto1/Makefile   Sat Sep 05 13:55:08 2020 +0000
+++ b/external/gpl3/gcc/usr.bin/lto1/Makefile   Sat Sep 05 14:24:25 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.4 2016/03/24 00:02:52 christos Exp $
+#      $NetBSD: Makefile,v 1.5 2020/09/05 14:24:26 mrg Exp $
 
 PROG=          lto1
 SRCS=          lto-partition.c \
@@ -16,11 +16,8 @@
 
 .include "../Makefile.backend"
 .include "../Makefile.backtrace"
-.include "../Makefile.common"
-.include "../Makefile.common-target"
 .include "../Makefile.libcpp"
 .include "../Makefile.libdecnumber"
-.include "../Makefile.libiberty"
 
 .if ${MACHINE_ARCH} == "vax"
 COPTS.lto-lang.c+=-O0



Home | Main Index | Thread Index | Old Index