The hack below was sufficient to let lang/gcc build using llvm-13, but
wasn't enough anymore since llvm-16, so I worked around the
gcc_except_table problem in ld.lld instead. The hack can now be cleaned
up. The REVISION bump probably doesn't bring much but can't hurt.
ok?
Index: 11/Makefile
===================================================================
RCS file: /cvs/ports/lang/gcc/11/Makefile,v
diff -u -p -r1.24 Makefile
--- 11/Makefile 14 Dec 2023 11:16:25 -0000 1.24
+++ 11/Makefile 19 Dec 2023 15:03:30 -0000
@@ -18,7 +18,7 @@ USE_NOEXECONLY = Yes
V = 11.2.0
FULL_VERSION = $V
FULL_PKGVERSION = $V
-REVISION = 9
+REVISION = 10
ADASTRAP-amd64 = adastrap-amd64-$V-3.tar.xz
ADASTRAP-arm = adastrap-arm-4.9.4-0.tar.xz
@@ -243,13 +243,6 @@ LIB_DEPENDS-libs =
.if ${MACHINE_ARCH:Mamd64}
CONFIG = x86_64-unknown-openbsd${OSREV}
-.endif
-
-.if ${MACHINE_ARCH} == "riscv64"
-# lld complains about .gcc_except_table referencing
-# symbols in discarded sections. Tell gcc to split .gcc_except_table
-# so that its unused parts can also be discarded.
-EXTRA_ENV += PORTS_FORCE_SPLIT_SECTIONS="-ffunction-sections -fdata-sections"
.endif
post-extract:
Index: 11/patches/patch-libcc1_Makefile_in
===================================================================
RCS file: /cvs/ports/lang/gcc/11/patches/patch-libcc1_Makefile_in,v
diff -u -p -r1.3 patch-libcc1_Makefile_in
--- 11/patches/patch-libcc1_Makefile_in 19 Sep 2022 22:17:34 -0000 1.3
+++ 11/patches/patch-libcc1_Makefile_in 19 Dec 2023 15:08:39 -0000
@@ -1,19 +1,6 @@
-First hunk: lld complains about .gcc_except_table referencing
-symbols in discarded sections. Tell gcc to split .gcc_except_table
-so that its unused parts can also be discarded.
-
Index: libcc1/Makefile.in
--- libcc1/Makefile.in.orig
+++ libcc1/Makefile.in
-@@ -387,7 +387,7 @@ CPPFLAGS_FOR_C_FAMILY = -I $(srcdir)/../gcc/c-family \
- CPPFLAGS_FOR_C = $(CPPFLAGS_FOR_C_FAMILY) -I $(srcdir)/../gcc/c
- CPPFLAGS_FOR_CXX = $(CPPFLAGS_FOR_C_FAMILY) -I $(srcdir)/../gcc/cp
- AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR) $(visibility) $(CET_HOST_FLAGS) \
-- $(am__append_1)
-+ $(am__append_1) $(PORTS_FORCE_SPLIT_SECTIONS)
- # Can be simplified when libiberty becomes a normal convenience library.
- libiberty_normal = ../libiberty/libiberty.a
- libiberty_noasan = ../libiberty/noasan/libiberty.a
@@ -405,6 +405,8 @@ cc1libdir = $(libdir)/$(libsuffix)
shared_source = callbacks.cc callbacks.hh connection.cc connection.hh \
marshall.cc marshall.hh rpc.hh status.hh
Index: 8/Makefile
===================================================================
RCS file: /cvs/ports/lang/gcc/8/Makefile,v
diff -u -p -r1.69 Makefile
--- 8/Makefile 14 Dec 2023 11:16:25 -0000 1.69
+++ 8/Makefile 20 Dec 2023 15:57:38 -0000
@@ -23,7 +23,7 @@ USE_NOEXECONLY = Yes
V = 8.4.0
FULL_VERSION = $V
FULL_PKGVERSION = $V
-REVISION = 18
+REVISION = 19
ADASTRAP-amd64 = adastrap-amd64-$V-2.tar.xz
ADASTRAP-arm = adastrap-arm-4.9.4-0.tar.xz
@@ -214,13 +214,6 @@ LIB_DEPENDS-libs =
.if ${MACHINE_ARCH:Mamd64}
CONFIG = x86_64-unknown-openbsd${OSREV}
-.endif
-
-.if ${MACHINE_ARCH} == "riscv64"
-# lld complains about .gcc_except_table referencing
-# symbols in discarded sections. Tell gcc to split .gcc_except_table
-# so that its unused parts can also be discarded.
-EXTRA_ENV += PORTS_FORCE_SPLIT_SECTIONS="-ffunction-sections -fdata-sections"
.endif
post-extract:
Index: 8/patches/patch-libcc1_Makefile_in
===================================================================
RCS file: /cvs/ports/lang/gcc/8/patches/patch-libcc1_Makefile_in,v
diff -u -p -r1.3 patch-libcc1_Makefile_in
--- 8/patches/patch-libcc1_Makefile_in 13 Sep 2022 20:31:57 -0000 1.3
+++ 8/patches/patch-libcc1_Makefile_in 19 Dec 2023 15:09:38 -0000
@@ -1,19 +1,6 @@
-First hunk: lld complains about .gcc_except_table referencing
-symbols in discarded sections. Tell gcc to split .gcc_except_table
-so that its unused parts can also be discarded.
-
Index: libcc1/Makefile.in
--- libcc1/Makefile.in.orig
+++ libcc1/Makefile.in
-@@ -292,7 +292,7 @@ CPPFLAGS_FOR_C_FAMILY = -I $(srcdir)/../gcc/c-family \
-
- CPPFLAGS_FOR_C = $(CPPFLAGS_FOR_C_FAMILY) -I $(srcdir)/../gcc/c
- CPPFLAGS_FOR_CXX = $(CPPFLAGS_FOR_C_FAMILY) -I $(srcdir)/../gcc/cp
--AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR) $(visibility)
-+AM_CXXFLAGS = $(WARN_FLAGS) $(WERROR) $(visibility) $(PORTS_FORCE_SPLIT_SECTIONS)
- # Can be simplified when libiberty becomes a normal convenience library.
- libiberty_normal = ../libiberty/libiberty.a
- libiberty_noasan = ../libiberty/noasan/libiberty.a
@@ -310,6 +310,8 @@ cc1libdir = $(libdir)/$(libsuffix)
shared_source = callbacks.cc callbacks.hh connection.cc connection.hh \
marshall.cc marshall.hh rpc.hh status.hh
--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
No comments:
Post a Comment