lang/gcc12-devel: Fix enable init_array patch

Add an error line that was missing in case _FreeBSD_version < 1000010.

Reported by:    gnikl@users.sourceforge.net
Fixes:  8c2a479977 lang/gcc12-devel: Enable support for .init_array and .fini_array
This commit is contained in:
Lorenzo Salvadore 2023-05-20 02:38:33 +02:00
parent 6b83e78072
commit 779e8ab260
No known key found for this signature in database
GPG key ID: B58F7C3CF6DB8A38
2 changed files with 5 additions and 2 deletions

View file

@ -1,5 +1,6 @@
PORTNAME= gcc
PORTVERSION= 12.3.1.s20230512
PORTREVISION= 1
CATEGORIES= lang
MASTER_SITES= GCC/snapshots/${DIST_VERSION}
PKGNAMESUFFIX= ${SUFFIX}-devel

View file

@ -4,9 +4,9 @@ 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.orig 2023-05-11 22:33:34 UTC
+++ gcc/configure
@@ -24214,6 +24214,11 @@ EOF
@@ -24214,6 +24214,13 @@ EOF
#else
# if defined __sun__ && defined __svr4__
/* Solaris ld.so.1 supports .init_array/.fini_array since Solaris 8. */
@ -14,6 +14,8 @@ from __FreeBSD_version == 1000010.
+# 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