git: 9a71c5a6bd3b - main - lang/gcc11: Update to 11.5.0

From: Lorenzo Salvadore <salvadore_at_FreeBSD.org>
Date: Tue, 03 Sep 2024 15:45:45 UTC
The branch main has been updated by salvadore:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9a71c5a6bd3b3a5365a6a94c191f2e7472677f01

commit 9a71c5a6bd3b3a5365a6a94c191f2e7472677f01
Author:     Lorenzo Salvadore <salvadore@FreeBSD.org>
AuthorDate: 2024-08-20 14:12:21 +0000
Commit:     Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2024-09-03 15:45:41 +0000

    lang/gcc11: Update to 11.5.0
    
    Changes: https://gcc.gnu.org/gcc-11/changes.html#11.5
    
    PR:             281091
    Tested by:      exp-run (antoine)
---
 lang/gcc11/Makefile                  |  3 +--
 lang/gcc11/distinfo                  |  6 +++---
 lang/gcc11/files/patch-gcc_configure | 22 +++++++++++++++++++
 lang/gcc11/files/patch-gcc_system.h  | 42 ------------------------------------
 4 files changed, 26 insertions(+), 47 deletions(-)

diff --git a/lang/gcc11/Makefile b/lang/gcc11/Makefile
index 56ecc447de4c..be7b2ee7a7d9 100644
--- a/lang/gcc11/Makefile
+++ b/lang/gcc11/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	gcc
-PORTVERSION=	11.4.0
-PORTREVISION=	1
+PORTVERSION=	11.5.0
 CATEGORIES=	lang
 MASTER_SITES=	GCC
 PKGNAMESUFFIX=	${SUFFIX}
diff --git a/lang/gcc11/distinfo b/lang/gcc11/distinfo
index b7d650755883..1fd189e160d9 100644
--- a/lang/gcc11/distinfo
+++ b/lang/gcc11/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1692015163
-SHA256 (gcc-11.4.0.tar.xz) = 3f2db222b007e8a4a23cd5ba56726ef08e8b1f1eb2055ee72c1402cea73a8dd9
-SIZE (gcc-11.4.0.tar.xz) = 79837032
+TIMESTAMP = 1724163102
+SHA256 (gcc-11.5.0.tar.xz) = a6e21868ead545cf87f0c01f84276e4b5281d672098591c1c896241f09363478
+SIZE (gcc-11.5.0.tar.xz) = 82399864
diff --git a/lang/gcc11/files/patch-gcc_configure b/lang/gcc11/files/patch-gcc_configure
new file mode 100644
index 000000000000..cc60593ba6f7
--- /dev/null
+++ b/lang/gcc11/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
diff --git a/lang/gcc11/files/patch-gcc_system.h b/lang/gcc11/files/patch-gcc_system.h
deleted file mode 100644
index 87259b346ecc..000000000000
--- a/lang/gcc11/files/patch-gcc_system.h
+++ /dev/null
@@ -1,42 +0,0 @@
---- gcc/system.h.orig	2022-04-21 07:58:53 UTC
-+++ gcc/system.h
-@@ -203,19 +203,6 @@ extern int fprintf_unlocked (FILE *, const char *, ...
- #endif
- #endif
- 
--/* There are an extraordinary number of issues with <ctype.h>.
--   The last straw is that it varies with the locale.  Use libiberty's
--   replacement instead.  */
--#include "safe-ctype.h"
--
--#include <sys/types.h>
--
--#include <errno.h>
--
--#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
--extern int errno;
--#endif
--
- #ifdef __cplusplus
- #if defined (INCLUDE_ALGORITHM) || !defined (HAVE_SWAP_IN_UTILITY)
- # include <algorithm>
-@@ -242,6 +229,19 @@ extern int errno;
- # include <new>
- # include <utility>
- # include <type_traits>
-+#endif
-+
-+/* There are an extraordinary number of issues with <ctype.h>.
-+   The last straw is that it varies with the locale.  Use libiberty's
-+   replacement instead.  */
-+#include "safe-ctype.h"
-+
-+#include <sys/types.h>
-+
-+#include <errno.h>
-+
-+#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
-+extern int errno;
- #endif
- 
- /* Some of glibc's string inlines cause warnings.  Plus we'd rather