Skip to content

Commit faef66a

Browse files
committed
[gcc] Update to arm 10.3-2021.07. JB#60722
Update patches from Fedora. Cleanup some obsolete parts of spec file. Enable AutoReq for libgcc to prepare for glibc update.
1 parent 21fab6f commit faef66a

31 files changed

+1201
-1032
lines changed

cross-aarch64-gcc.spec

+90-88
Large diffs are not rendered by default.

cross-armv7hl-gcc.spec

+90-88
Large diffs are not rendered by default.

cross-i486-gcc.spec

+90-88
Large diffs are not rendered by default.

cross-x86_64-gcc.spec

+90-88
Large diffs are not rendered by default.

gcc.changes

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
* Thu Mar 7 2024 Matti Lehtimäki <[email protected]> - 10.3.1
2+
- Upgrade to ARM gcc 10.3-2021.07. Fixes JB#60722
3+
14
* Tue Nov 28 2023 Matti Lehtimäki <[email protected]> - 8.3.0-9
25
- Fix ICE in emit_block_move_hints. (backport GCC-8). JB#61045
36
- Fix ICE in convert_move. (backport GCC-8). JB#61045

gcc.spec

+90-88
Large diffs are not rendered by default.

gcc8-Wno-format-security.patch renamed to gcc10-Wno-format-security.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55

66
--- gcc/configure.ac.jj 2017-02-13 12:20:53.000000000 +0100
77
+++ gcc/configure.ac 2017-02-25 12:42:32.859175403 +0100
8-
@@ -481,7 +481,7 @@ AC_ARG_ENABLE(build-format-warnings,
8+
@@ -480,7 +480,7 @@ AC_ARG_ENABLE(build-format-warnings,
99
AS_HELP_STRING([--disable-build-format-warnings],[don't use -Wformat while building GCC]),
1010
[],[enable_build_format_warnings=yes])
1111
AS_IF([test $enable_build_format_warnings = no],
1212
- [wf_opt=-Wno-format],[wf_opt=])
1313
+ [wf_opt="-Wno-format -Wno-format-security"],[wf_opt=])
1414
ACX_PROG_CXX_WARNING_OPTS(
1515
m4_quote(m4_do([-W -Wall -Wno-narrowing -Wwrite-strings ],
16-
[-Wcast-qual $wf_opt])), [loose_warn])
16+
[-Wcast-qual -Wno-error=format-diag $wf_opt])),
1717
--- gcc/configure.jj 2017-02-13 12:20:52.000000000 +0100
1818
+++ gcc/configure 2017-02-25 12:42:50.041946391 +0100
1919
@@ -6647,7 +6647,7 @@ else

gcc10-d-shared-libphobos.patch

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2019-01-17 Jakub Jelinek <[email protected]>
2+
3+
* d-spec.cc (lang_specific_driver): Make -shared-libphobos
4+
the default rather than -static-libphobos.
5+
6+
--- gcc/d/d-spec.cc.jj 2019-01-01 12:37:49.502444257 +0100
7+
+++ gcc/d/d-spec.cc 2019-01-17 17:09:45.364949246 +0100
8+
@@ -408,9 +408,9 @@ lang_specific_driver (cl_decoded_option
9+
/* Add `-lgphobos' if we haven't already done so. */
10+
if (phobos_library != PHOBOS_NOLINK)
11+
{
12+
- /* Default to static linking. */
13+
- if (phobos_library != PHOBOS_DYNAMIC)
14+
- phobos_library = PHOBOS_STATIC;
15+
+ /* Default to shared linking. */
16+
+ if (phobos_library != PHOBOS_STATIC)
17+
+ phobos_library = PHOBOS_DYNAMIC;
18+
19+
#ifdef HAVE_LD_STATIC_DYNAMIC
20+
if (phobos_library == PHOBOS_STATIC && !static_link)

gcc8-foffload-default.patch renamed to gcc10-foffload-default.patch

+22-17
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
2017-01-20 Jakub Jelinek <[email protected]>
1+
2019-01-17 Jakub Jelinek <[email protected]>
22

33
* gcc.c (offload_targets_default): New variable.
44
(process_command): Set it if -foffload is defaulted.
55
(driver::maybe_putenv_OFFLOAD_TARGETS): Add OFFLOAD_TARGET_DEFAULT=1
66
into environment if -foffload has been defaulted.
77
* lto-wrapper.c (OFFLOAD_TARGET_DEFAULT_ENV): Define.
8-
(compile_images_for_offload_targets): If OFFLOAD_TARGET_DEFAULT
8+
(compile_offload_image): If OFFLOAD_TARGET_DEFAULT
99
is in the environment, don't fail if corresponding mkoffload
10-
can't be found. Free and clear offload_names if no valid offload
11-
is found.
10+
can't be found.
11+
(compile_images_for_offload_targets): Likewise. Free and clear
12+
offload_names if no valid offload is found.
1213
libgomp/
1314
* target.c (gomp_load_plugin_for_device): If a plugin can't be
1415
dlopened, assume it has no devices silently.
@@ -57,18 +58,28 @@ libgomp/
5758

5859
enum lto_mode_d {
5960
LTO_MODE_NONE, /* Not doing LTO. */
60-
@@ -790,8 +791,10 @@ compile_images_for_offload_targets (unsi
61-
if (!target_names)
62-
return;
61+
@@ -822,6 +823,12 @@ compile_offload_image (const char *targe
62+
break;
63+
}
64+
65+
+ if (!compiler && getenv (OFFLOAD_TARGET_DEFAULT_ENV))
66+
+ {
67+
+ free_array_of_ptrs ((void **) paths, n_paths);
68+
+ return NULL;
69+
+ }
70+
+
71+
if (!compiler)
72+
fatal_error (input_location,
73+
"could not find %s in %s (consider using %<-B%>)",
74+
@@ -885,6 +892,7 @@ compile_images_for_offload_targets (unsi
6375
unsigned num_targets = parse_env_var (target_names, &names, NULL);
64-
+ const char *target_names_default = getenv (OFFLOAD_TARGET_DEFAULT_ENV);
6576

6677
int next_name_entry = 0;
6778
+ bool hsa_seen = false;
6879
const char *compiler_path = getenv ("COMPILER_PATH");
6980
if (!compiler_path)
7081
goto out;
71-
@@ -804,18 +807,32 @@ compile_images_for_offload_targets (unsi
82+
@@ -897,18 +905,26 @@ compile_images_for_offload_targets (unsi
7283
/* HSA does not use LTO-like streaming and a different compiler, skip
7384
it. */
7485
if (strcmp (names[i], "hsa") == 0)
@@ -84,14 +95,8 @@ libgomp/
8495
linker_opts, linker_opt_count);
8596
if (!offload_names[next_name_entry])
8697
- fatal_error (input_location,
87-
- "problem with building target image for %s\n", names[i]);
88-
+ {
89-
+ if (target_names_default != NULL)
90-
+ continue;
91-
+ fatal_error (input_location,
92-
+ "problem with building target image for %s\n",
93-
+ names[i]);
94-
+ }
98+
- "problem with building target image for %s", names[i]);
99+
+ continue;
95100
next_name_entry++;
96101
}
97102

gcc8-hack.patch renamed to gcc10-hack.patch

+29-27
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
--- libada/Makefile.in.jj 2009-01-14 12:07:35.000000000 +0100
2-
+++ libada/Makefile.in 2009-01-15 14:25:33.000000000 +0100
3-
@@ -66,18 +66,40 @@ libsubdir := $(libdir)/gcc/$(target_nonc
1+
--- libada/Makefile.in.jj 2019-01-09 13:01:18.015608205 +0100
2+
+++ libada/Makefile.in 2019-01-11 18:16:23.441726931 +0100
3+
@@ -71,18 +71,40 @@ version := $(shell @get_gcc_base_ver@ $(
4+
libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR)
45
ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
5-
ADA_RTS_SUBDIR=./rts$(subst /,_,$(MULTISUBDIR))
66

77
+DEFAULTMULTIFLAGS :=
88
+ifeq ($(MULTISUBDIR),)
@@ -45,60 +45,62 @@
4545
"PICFLAG_FOR_TARGET=$(PICFLAG)" \
4646
"THREAD_KIND=$(THREAD_KIND)" \
4747
"TRACE=$(TRACE)" \
48-
@@ -88,7 +110,7 @@ LIBADA_FLAGS_TO_PASS = \
48+
@@ -93,7 +115,7 @@ LIBADA_FLAGS_TO_PASS = \
4949
"exeext=.exeext.should.not.be.used " \
5050
'CC=the.host.compiler.should.not.be.needed' \
5151
"GCC_FOR_TARGET=$(CC)" \
5252
- "CFLAGS=$(CFLAGS)"
5353
+ "CFLAGS=$(CFLAGS) $(DEFAULTMULTIFLAGS)"
5454

55-
# Rules to build gnatlib.
56-
.PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared osconstool
57-
--- config-ml.in.jj 2010-06-30 09:50:44.000000000 +0200
58-
+++ config-ml.in 2010-07-02 21:24:17.994211151 +0200
55+
.PHONY: libada gnatlib gnatlib-shared gnatlib-sjlj gnatlib-zcx osconstool
56+
57+
--- config-ml.in.jj 2019-01-09 12:50:16.646501448 +0100
58+
+++ config-ml.in 2019-01-11 18:16:23.442726914 +0100
5959
@@ -511,6 +511,8 @@ multi-do:
6060
ADAFLAGS="$(ADAFLAGS) $${flags}" \
6161
prefix="$(prefix)" \
6262
exec_prefix="$(exec_prefix)" \
6363
+ mandir="$(mandir)" \
6464
+ infodir="$(infodir)" \
6565
GOCFLAGS="$(GOCFLAGS) $${flags}" \
66+
GDCFLAGS="$(GDCFLAGS) $${flags}" \
6667
CXXFLAGS="$(CXXFLAGS) $${flags}" \
67-
LIBCFLAGS="$(LIBCFLAGS) $${flags}" \
68-
--- libcpp/macro.c.jj 2015-01-14 11:01:34.000000000 +0100
69-
+++ libcpp/macro.c 2015-01-14 14:22:19.286949884 +0100
70-
@@ -2947,8 +2947,6 @@ create_iso_definition (cpp_reader *pfile
71-
cpp_token *token;
72-
const cpp_token *ctoken;
68+
--- libcpp/macro.c.jj 2019-01-09 13:01:21.420552123 +0100
69+
+++ libcpp/macro.c 2019-01-11 18:18:17.736876285 +0100
70+
@@ -3256,8 +3256,6 @@ static cpp_macro *
71+
create_iso_definition (cpp_reader *pfile)
72+
{
7373
bool following_paste_op = false;
7474
- const char *paste_op_error_msg =
7575
- N_("'##' cannot appear at either end of a macro expansion");
7676
unsigned int num_extra_tokens = 0;
77-
78-
/* Get the first token of the expansion (or the '(' of a
79-
@@ -3059,7 +3057,8 @@ create_iso_definition (cpp_reader *pfile
77+
unsigned nparms = 0;
78+
cpp_hashnode **params = NULL;
79+
@@ -3382,7 +3380,9 @@ create_iso_definition (cpp_reader *pfile
8080
function-like macros, but not at the end. */
8181
if (following_paste_op)
8282
{
8383
- cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
8484
+ cpp_error (pfile, CPP_DL_ERROR,
85-
+ "'##' cannot appear at either end of a macro expansion");
86-
return false;
85+
+ "'##' cannot appear at either end of a macro "
86+
+ "expansion");
87+
goto out;
8788
}
88-
break;
89-
@@ -3072,7 +3071,8 @@ create_iso_definition (cpp_reader *pfile
89+
if (!vaopt_tracker.completed ())
90+
@@ -3397,7 +3397,9 @@ create_iso_definition (cpp_reader *pfile
9091
function-like macros, but not at the beginning. */
9192
if (macro->count == 1)
9293
{
9394
- cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
9495
+ cpp_error (pfile, CPP_DL_ERROR,
95-
+ "'##' cannot appear at either end of a macro expansion");
96-
return false;
96+
+ "'##' cannot appear at either end of a macro "
97+
+ "expansion");
98+
goto out;
9799
}
98100

99-
--- libcpp/expr.c.jj 2015-01-14 11:01:34.000000000 +0100
100-
+++ libcpp/expr.c 2015-01-14 14:35:52.851002344 +0100
101-
@@ -672,16 +672,17 @@ cpp_classify_number (cpp_reader *pfile,
101+
--- libcpp/expr.c.jj 2019-01-09 13:01:22.415535734 +0100
102+
+++ libcpp/expr.c 2019-01-11 18:16:23.444726882 +0100
103+
@@ -788,16 +788,17 @@ cpp_classify_number (cpp_reader *pfile,
102104
if ((result & CPP_N_WIDTH) == CPP_N_LARGE
103105
&& CPP_OPTION (pfile, cpp_warn_long_long))
104106
{
File renamed without changes.

gcc8-isl-dl.patch renamed to gcc10-isl-dl.patch

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
--- gcc/Makefile.in.jj 2015-06-06 10:00:25.000000000 +0200
22
+++ gcc/Makefile.in 2015-11-04 14:56:02.643536437 +0100
3-
@@ -1046,7 +1046,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
3+
@@ -1063,7 +1063,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
44
# and the system's installed libraries.
55
LIBS = @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) \
66
$(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS)
77
-BACKENDLIBS = $(ISLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
88
+BACKENDLIBS = $(if $(ISLLIBS),-ldl) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
9-
$(ZLIB)
9+
$(ZLIB) $(ZSTD_LIB)
1010
# Any system libraries needed just for GNAT.
1111
SYSLIBS = @GNAT_LIBEXC@
12-
@@ -2196,6 +2196,15 @@ $(out_object_file): $(out_file)
12+
@@ -2302,6 +2302,15 @@ $(out_object_file): $(out_file)
1313
$(common_out_object_file): $(common_out_file)
1414
$(COMPILE) $<
1515
$(POSTCOMPILE)

gcc10-libgomp-omp_h-multilib.patch

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2008-06-09 Jakub Jelinek <[email protected]>
2+
3+
* omp.h.in (omp_nest_lock_t): Fix up for Linux multilibs.
4+
5+
--- libgomp/omp.h.in.jj 2008-06-09 13:34:05.000000000 +0200
6+
+++ libgomp/omp.h.in 2008-06-09 13:34:48.000000000 +0200
7+
@@ -42,8 +42,8 @@ typedef struct
8+
9+
typedef struct
10+
{
11+
- unsigned char _x[@OMP_NEST_LOCK_SIZE@]
12+
- __attribute__((__aligned__(@OMP_NEST_LOCK_ALIGN@)));
13+
+ unsigned char _x[8 + sizeof (void *)]
14+
+ __attribute__((__aligned__(sizeof (void *))));
15+
} omp_nest_lock_t;
16+
#endif
17+

gcc10-libstdc++-docs.patch

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
--- libstdc++-v3/doc/html/index.html.jj 2011-01-03 12:53:21.282829010 +0100
2+
+++ libstdc++-v3/doc/html/index.html 2011-01-04 18:06:28.999851145 +0100
3+
@@ -5,6 +5,8 @@
4+
<a class="link" href="https://www.fsf.org" target="_top">FSF
5+
</a>
6+
</p><p>
7+
+ Release 10.2.1
8+
+ </p><p>
9+
Permission is granted to copy, distribute and/or modify this
10+
document under the terms of the GNU Free Documentation
11+
License, Version 1.2 or any later version published by the
12+
--- libstdc++-v3/doc/html/api.html.jj 2011-01-03 12:53:21.000000000 +0100
13+
+++ libstdc++-v3/doc/html/api.html 2011-01-04 18:12:01.672757784 +0100
14+
@@ -20,7 +20,9 @@
15+
member functions for the library classes, finding out what is in a
16+
particular include file, looking at inheritance diagrams, etc.
17+
</p><p>
18+
- The API documentation, rendered into HTML, can be viewed online
19+
+ The API documentation, rendered into HTML, can be viewed locally
20+
+ <a class="link" href="api/index.html" target="_top">for the 10.2.1 release</a>,
21+
+ online
22+
<a class="link" href="http://gcc.gnu.org/onlinedocs/" target="_top">for each GCC release</a>
23+
and
24+
<a class="link" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/index.html" target="_top">
File renamed without changes.

gcc10-no-add-needed.patch

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2010-02-08 Roland McGrath <[email protected]>
2+
3+
* config/gnu-user.h (LINK_EH_SPEC): Pass --no-add-needed to the linker.
4+
* config/alpha/elf.h (LINK_EH_SPEC): Likewise.
5+
* config/ia64/linux.h (LINK_EH_SPEC): Likewise.
6+
7+
--- gcc/config/alpha/elf.h.jj 2011-01-03 12:52:31.118056764 +0100
8+
+++ gcc/config/alpha/elf.h 2011-01-04 18:14:10.931874160 +0100
9+
@@ -168,5 +168,5 @@ extern int alpha_this_gpdisp_sequence_nu
10+
I imagine that other systems will catch up. In the meantime, it
11+
doesn't harm to make sure that the data exists to be used later. */
12+
#if defined(HAVE_LD_EH_FRAME_HDR)
13+
-#define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} "
14+
+#define LINK_EH_SPEC "--no-add-needed %{!static|static-pie:--eh-frame-hdr} "
15+
#endif
16+
--- gcc/config/ia64/linux.h.jj 2011-01-03 13:02:11.462994522 +0100
17+
+++ gcc/config/ia64/linux.h 2011-01-04 18:14:10.931874160 +0100
18+
@@ -76,7 +76,7 @@ do { \
19+
Signalize that because we have fde-glibc, we don't need all C shared libs
20+
linked against -lgcc_s. */
21+
#undef LINK_EH_SPEC
22+
-#define LINK_EH_SPEC ""
23+
+#define LINK_EH_SPEC "--no-add-needed "
24+
25+
#undef TARGET_INIT_LIBFUNCS
26+
#define TARGET_INIT_LIBFUNCS ia64_soft_fp_init_libfuncs
27+
--- gcc/config/gnu-user.h.jj 2011-01-03 12:53:03.739057299 +0100
28+
+++ gcc/config/gnu-user.h 2011-01-04 18:14:10.932814884 +0100
29+
@@ -106,7 +106,7 @@ see the files COPYING3 and COPYING.RUNTI
30+
#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC
31+
32+
#if defined(HAVE_LD_EH_FRAME_HDR)
33+
-#define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} "
34+
+#define LINK_EH_SPEC "--no-add-needed %{!static|static-pie:--eh-frame-hdr} "
35+
#endif
36+
37+
#define GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC \

0 commit comments

Comments
 (0)