Date: Sat, 25 Apr 2020 12:26:34 +0000 (UTC) From: Piotr Kubaj <pkubaj@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r532950 - in head/lang/gcc9: . files Message-ID: <202004251226.03PCQYa1050224@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pkubaj Date: Sat Apr 25 12:26:34 2020 New Revision: 532950 URL: https://svnweb.freebsd.org/changeset/ports/532950 Log: lang/gcc9: build with base GCC on powerpc64 elfv1 Instead of using lang/gcc8 for bootstrapping gcc9 on powerpc64 elfv1, use directly base gcc. Necessary changes: - CFLAGS_FOR_TARGET="-O0" CXXFLAGS_FOR_TARGET="-O0" BOOT_CFLAGS="-O0" in CONFIGURE_ENV and MAKE_ENV. Otherwise bootstrapped compiler fails later in the build with segfault. - CRTSTUFF_T_CFLAGS has changed optimizations to -O0, instead of -O2. -O2 worked in gcc8, because there was no -fno-asynchronous-unwind-tables flag added to CRTSTUFF_T_CFLAGS. Since this works when building with clang on powerpc64 elfv2, this patch is added to EXTRA_PATCHES, only on powerpc64 elfv1, - BOOT_CFLAGS has added ? before =. This is to allow overriding BOOT_CFLAGS in CONFIGURE_ENV and MAKE_ENV. - A patch by Gustavo Romero to gcc/dumpfile.c is necessary to allow compiling with base GCC, otherwise base GCC hits ICE. Incidentally, this patch alone also fixes build for powerpc (32 bits) with base GCC. Bump PORTREVISION for dependency change. PR: 245511, 242506 Approved by: gerald (maintainer timeout) Added: head/lang/gcc9/files/extra-patch-libgcc_config_rs6000_t-crtstuff (contents, props changed) head/lang/gcc9/files/patch-Makefile.in (contents, props changed) head/lang/gcc9/files/patch-gcc_dumpfile.c (contents, props changed) Modified: head/lang/gcc9/Makefile Modified: head/lang/gcc9/Makefile ============================================================================== --- head/lang/gcc9/Makefile Sat Apr 25 12:26:07 2020 (r532949) +++ head/lang/gcc9/Makefile Sat Apr 25 12:26:34 2020 (r532950) @@ -3,6 +3,7 @@ PORTNAME= gcc PORTVERSION= 9.3.0 +PORTREVISION= 1 CATEGORIES= lang MASTER_SITES= GCC PKGNAMESUFFIX= ${SUFFIX} @@ -66,7 +67,9 @@ CONFIGURE_ENV+= UNAME_m="powerpc64" . if defined(PPC_ABI) && ${PPC_ABI} == ELFv2 CONFIGURE_ARGS+= --with-abi=elfv2 . else -USE_GCC= 8 +CONFIGURE_ENV+= CFLAGS_FOR_TARGET="-O0" CXXFLAGS_FOR_TARGET="-O0" BOOT_CFLAGS="-O0" +MAKE_ENV+= CFLAGS_FOR_TARGET="-O0" CXXFLAGS_FOR_TARGET="-O0" BOOT_CFLAGS="-O0" +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-libgcc_config_rs6000_t-crtstuff . endif .endif Added: head/lang/gcc9/files/extra-patch-libgcc_config_rs6000_t-crtstuff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/gcc9/files/extra-patch-libgcc_config_rs6000_t-crtstuff Sat Apr 25 12:26:34 2020 (r532950) @@ -0,0 +1,8 @@ +--- libgcc/config/rs6000/t-crtstuff.orig 2020-04-07 15:17:50 UTC ++++ libgcc/config/rs6000/t-crtstuff +@@ -3,4 +3,4 @@ + # Do not build crtend.o with -Os as that can result in references to + # out-of-line register save/restore functions, which may be unresolved + # as crtend.o is linked after libgcc.a. See PR45053. +-CRTSTUFF_T_CFLAGS = -msdata=none -O2 -fno-asynchronous-unwind-tables ++CRTSTUFF_T_CFLAGS = -msdata=none -O0 -fno-asynchronous-unwind-tables Added: head/lang/gcc9/files/patch-Makefile.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/gcc9/files/patch-Makefile.in Sat Apr 25 12:26:34 2020 (r532950) @@ -0,0 +1,11 @@ +--- Makefile.in.orig 2020-04-08 13:04:40 UTC ++++ Makefile.in +@@ -372,7 +372,7 @@ BUILD_PREFIX_1 = @BUILD_PREFIX_1@ + + # Flags to pass to stage2 and later makes. They are defined + # here so that they can be overridden by Makefile fragments. +-BOOT_CFLAGS= -g -O2 ++BOOT_CFLAGS?= -g -O2 + BOOT_LDFLAGS= + BOOT_ADAFLAGS= -gnatpg + Added: head/lang/gcc9/files/patch-gcc_dumpfile.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/gcc9/files/patch-gcc_dumpfile.c Sat Apr 25 12:26:34 2020 (r532950) @@ -0,0 +1,11 @@ +--- gcc/dumpfile.c.orig 2020-04-07 14:09:14 UTC ++++ gcc/dumpfile.c +@@ -2055,7 +2055,7 @@ temp_dump_context::temp_dump_context (bool forcibly_en + bool forcibly_enable_dumping, + dump_flags_t test_pp_flags) + : m_context (), +- m_saved (&dump_context ().get ()) ++ m_saved(&dump_context::get()) + { + dump_context::s_current = &m_context; + if (forcibly_enable_optinfo)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004251226.03PCQYa1050224>