From 40f0590fd9eaa000d160c832727428d2dd559129 Mon Sep 17 00:00:00 2001 From: zrj Date: Wed, 2 May 2018 16:42:24 +0300 Subject: [PATCH] gcc80: Hook into the buildworld as optional compiler. This alternative compiler can be activated by WORLD_ALTCOMPILER variable. It will not be built by default. --- Makefile.inc1 | 23 ++++++++++++++ etc/mtree/BSD.include.dist | 76 ++++++++++++++++++++++++++++++++++++++++++++++ etc/mtree/BSD.usr.dist | 28 +++++++++++++++++ gnu/lib/Makefile | 3 ++ gnu/usr.bin/Makefile | 4 +++ share/mk/Makefile | 1 + share/mk/bsd.README | 1 + share/mk/bsd.cpu.mk | 2 ++ 8 files changed, 138 insertions(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index 35cfbfb4d1..5235b46c04 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -937,6 +937,12 @@ _gcc47_tools= gnu/usr.bin/cc47/cc_prep gnu/usr.bin/cc47/cc_tools _altcompiler_cross+= ${_gcc47_cross} _altcompiler_tools+= _gcc47_tools . endif +. if defined(WORLD_ALTCOMPILER) && (${WORLD_ALTCOMPILER} == "all" || ${WORLD_ALTCOMPILER:Mgcc80}) +_gcc80_cross= gnu/usr.bin/cc80 +_gcc80_tools= gnu/usr.bin/cc80/cc_prep gnu/usr.bin/cc80/cc_tools +_altcompiler_cross+= ${_gcc80_cross} +_altcompiler_tools+= _gcc80_tools +. endif .endif _custom_cross= libexec/customcc _binutils= gnu/usr.bin/${WORLD_BINUTILSVER} @@ -1021,6 +1027,11 @@ libraries: HOST_CCVER=${HOST_CCVER} CCVER=gcc47 \ make -f Makefile.inc1 _startup_libs47 -DSYSBUILD; . 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; +. endif .endif cd ${.CURDIR}; \ make -f Makefile.inc1 _startup_libs -DSYSBUILD; \ @@ -1051,6 +1062,18 @@ _startup_libs50= gnu/usr.bin/cc50/cc_prep \ gnu/lib/gcc50/libgcc \ gnu/lib/gcc50/libgcc_eh \ gnu/lib/gcc50/libgcc_pic +_startup_libs80= gnu/usr.bin/cc80/cc_prep \ + gnu/usr.bin/cc80/cc_tools \ + gnu/lib/gcc80/csu \ + gnu/lib/gcc80/libgcc \ + gnu/lib/gcc80/libgcc_eh \ + gnu/lib/gcc80/libgcc_pic +.if !defined(NO_ALTCOMPILER) +. if defined(WORLD_ALTCOMPILER) && (${WORLD_ALTCOMPILER} == "all" || ${WORLD_ALTCOMPILER:Mgcc80}) +_startup_libs_alt+= _startup_libs80 +. endif +.endif + _startup_libs= lib/csu lib/libc lib/libc_rtld _prebuild_libs= lib/libbz2 lib/libz diff --git a/etc/mtree/BSD.include.dist b/etc/mtree/BSD.include.dist index d4cad98440..ca12541fbf 100644 --- a/etc/mtree/BSD.include.dist +++ b/etc/mtree/BSD.include.dist @@ -170,6 +170,82 @@ tr2 .. .. + 8.0 + backward + .. + bits + .. + debug + .. + decimal + .. + experimental + bits + .. + .. + ext + pb_ds + detail + bin_search_tree_ + .. + binary_heap_ + .. + binomial_heap_ + .. + binomial_heap_base_ + .. + branch_policy + .. + cc_hash_table_map_ + .. + eq_fn + .. + gp_hash_table_map_ + .. + hash_fn + .. + left_child_next_sibling_heap_ + .. + list_update_map_ + .. + list_update_policy + .. + ov_tree_map_ + .. + pairing_heap_ + .. + pat_trie_ + .. + rb_tree_map_ + .. + rc_binomial_heap_ + .. + resize_policy + .. + splay_tree_ + .. + thin_heap_ + .. + tree_policy + .. + trie_policy + .. + unordered_iterator + .. + .. + .. + .. + parallel + .. + profile + impl + .. + .. + tr1 + .. + tr2 + .. + .. .. cpu .. diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index 39b448402d..2e984ddeca 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -50,6 +50,28 @@ profile .. .. + gcc80 + plugin + include + ada + gcc-interface + .. + .. + objc + .. + c-family + .. + config + i386 + .. + .. + cp + .. + .. + .. + profile + .. + .. i18n .. priv @@ -80,6 +102,10 @@ ssp .. .. + gcc80 + ssp + .. + .. pkgconfig .. .. @@ -110,6 +136,8 @@ .. gcc50 .. + gcc80 + .. lpr ru .. diff --git a/gnu/lib/Makefile b/gnu/lib/Makefile index a424f4aa5e..ae2f11edeb 100644 --- a/gnu/lib/Makefile +++ b/gnu/lib/Makefile @@ -4,6 +4,9 @@ SUBDIR= gcc50 libcryptsetup libdevmapper libdialog libluks liblvm . if defined(WORLD_ALTCOMPILER) && (${WORLD_ALTCOMPILER} == "all" || ${WORLD_ALTCOMPILER:Mgcc47}) SUBDIR+= gcc47 . endif +. if defined(WORLD_ALTCOMPILER) && (${WORLD_ALTCOMPILER} == "all" || ${WORLD_ALTCOMPILER:Mgcc80}) +SUBDIR+= gcc80 +. endif .endif SUBDIR_ORDERED= diff --git a/gnu/usr.bin/Makefile b/gnu/usr.bin/Makefile index 4bcee4f83e..0f20baa670 100644 --- a/gnu/usr.bin/Makefile +++ b/gnu/usr.bin/Makefile @@ -27,6 +27,10 @@ SUBDIR+= cc50 SUBDIR+= cc47 _altcompiler_dirs+= cc47 . endif +. if defined(WORLD_ALTCOMPILER) && (${WORLD_ALTCOMPILER} == "all" || ${WORLD_ALTCOMPILER:Mgcc80}) +SUBDIR+= cc80 +_altcompiler_dirs+= cc80 +. endif .endif .ORDER: ${BU_PRIMARY} gmp mpfr mpc cc50 ${_altcompiler_dirs} diff --git a/share/mk/Makefile b/share/mk/Makefile index 9afd8ed4e8..7a5c23c267 100644 --- a/share/mk/Makefile +++ b/share/mk/Makefile @@ -4,6 +4,7 @@ FILES= bsd.README FILES+= bsd.cpu.mk bsd.cpu.gcc47.mk bsd.cpu.custom.mk FILES+= bsd.cpu.gcc50.mk +FILES+= bsd.cpu.gcc80.mk FILES+= bsd.cpu.clang.mk FILES+= bsd.dep.mk bsd.doc.mk bsd.files.mk bsd.patch.mk FILES+= bsd.incs.mk bsd.init.mk diff --git a/share/mk/bsd.README b/share/mk/bsd.README index 5cbeb8c2ab..268063a1b7 100644 --- a/share/mk/bsd.README +++ b/share/mk/bsd.README @@ -19,6 +19,7 @@ bsd.lib.mk. bsd.cpu.custom.mk - handle CPU flags for custom compilers bsd.cpu.gcc47.mk - handle GCC 4.7 specific CPU flags & variables bsd.cpu.gcc50.mk - handle GCC 5.0 specific CPU flags & variables +bsd.cpu.gcc80.mk - handle GCC 8.0 specific CPU flags & variables bsd.cpu.mk - handle CPU flags & variables bsd.crunchgen.mk - building crunched binaries using crunchgen(1) bsd.dep.mk - handle Makefile dependencies diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk index 2d2c59cf3f..faa624d01b 100644 --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -44,6 +44,8 @@ CPUTYPE= ${FORCE_CPUTYPE} . include .elif ${CCVER} == gcc50 . include +.elif ${CCVER} == gcc80 +. include .elif ${CCVER:Mclang*} . include .else -- 2.11.4.GIT