From 119005782c12cf218e384004295c0a7804f35647 Mon Sep 17 00:00:00 2001 From: zrj Date: Thu, 24 May 2018 15:35:30 +0300 Subject: [PATCH] gcc80: Shorten build time in libraries target. When compiling compiler libraries build the minimal set of tools required to generated the needed headers. Rest of the tools including libcpp.na will be built during more parallel gnu/usr.bin stage. Shaves off ~30s from make buildworld. While there, do the same for gcc47 and gcc50. Also clean stale file. --- Makefile.inc1 | 6 +++--- gnu/lib/gcc50/libgcov/Makefile | 2 ++ gnu/usr.bin/cc47/cc_tools/tools/Makefile | 4 ++++ gnu/usr.bin/cc50/cc_tools/Makefile | 4 ++++ gnu/usr.bin/cc50/cc_tools/tools/Makefile | 8 ++++++++ gnu/usr.bin/cc80/cc_tools/Makefile | 4 ++++ gnu/usr.bin/cc80/cc_tools/tools/Makefile | 8 ++++++++ 7 files changed, 33 insertions(+), 3 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 2534f677ef..9f61dfddae 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1018,17 +1018,17 @@ hierarchy: libraries: cd ${.CURDIR}; \ HOST_CCVER=${HOST_CCVER} CCVER=gcc50 \ - make -f Makefile.inc1 _startup_libs50 -DSYSBUILD; + make -f Makefile.inc1 _startup_libs50 -DSYSBUILD -DLIBGCC_ONLY; .if !defined(NO_ALTCOMPILER) . if defined(WORLD_ALTCOMPILER) && (${WORLD_ALTCOMPILER} == "all" || ${WORLD_ALTCOMPILER:Mgcc47}) cd ${.CURDIR}; \ HOST_CCVER=${HOST_CCVER} CCVER=gcc47 \ - make -f Makefile.inc1 _startup_libs47 -DSYSBUILD; + make -f Makefile.inc1 _startup_libs47 -DSYSBUILD -DLIBGCC_ONLY; . endif . if defined(WORLD_ALTCOMPILER) && (${WORLD_ALTCOMPILER} == "all" || ${WORLD_ALTCOMPILER:Mgcc80}) cd ${.CURDIR}; \ HOST_CCVER=${HOST_CCVER} CCVER=gcc80 \ - make -f Makefile.inc1 _startup_libs80 -DSYSBUILD; + make -f Makefile.inc1 _startup_libs80 -DSYSBUILD -DLIBGCC_ONLY; . endif .endif cd ${.CURDIR}; \ diff --git a/gnu/lib/gcc50/libgcov/Makefile b/gnu/lib/gcc50/libgcov/Makefile index aeb0fb4a5a..cca63462de 100644 --- a/gnu/lib/gcc50/libgcov/Makefile +++ b/gnu/lib/gcc50/libgcov/Makefile @@ -86,4 +86,6 @@ ${LIBGCOV_DRIVER:S/$/.So/}: ${GCCDIR}/libgcc/libgcov-driver.c ${CC} ${PICFLAG} -DPIC ${SHARED_CFLAGS} ${CFLAGS} -DL${.TARGET:R} -c ${.ALLSRC} \ -o ${.TARGET} +CLEANFILES+= gthr-default.h + .include diff --git a/gnu/usr.bin/cc47/cc_tools/tools/Makefile b/gnu/usr.bin/cc47/cc_tools/tools/Makefile index 9b8f709b19..06cf95e98a 100644 --- a/gnu/usr.bin/cc47/cc_tools/tools/Makefile +++ b/gnu/usr.bin/cc47/cc_tools/tools/Makefile @@ -144,7 +144,11 @@ CLEANDIRS+= common c-family dossier: mkdir -p common c-family +.if defined(LIBGCC_ONLY) +genfiles: ${GENTOOLS:Mgcov-iov*} ${GENFILES:Mgcov-io*} +.else genfiles: ${GENTOOLS} ${GENFILES} +.endif depend all: dossier genfiles .include diff --git a/gnu/usr.bin/cc50/cc_tools/Makefile b/gnu/usr.bin/cc50/cc_tools/Makefile index 2a701769a5..e83efc4ba8 100644 --- a/gnu/usr.bin/cc50/cc_tools/Makefile +++ b/gnu/usr.bin/cc50/cc_tools/Makefile @@ -1,6 +1,10 @@ # Both libraries must be built before "tools" # Just don't define SUBDIR_ORDERED and it will build serially, correctly +.if defined(LIBGCC_ONLY) +SUBDIR= libiberty tools +.else SUBDIR= libcpp libiberty tools +.endif .include diff --git a/gnu/usr.bin/cc50/cc_tools/tools/Makefile b/gnu/usr.bin/cc50/cc_tools/tools/Makefile index 6fb92b2e9d..ab05065127 100644 --- a/gnu/usr.bin/cc50/cc_tools/tools/Makefile +++ b/gnu/usr.bin/cc50/cc_tools/tools/Makefile @@ -194,7 +194,15 @@ CLEANDIRS+= common c-family dossier: mkdir -p common c-family +.if defined(LIBGCC_ONLY) +GENLIBGCC= ${GENTOOLS:Mgenconstants*} ${GENTOOLS:Mgenmodes*} \ + ${GENTOOLS:Mgcov-iov*} \ + ${GENFILES:Minsn-constants.h} ${GENFILES:Minsn-modes.h} \ + ${GENFILES:Mgcov-iov.h} +genfiles: dossier ${GENLIBGCC} +.else genfiles: dossier ${GENTOOLS} ${GENFILES} +.endif depend all: genfiles .include diff --git a/gnu/usr.bin/cc80/cc_tools/Makefile b/gnu/usr.bin/cc80/cc_tools/Makefile index 2a701769a5..e83efc4ba8 100644 --- a/gnu/usr.bin/cc80/cc_tools/Makefile +++ b/gnu/usr.bin/cc80/cc_tools/Makefile @@ -1,6 +1,10 @@ # Both libraries must be built before "tools" # Just don't define SUBDIR_ORDERED and it will build serially, correctly +.if defined(LIBGCC_ONLY) +SUBDIR= libiberty tools +.else SUBDIR= libcpp libiberty tools +.endif .include diff --git a/gnu/usr.bin/cc80/cc_tools/tools/Makefile b/gnu/usr.bin/cc80/cc_tools/tools/Makefile index 27f229acd0..6cea1ecb97 100644 --- a/gnu/usr.bin/cc80/cc_tools/tools/Makefile +++ b/gnu/usr.bin/cc80/cc_tools/tools/Makefile @@ -222,7 +222,15 @@ CLEANDIRS+= common c-family dossier: mkdir -p common c-family +.if defined(LIBGCC_ONLY) +GENLIBGCC= ${GENTOOLS:Mgenconstants*} ${GENTOOLS:Mgenmodes*} \ + ${GENTOOLS:Mgcov-iov*} \ + ${GENFILES:Minsn-constants.h} ${GENFILES:Minsn-modes.h} \ + ${GENFILES:Mgcov-iov.h} +genfiles: dossier ${GENLIBGCC} +.else genfiles: dossier ${GENTOOLS} ${GENFILES} +.endif depend all: genfiles .include -- 2.11.4.GIT