summaryrefslogtreecommitdiff
path: root/lang/gcc15-devel/files/patch-gcc_configure
diff options
context:
space:
mode:
Diffstat (limited to 'lang/gcc15-devel/files/patch-gcc_configure')
-rw-r--r--lang/gcc15-devel/files/patch-gcc_configure22
1 files changed, 22 insertions, 0 deletions
diff --git a/lang/gcc15-devel/files/patch-gcc_configure b/lang/gcc15-devel/files/patch-gcc_configure
new file mode 100644
index 000000000000..cc60593ba6f7
--- /dev/null
+++ b/lang/gcc15-devel/files/patch-gcc_configure
@@ -0,0 +1,22 @@
+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-11 22:33:34 UTC
++++ gcc/configure
+@@ -24214,6 +24214,13 @@ 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. */
++# else
++# error The C library not known to support .init_array/.fini_array
++# endif
+ # else
+ # error The C library not known to support .init_array/.fini_array
+ # endif