aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenzo Salvadore <salvadore@FreeBSD.org>2023-05-04 21:09:49 +0000
committerLorenzo Salvadore <salvadore@FreeBSD.org>2023-05-12 15:33:40 +0000
commit09cfc2a3caa4093efcd3cae6bb7ee566d9e1a930 (patch)
tree356f6fdd894f251c0afd7b3825de0258592a10b4
parentd409533024677c309caf9aa80949342a811b3f9a (diff)
downloadports-09cfc2a3caa4093efcd3cae6bb7ee566d9e1a930.tar.gz
ports-09cfc2a3caa4093efcd3cae6bb7ee566d9e1a930.zip
lang/gcc11-devel: Enable support for .init_array and .fini_array
Enable support for .init_array and .fini_array, which FreeBSD supports since commit 83aa9cc00c2d83d05a0efe7a1496d8aab4a153bb in the src repository. There __FreeBSD_version is 1000009, so we start enabling the support from __FreeBSD_version == 1000010. Reported by: Dan McGregor <dan.mcgregor@usask.ca> Reviewed by: Dan McGregor <dan.mcgregor@usask.ca>, gerald Differential Revision: https://reviews.freebsd.org/D39968
-rw-r--r--lang/gcc11-devel/Makefile1
-rw-r--r--lang/gcc11-devel/files/patch-gcc_configure20
2 files changed, 21 insertions, 0 deletions
diff --git a/lang/gcc11-devel/Makefile b/lang/gcc11-devel/Makefile
index f43128d7874c..501a1887563f 100644
--- a/lang/gcc11-devel/Makefile
+++ b/lang/gcc11-devel/Makefile
@@ -1,5 +1,6 @@
PORTNAME= gcc
PORTVERSION= 11.3.1.s20230504
+PORTREVISION= 1
CATEGORIES= lang
MASTER_SITES= GCC/snapshots/${DIST_VERSION}
PKGNAMESUFFIX= ${SUFFIX}-devel
diff --git a/lang/gcc11-devel/files/patch-gcc_configure b/lang/gcc11-devel/files/patch-gcc_configure
new file mode 100644
index 000000000000..d4e7e8d23e60
--- /dev/null
+++ b/lang/gcc11-devel/files/patch-gcc_configure
@@ -0,0 +1,20 @@
+Enable support for .init_array and .fini_array, which FreeBSD supports
+since commit 83aa9cc00c2d83d05a0efe7a1496d8aab4a153bb in the src
+repository.
+
+There __FreeBSD_version is 1000009, so we start enabling the support
+from __FreeBSD_version == 1000010.
+--- gcc/configure.orig 2023-05-04 17:36:54 UTC
++++ gcc/configure
+@@ -24214,6 +24214,11 @@ EOF
+ #else
+ # if defined __sun__ && defined __svr4__
+ /* Solaris ld.so.1 supports .init_array/.fini_array since Solaris 8. */
++# elif defined __FreeBSD__
++# include <sys/param.h>
++# if __FreeBSD_version >= 1000010
++ /* FreeBSD supports .init_array/.fini_array since FreeBSD 10. */
++# endif
+ # else
+ # error The C library not known to support .init_array/.fini_array
+ # endif