lang/gcc12-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. See also review https://reviews.freebsd.org/D39968 for lang/gcc11-devel. Reported by: Dan McGregor <dan.mcgregor@usask.ca>
This commit is contained in:
parent
bfea52858e
commit
8c2a479977
2 changed files with 21 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
PORTNAME= gcc
|
||||
PORTVERSION= 12.2.1.s20230428
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= lang
|
||||
MASTER_SITES= GCC/snapshots/${DIST_VERSION}
|
||||
PKGNAMESUFFIX= ${SUFFIX}-devel
|
||||
|
|
20
lang/gcc12-devel/files/patch-gcc_configure
Normal file
20
lang/gcc12-devel/files/patch-gcc_configure
Normal file
|
@ -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
|
Loading…
Reference in a new issue