mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-19 19:59:43 +00:00
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)
This commit is contained in:
parent
e07804c93f
commit
87082a31b8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=532950
@ -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
|
||||
|
||||
|
@ -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
|
11
lang/gcc9/files/patch-Makefile.in
Normal file
11
lang/gcc9/files/patch-Makefile.in
Normal file
@ -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
|
||||
|
11
lang/gcc9/files/patch-gcc_dumpfile.c
Normal file
11
lang/gcc9/files/patch-gcc_dumpfile.c
Normal file
@ -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)
|
Loading…
Reference in New Issue
Block a user