Skip to content

Commit aa6f8a7

Browse files
author
Release Manager
committed
gh-38008: `gcc`, `gfortran`: Update to 13.2.0; remove `debian-buster-gcc_spkg` from CI <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes #12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes #12345". --> - Fixes #38006 @jhpalmieri - `gcc` does not build on `debian-buster` (which we supported via `-gcc_spkg` because it is LTS until 2024-06), so we drop this platform now; see #32074. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - #12345: short description why this is a dependency --> <!-- - #34567: ... --> - Depends on #37726 (merged here to resolve merge conflict) URL: #38008 Reported by: Matthias Köppe Reviewer(s):
2 parents 74f244c + 4187f5c commit aa6f8a7

File tree

16 files changed

+5576
-7812
lines changed

16 files changed

+5576
-7812
lines changed

.devcontainer/portability-debian-buster-gcc_spkg-minimal/devcontainer.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

.devcontainer/portability-debian-buster-gcc_spkg-minimal/portability-Dockerfile

Lines changed: 0 additions & 1 deletion
This file was deleted.

.devcontainer/portability-debian-buster-gcc_spkg-standard/devcontainer.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

.devcontainer/portability-debian-buster-gcc_spkg-standard/portability-Dockerfile

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/docker.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ on:
2525
"ubuntu-lunar",
2626
"ubuntu-mantic",
2727
"ubuntu-noble",
28-
"debian-buster-gcc_spkg",
2928
"debian-bullseye",
3029
"debian-bookworm",
3130
"debian-trixie",

build/pkgs/gcc/checksums.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
tarball=gcc-VERSION.tar.xz
2-
sha1=5dce6dc0091b8049b530d1587513a07201691760
3-
sha256=e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff
2+
sha1=5f95b6d042fb37d45c6cbebfc91decfbc4fb493c
3+
sha256=e275e76442a6067341a27f04c5c6b83d8613144004c0413528863dc6b5c743da
44
upstream_url=https://mirrors.kernel.org/gnu/gcc/gcc-VERSION/gcc-VERSION.tar.xz

build/pkgs/gcc/package-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
12.2.0
1+
13.2.0
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
From: Francois-Xavier Coudert <[email protected]>
2+
Date: Thu, 7 Mar 2024 13:36:03 +0000 (+0100)
3+
Subject: Include safe-ctype.h after C++ standard headers, to avoid over-poisoning
4+
X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=68057560ff1fc0fb2df38c2f9627a20c9a8da5c5
5+
6+
Include safe-ctype.h after C++ standard headers, to avoid over-poisoning
7+
8+
When building gcc's C++ sources against recent libc++, the poisoning of
9+
the ctype macros due to including safe-ctype.h before including C++
10+
standard headers such as <list>, <map>, etc, causes many compilation
11+
errors, similar to:
12+
13+
In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23:
14+
In file included from /home/dim/src/gcc/master/gcc/system.h:233:
15+
In file included from /usr/include/c++/v1/vector:321:
16+
In file included from
17+
/usr/include/c++/v1/__format/formatter_bool.h:20:
18+
In file included from
19+
/usr/include/c++/v1/__format/formatter_integral.h:32:
20+
In file included from /usr/include/c++/v1/locale:202:
21+
/usr/include/c++/v1/__locale:546:5: error: '__abi_tag__' attribute
22+
only applies to structs, variables, functions, and namespaces
23+
546 | _LIBCPP_INLINE_VISIBILITY
24+
| ^
25+
/usr/include/c++/v1/__config:813:37: note: expanded from macro
26+
'_LIBCPP_INLINE_VISIBILITY'
27+
813 | # define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
28+
| ^
29+
/usr/include/c++/v1/__config:792:26: note: expanded from macro
30+
'_LIBCPP_HIDE_FROM_ABI'
31+
792 |
32+
__attribute__((__abi_tag__(_LIBCPP_TOSTRING(
33+
_LIBCPP_VERSIONED_IDENTIFIER))))
34+
| ^
35+
In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23:
36+
In file included from /home/dim/src/gcc/master/gcc/system.h:233:
37+
In file included from /usr/include/c++/v1/vector:321:
38+
In file included from
39+
/usr/include/c++/v1/__format/formatter_bool.h:20:
40+
In file included from
41+
/usr/include/c++/v1/__format/formatter_integral.h:32:
42+
In file included from /usr/include/c++/v1/locale:202:
43+
/usr/include/c++/v1/__locale:547:37: error: expected ';' at end of
44+
declaration list
45+
547 | char_type toupper(char_type __c) const
46+
| ^
47+
/usr/include/c++/v1/__locale:553:48: error: too many arguments
48+
provided to function-like macro invocation
49+
553 | const char_type* toupper(char_type* __low, const
50+
char_type* __high) const
51+
| ^
52+
/home/dim/src/gcc/master/gcc/../include/safe-ctype.h:146:9: note:
53+
macro 'toupper' defined here
54+
146 | #define toupper(c) do_not_use_toupper_with_safe_ctype
55+
| ^
56+
57+
This is because libc++ uses different transitive includes than
58+
libstdc++, and some of those transitive includes pull in various ctype
59+
declarations (typically via <locale>).
60+
61+
There was already a special case for including <string> before
62+
safe-ctype.h, so move the rest of the C++ standard header includes to
63+
the same location, to fix the problem.
64+
65+
PR middle-end/111632
66+
67+
gcc/ChangeLog:
68+
69+
* system.h: Include safe-ctype.h after C++ standard headers.
70+
71+
Signed-off-by: Dimitry Andric <[email protected]>
72+
(cherry picked from commit 9970b576b7e4ae337af1268395ff221348c4b34a)
73+
---
74+
75+
diff --git a/gcc/system.h b/gcc/system.h
76+
index 33e9d4211150..03ab33ac960f 100644
77+
--- a/gcc/system.h
78+
+++ b/gcc/system.h
79+
@@ -194,27 +194,8 @@ extern int fprintf_unlocked (FILE *, const char *, ...);
80+
#undef fread_unlocked
81+
#undef fwrite_unlocked
82+
83+
-/* Include <string> before "safe-ctype.h" to avoid GCC poisoning
84+
- the ctype macros through safe-ctype.h */
85+
-
86+
-#ifdef __cplusplus
87+
-#ifdef INCLUDE_STRING
88+
-# include <string>
89+
-#endif
90+
-#endif
91+
-
92+
-/* There are an extraordinary number of issues with <ctype.h>.
93+
- The last straw is that it varies with the locale. Use libiberty's
94+
- replacement instead. */
95+
-#include "safe-ctype.h"
96+
-
97+
-#include <sys/types.h>
98+
-
99+
-#include <errno.h>
100+
-
101+
-#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
102+
-extern int errno;
103+
-#endif
104+
+/* Include C++ standard headers before "safe-ctype.h" to avoid GCC
105+
+ poisoning the ctype macros through safe-ctype.h */
106+
107+
#ifdef __cplusplus
108+
#if defined (INCLUDE_ALGORITHM) || !defined (HAVE_SWAP_IN_UTILITY)
109+
@@ -229,6 +210,9 @@ extern int errno;
110+
#ifdef INCLUDE_SET
111+
# include <set>
112+
#endif
113+
+#ifdef INCLUDE_STRING
114+
+# include <string>
115+
+#endif
116+
#ifdef INCLUDE_VECTOR
117+
# include <vector>
118+
#endif
119+
@@ -245,6 +229,19 @@ extern int errno;
120+
# include <type_traits>
121+
#endif
122+
123+
+/* There are an extraordinary number of issues with <ctype.h>.
124+
+ The last straw is that it varies with the locale. Use libiberty's
125+
+ replacement instead. */
126+
+#include "safe-ctype.h"
127+
+
128+
+#include <sys/types.h>
129+
+
130+
+#include <errno.h>
131+
+
132+
+#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
133+
+extern int errno;
134+
+#endif
135+
+
136+
/* Some of glibc's string inlines cause warnings. Plus we'd rather
137+
rely on (and therefore test) GCC's string builtins. */
138+
#define __NO_STRING_INLINES
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
From: Francois-Xavier Coudert <[email protected]>
2+
Date: Sat, 16 Mar 2024 08:50:00 +0000 (+0100)
3+
Subject: libcc1: fix <vector> include
4+
X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=e95ab9e60ce1d9aa7751d79291133fd5af9209d7
5+
6+
libcc1: fix <vector> include
7+
8+
Use INCLUDE_VECTOR before including system.h, instead of directly
9+
including <vector>, to avoid running into poisoned identifiers.
10+
11+
Signed-off-by: Dimitry Andric <[email protected]>
12+
13+
PR middle-end/111632
14+
15+
libcc1/ChangeLog:
16+
17+
* libcc1plugin.cc: Fix include.
18+
* libcp1plugin.cc: Fix include.
19+
20+
(cherry picked from commit 5213047b1d50af63dfabb5e5649821a6cb157e33)
21+
---
22+
23+
diff --git a/libcc1/libcc1plugin.cc b/libcc1/libcc1plugin.cc
24+
index 7e0fecae1456..44bcf56698ee 100644
25+
--- a/libcc1/libcc1plugin.cc
26+
+++ b/libcc1/libcc1plugin.cc
27+
@@ -32,6 +32,7 @@
28+
#undef PACKAGE_VERSION
29+
30+
#define INCLUDE_MEMORY
31+
+#define INCLUDE_VECTOR
32+
#include "gcc-plugin.h"
33+
#include "system.h"
34+
#include "coretypes.h"
35+
@@ -69,8 +70,6 @@
36+
#include "gcc-c-interface.h"
37+
#include "context.hh"
38+
39+
-#include <vector>
40+
-
41+
using namespace cc1_plugin;
42+
43+
44+
diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc
45+
index 8d394c0cfdb8..9586a2afdb47 100644
46+
--- a/libcc1/libcp1plugin.cc
47+
+++ b/libcc1/libcp1plugin.cc
48+
@@ -33,6 +33,7 @@
49+
#undef PACKAGE_VERSION
50+
51+
#define INCLUDE_MEMORY
52+
+#define INCLUDE_VECTOR
53+
#include "gcc-plugin.h"
54+
#include "system.h"
55+
#include "coretypes.h"
56+
@@ -71,8 +72,6 @@
57+
#include "rpc.hh"
58+
#include "context.hh"
59+
60+
-#include <vector>
61+
-
62+
using namespace cc1_plugin;
63+
64+
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
Patch included in https://github.com/Homebrew/homebrew-core/blob/50d9d78a4a09b42807b0a8f74f1f2f8933051a7b/Formula/g/[email protected]
2+
3+
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
4+
index 416d2c2e3a4..e52f11d8460 100644
5+
--- a/fixincludes/fixincl.x
6+
+++ b/fixincludes/fixincl.x
7+
@@ -2,11 +2,11 @@
8+
*
9+
* DO NOT EDIT THIS FILE (fixincl.x)
10+
*
11+
- * It has been AutoGen-ed January 22, 2023 at 09:03:29 PM by AutoGen 5.18.12
12+
+ * It has been AutoGen-ed August 17, 2023 at 10:16:38 AM by AutoGen 5.18.12
13+
* From the definitions inclhack.def
14+
* and the template file fixincl
15+
*/
16+
-/* DO NOT SVN-MERGE THIS FILE, EITHER Sun Jan 22 21:03:29 CET 2023
17+
+/* DO NOT SVN-MERGE THIS FILE, EITHER Thu Aug 17 10:16:38 CEST 2023
18+
*
19+
* You must regenerate it. Use the ./genfixes script.
20+
*
21+
@@ -3674,7 +3674,7 @@ tSCC* apzDarwin_Flt_Eval_MethodMachs[] = {
22+
* content selection pattern - do fix if pattern found
23+
*/
24+
tSCC zDarwin_Flt_Eval_MethodSelect0[] =
25+
- "^#if __FLT_EVAL_METHOD__ == 0$";
26+
+ "^#if __FLT_EVAL_METHOD__ == 0( \\|\\| __FLT_EVAL_METHOD__ == -1)?$";
27+
28+
#define DARWIN_FLT_EVAL_METHOD_TEST_CT 1
29+
static tTestDesc aDarwin_Flt_Eval_MethodTests[] = {
30+
@@ -3685,7 +3685,7 @@ static tTestDesc aDarwin_Flt_Eval_MethodTests[] = {
31+
*/
32+
static const char* apzDarwin_Flt_Eval_MethodPatch[] = {
33+
"format",
34+
- "#if __FLT_EVAL_METHOD__ == 0 || __FLT_EVAL_METHOD__ == 16",
35+
+ "%0 || __FLT_EVAL_METHOD__ == 16",
36+
(char*)NULL };
37+
38+
/* * * * * * * * * * * * * * * * * * * * * * * * * *
39+
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
40+
index 45e0cbc0c10..19e0ea2df66 100644
41+
--- a/fixincludes/inclhack.def
42+
+++ b/fixincludes/inclhack.def
43+
@@ -1819,10 +1819,11 @@ fix = {
44+
hackname = darwin_flt_eval_method;
45+
mach = "*-*-darwin*";
46+
files = math.h;
47+
- select = "^#if __FLT_EVAL_METHOD__ == 0$";
48+
+ select = "^#if __FLT_EVAL_METHOD__ == 0( \\|\\| __FLT_EVAL_METHOD__ == -1)?$";
49+
c_fix = format;
50+
- c_fix_arg = "#if __FLT_EVAL_METHOD__ == 0 || __FLT_EVAL_METHOD__ == 16";
51+
- test_text = "#if __FLT_EVAL_METHOD__ == 0";
52+
+ c_fix_arg = "%0 || __FLT_EVAL_METHOD__ == 16";
53+
+ test_text = "#if __FLT_EVAL_METHOD__ == 0\n"
54+
+ "#if __FLT_EVAL_METHOD__ == 0 || __FLT_EVAL_METHOD__ == -1";
55+
};
56+
57+
/*
58+
diff --git a/fixincludes/tests/base/math.h b/fixincludes/tests/base/math.h
59+
index 29b67579748..7b92f29a409 100644
60+
--- a/fixincludes/tests/base/math.h
61+
+++ b/fixincludes/tests/base/math.h
62+
@@ -32,6 +32,7 @@
63+
64+
#if defined( DARWIN_FLT_EVAL_METHOD_CHECK )
65+
#if __FLT_EVAL_METHOD__ == 0 || __FLT_EVAL_METHOD__ == 16
66+
+#if __FLT_EVAL_METHOD__ == 0 || __FLT_EVAL_METHOD__ == -1 || __FLT_EVAL_METHOD__ == 16
67+
#endif /* DARWIN_FLT_EVAL_METHOD_CHECK */
68+
69+
70+
--
71+
2.39.3

0 commit comments

Comments
 (0)