Skip to content

Commit

Permalink
lang/gcc14-devel: Fix enable init_array patch
Browse files Browse the repository at this point in the history
Add an error line that was missing in case _FreeBSD_version < 1000010.

Reported by:    gnikl@users.sourceforge.net
Fixes:  8a18852 lang/gcc14-devel: Enable support for .init_array and .fini_array
  • Loading branch information
lsalvadore committed May 28, 2023
1 parent 31d32a2 commit dd7afe6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions lang/gcc14-devel/Makefile
@@ -1,5 +1,6 @@
PORTNAME= gcc
PORTVERSION= 14.0.0.s20230514
PORTREVISION= 1
CATEGORIES= lang
MASTER_SITES= GCC/snapshots/${DIST_VERSION}
PKGNAMESUFFIX= ${SUFFIX}-devel
Expand Down
6 changes: 4 additions & 2 deletions lang/gcc14-devel/files/patch-gcc_configure
Expand Up @@ -4,16 +4,18 @@ 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. */
+# 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
Expand Down

0 comments on commit dd7afe6

Please sign in to comment.