Compare commits

...

No commits in common. "imports/c8-beta/gcc-toolset-10-gcc-10.2.1-8.1.el8" and "c8" have entirely different histories.

9 changed files with 1835 additions and 95 deletions

View File

@ -1,5 +1,5 @@
7f4348418dc3efefd357b32a2b5c8010211ab284 SOURCES/doxygen-1.8.0.src.tar.gz
08872639b847a6d34583cb46508d58f1abf0220d SOURCES/gcc-10.2.1-20201112.tar.xz
b1b11155e6f93a726e57043e9b6e6c265f372f9d SOURCES/gcc-10.3.1-20210422.tar.xz
c5a2b201bf05229647e73203c0bf2d9679d4d21f SOURCES/isl-0.16.1.tar.bz2
5ef03ca7aee134fe7dfecb6c9d048799f0810278 SOURCES/mpc-0.8.1.tar.gz
6ec33952e824e837fef0e829c93d39d6a507082f SOURCES/newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz

2
.gitignore vendored
View File

@ -1,5 +1,5 @@
SOURCES/doxygen-1.8.0.src.tar.gz
SOURCES/gcc-10.2.1-20201112.tar.xz
SOURCES/gcc-10.3.1-20210422.tar.xz
SOURCES/isl-0.16.1.tar.bz2
SOURCES/mpc-0.8.1.tar.gz
SOURCES/newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz

File diff suppressed because it is too large Load Diff

View File

@ -9840,7 +9840,7 @@
+#endif
--- libstdc++-v3/src/nonshared17/memory_resource.cc.jj 2020-05-27 15:11:04.996304376 +0200
+++ libstdc++-v3/src/nonshared17/memory_resource.cc 2020-05-27 16:21:24.634581462 +0200
@@ -0,0 +1,71 @@
@@ -0,0 +1,65 @@
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
@ -9906,15 +9906,9 @@
+#endif
+asm (".hidden _ZNSt22__shared_mutex_pthread6unlockEv");
+asm (".hidden _ZNSt3pmr15__pool_resource5_Pool10deallocateEPNS_15memory_resourceEPv");
+asm (".hidden _ZNSt3pmr15__pool_resource5_Pool6vectorD1Ev");
+asm (".hidden _ZNSt3pmr15__pool_resource5_Pool6vectorD2Ev");
+asm (".hidden _ZNSt3pmr15__pool_resource5_PoolD1Ev");
+asm (".hidden _ZNSt3pmr15__pool_resource5_PoolD2Ev");
+asm (".hidden _ZNSt3pmr26synchronized_pool_resource7_TPoolsC1ERS0_RSt10lock_guardISt12shared_mutexE");
+asm (".hidden _ZNSt3pmr26synchronized_pool_resource7_TPoolsC2ERS0_RSt10lock_guardISt12shared_mutexE");
--- libstdc++-v3/src/nonshared17/fs_dir.cc.jj 2020-05-27 15:11:04.994304406 +0200
+++ libstdc++-v3/src/nonshared17/fs_dir.cc 2020-05-27 16:19:06.255617202 +0200
@@ -0,0 +1,94 @@
@@ -0,0 +1,92 @@
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
@ -9951,8 +9945,6 @@
+asm (".hidden _ZNSt10filesystem7__cxx114_Dir7advanceEbRSt10error_code");
+asm (".hidden _ZNSt10filesystem7__cxx114_DirD1Ev");
+asm (".hidden _ZNSt10filesystem7__cxx114_DirD2Ev");
+asm (".hidden _ZNSt10filesystem9_Dir_baseC1EPKcbRSt10error_code");
+asm (".hidden _ZNSt10filesystem9_Dir_baseC2EPKcbRSt10error_code");
+asm (".hidden _ZNSt12__shared_ptrINSt10filesystem7__cxx1128recursive_directory_iterator10_Dir_stackELN9__gnu_cxx12_Lock_policyE2EE4swapERS6_");
+asm (".hidden _ZNSt12__shared_ptrINSt10filesystem7__cxx1128recursive_directory_iterator10_Dir_stackELN9__gnu_cxx12_Lock_policyE2EE5resetEv");
+asm (".hidden _ZNSt12__shared_ptrINSt10filesystem7__cxx1128recursive_directory_iterator10_Dir_stackELN9__gnu_cxx12_Lock_policyE2EEaSEOS6_");
@ -10051,7 +10043,7 @@
+#endif
--- libstdc++-v3/src/nonshared17/cow-fs_dir.cc.jj 2020-05-27 15:11:04.993304421 +0200
+++ libstdc++-v3/src/nonshared17/cow-fs_dir.cc 2020-05-27 16:16:29.824918505 +0200
@@ -0,0 +1,98 @@
@@ -0,0 +1,96 @@
+// Copyright (C) 2019-2020 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
@ -10088,8 +10080,6 @@
+asm (".hidden _ZNSt10filesystem4_Dir7advanceEbRSt10error_code");
+asm (".hidden _ZNSt10filesystem4_DirD1Ev");
+asm (".hidden _ZNSt10filesystem4_DirD2Ev");
+asm (".hidden _ZNSt10filesystem9_Dir_baseC1EPKcbRSt10error_code");
+asm (".hidden _ZNSt10filesystem9_Dir_baseC2EPKcbRSt10error_code");
+asm (".hidden _ZNSt12__shared_ptrINSt10filesystem28recursive_directory_iterator10_Dir_stackELN9__gnu_cxx12_Lock_policyE2EE4swapERS5_");
+asm (".hidden _ZNSt12__shared_ptrINSt10filesystem28recursive_directory_iterator10_Dir_stackELN9__gnu_cxx12_Lock_policyE2EE5resetEv");
+asm (".hidden _ZNSt12__shared_ptrINSt10filesystem28recursive_directory_iterator10_Dir_stackELN9__gnu_cxx12_Lock_policyE2EEaSEOS5_");
@ -12020,8 +12010,8 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12062 "configure"
+#line 12064 "configure"
-#line 12064 "configure"
+#line 12066 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -12029,8 +12019,8 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12168 "configure"
+#line 12170 "configure"
-#line 12170 "configure"
+#line 12172 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -12038,8 +12028,8 @@
# Fake what AC_TRY_COMPILE does.
cat > conftest.$ac_ext << EOF
-#line 15860 "configure"
+#line 15862 "configure"
-#line 15862 "configure"
+#line 15864 "configure"
int main()
{
typedef bool atomic_type;
@ -12047,8 +12037,8 @@
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15895 "configure"
+#line 15897 "configure"
-#line 15897 "configure"
+#line 15899 "configure"
int main()
{
typedef short atomic_type;
@ -12056,8 +12046,8 @@
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15930 "configure"
+#line 15932 "configure"
-#line 15932 "configure"
+#line 15934 "configure"
int main()
{
// NB: _Atomic_word not necessarily int.
@ -12065,8 +12055,8 @@
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 15966 "configure"
+#line 15968 "configure"
-#line 15968 "configure"
+#line 15970 "configure"
int main()
{
typedef long long atomic_type;
@ -12074,8 +12064,8 @@
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 16119 "configure"
+#line 16121 "configure"
-#line 16121 "configure"
+#line 16123 "configure"
int main()
{
_Decimal32 d1;
@ -12083,8 +12073,8 @@
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 16161 "configure"
+#line 16163 "configure"
-#line 16163 "configure"
+#line 16165 "configure"
template<typename T1, typename T2>
struct same
{ typedef T2 type; };
@ -12092,8 +12082,8 @@
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 16195 "configure"
+#line 16197 "configure"
-#line 16197 "configure"
+#line 16199 "configure"
template<typename T1, typename T2>
struct same
{ typedef T2 type; };

View File

@ -0,0 +1,51 @@
2020-09-09 Jakub Jelinek <jakub@redhat.com>
* config/arm/arm.c (arm_override_options_after_change_1): Add opts_set
argument, test opts_set->x_str_align_functions rather than
opts->x_str_align_functions.
(arm_override_options_after_change, arm_option_override_internal,
arm_set_current_function): Adjust callers.
--- gcc/config/arm/arm.c.jj 2020-09-09 09:19:42.911419411 +0200
+++ gcc/config/arm/arm.c 2020-09-09 09:28:02.392897384 +0200
@@ -3024,10 +3024,11 @@ static GTY(()) bool thumb_flipper;
static GTY(()) tree init_optimize;
static void
-arm_override_options_after_change_1 (struct gcc_options *opts)
+arm_override_options_after_change_1 (struct gcc_options *opts,
+ struct gcc_options *opts_set)
{
/* -falign-functions without argument: supply one. */
- if (opts->x_flag_align_functions && !opts->x_str_align_functions)
+ if (opts->x_flag_align_functions && !opts_set->x_str_align_functions)
opts->x_str_align_functions = TARGET_THUMB_P (opts->x_target_flags)
&& opts->x_optimize_size ? "2" : "4";
}
@@ -3037,7 +3038,7 @@ arm_override_options_after_change_1 (str
static void
arm_override_options_after_change (void)
{
- arm_override_options_after_change_1 (&global_options);
+ arm_override_options_after_change_1 (&global_options, &global_options_set);
}
/* Implement TARGET_OPTION_SAVE. */
@@ -3065,7 +3066,7 @@ static void
arm_option_override_internal (struct gcc_options *opts,
struct gcc_options *opts_set)
{
- arm_override_options_after_change_1 (opts);
+ arm_override_options_after_change_1 (opts, opts_set);
if (TARGET_INTERWORK && !bitmap_bit_p (arm_active_target.isa, isa_bit_thumb))
{
@@ -32335,7 +32336,7 @@ arm_set_current_function (tree fndecl)
save_restore_target_globals (new_tree);
- arm_override_options_after_change_1 (&global_options);
+ arm_override_options_after_change_1 (&global_options, &global_options_set);
}
/* Implement TARGET_OPTION_PRINT. */

View File

@ -0,0 +1,111 @@
2020-09-13 Jakub Jelinek <jakub@redhat.com>
* config/arm/arm.opt (arm_arch_specified, arm_cpu_specified,
arm_tune_specified): New TargetVariables.
* config/arm/arm.c (arm_configure_build_target): Comment out
opts_set argument name. Use opts->x_arm_*_specified instead
of opts_set->x_arm_*_string.
* common/config/arm/arm-common.c (arm_handle_option): New function.
(TARGET_HANDLE_OPTION): Redefine.
--- gcc/config/arm/arm.opt.jj 2020-09-12 13:36:27.619716335 +0200
+++ gcc/config/arm/arm.opt 2020-09-12 13:38:48.547661292 +0200
@@ -30,6 +30,15 @@ const char *x_arm_cpu_string
TargetSave
const char *x_arm_tune_string
+TargetVariable
+unsigned char arm_arch_specified = 0
+
+TargetVariable
+unsigned char arm_cpu_specified = 0
+
+TargetVariable
+unsigned char arm_tune_specified = 0
+
Enum
Name(tls_type) Type(enum arm_tls_type)
TLS dialect to use:
--- gcc/config/arm/arm.c.jj 2020-09-12 13:36:27.619716335 +0200
+++ gcc/config/arm/arm.c 2020-09-12 13:49:26.166363387 +0200
@@ -3181,7 +3181,7 @@ static sbitmap isa_quirkbits;
void
arm_configure_build_target (struct arm_build_target *target,
struct cl_target_option *opts,
- struct gcc_options *opts_set,
+ struct gcc_options */* opts_set */,
bool warn_compatible)
{
const cpu_option *arm_selected_tune = NULL;
@@ -3196,7 +3196,7 @@ arm_configure_build_target (struct arm_b
target->core_name = NULL;
target->arch_name = NULL;
- if (opts_set->x_arm_arch_string)
+ if (opts->x_arm_arch_specified)
{
arm_selected_arch = arm_parse_arch_option_name (all_architectures,
"-march",
@@ -3204,7 +3204,7 @@ arm_configure_build_target (struct arm_b
arch_opts = strchr (opts->x_arm_arch_string, '+');
}
- if (opts_set->x_arm_cpu_string)
+ if (opts->x_arm_cpu_specified)
{
arm_selected_cpu = arm_parse_cpu_option_name (all_cores, "-mcpu",
opts->x_arm_cpu_string);
@@ -3214,7 +3214,7 @@ arm_configure_build_target (struct arm_b
options for tuning. */
}
- if (opts_set->x_arm_tune_string)
+ if (opts->x_arm_tune_specified)
{
arm_selected_tune = arm_parse_cpu_option_name (all_cores, "-mtune",
opts->x_arm_tune_string);
--- gcc/common/config/arm/arm-common.c.jj 2020-07-28 15:39:09.705760394 +0200
+++ gcc/common/config/arm/arm-common.c 2020-09-12 13:50:09.021738456 +0200
@@ -1021,6 +1021,34 @@ arm_asm_auto_mfpu (int argc, const char
#undef ARM_CPU_NAME_LENGTH
+bool
+arm_handle_option (struct gcc_options *opts,
+ struct gcc_options *opts_set ATTRIBUTE_UNUSED,
+ const struct cl_decoded_option *decoded,
+ location_t loc ATTRIBUTE_UNUSED)
+{
+ size_t code = decoded->opt_index;
+ const char *arg = decoded->arg;
+ int val = decoded->value;
+
+ switch (code)
+ {
+ case OPT_march_:
+ opts->x_arm_arch_specified = true;
+ return true;
+
+ case OPT_mcpu_:
+ opts->x_arm_cpu_specified = true;
+ return true;
+
+ case OPT_mtune_:
+ opts->x_arm_tune_specified = true;
+ return true;
+
+ default:
+ return true;
+ }
+}
#undef TARGET_DEFAULT_TARGET_FLAGS
#define TARGET_DEFAULT_TARGET_FLAGS (TARGET_DEFAULT | MASK_SCHED_PROLOG)
@@ -1031,4 +1059,7 @@ arm_asm_auto_mfpu (int argc, const char
#undef TARGET_EXCEPT_UNWIND_INFO
#define TARGET_EXCEPT_UNWIND_INFO arm_except_unwind_info
+#undef TARGET_HANDLE_OPTION
+#define TARGET_HANDLE_OPTION arm_handle_option
+
struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;

View File

@ -0,0 +1,64 @@
2020-09-07 Jakub Jelinek <jakub@redhat.com>
PR target/96939
* config/arm/arm.c (arm_override_options_after_change): Don't call
arm_configure_build_target here.
(arm_set_current_function): Call arm_override_options_after_change_1
at the end.
* gcc.target/arm/lto/pr96939_0.c: New test.
* gcc.target/arm/lto/pr96939_1.c: New file.
--- gcc/config/arm/arm.c.jj 2020-07-30 15:04:38.136293101 +0200
+++ gcc/config/arm/arm.c 2020-09-07 10:43:54.809561852 +0200
@@ -3037,10 +3037,6 @@ arm_override_options_after_change_1 (str
static void
arm_override_options_after_change (void)
{
- arm_configure_build_target (&arm_active_target,
- TREE_TARGET_OPTION (target_option_default_node),
- &global_options_set, false);
-
arm_override_options_after_change_1 (&global_options);
}
@@ -32338,6 +32334,8 @@ arm_set_current_function (tree fndecl)
cl_target_option_restore (&global_options, TREE_TARGET_OPTION (new_tree));
save_restore_target_globals (new_tree);
+
+ arm_override_options_after_change_1 (&global_options);
}
/* Implement TARGET_OPTION_PRINT. */
--- gcc/testsuite/gcc.target/arm/lto/pr96939_0.c.jj 2020-09-07 11:26:45.909937609 +0200
+++ gcc/testsuite/gcc.target/arm/lto/pr96939_0.c 2020-09-07 11:29:18.722706535 +0200
@@ -0,0 +1,15 @@
+/* PR target/96939 */
+/* { dg-lto-do link } */
+/* { dg-require-effective-target arm_arch_v8a_ok } */
+/* { dg-lto-options { { -flto -O2 } } } */
+
+extern unsigned crc (unsigned, const void *);
+typedef unsigned (*fnptr) (unsigned, const void *);
+volatile fnptr fn;
+
+int
+main ()
+{
+ fn = crc;
+ return 0;
+}
--- gcc/testsuite/gcc.target/arm/lto/pr96939_1.c.jj 2020-09-07 11:26:49.365887153 +0200
+++ gcc/testsuite/gcc.target/arm/lto/pr96939_1.c 2020-09-07 11:25:13.885281180 +0200
@@ -0,0 +1,10 @@
+/* PR target/96939 */
+/* { dg-options "-march=armv8-a+crc" } */
+
+#include <arm_acle.h>
+
+unsigned
+crc (unsigned x, const void *y)
+{
+ return __crc32cw (x, *(unsigned *) y);
+}

View File

@ -1,34 +0,0 @@
2020-11-11 Jason Merrill <jason@redhat.com>
PR debug/97060
* dwarf2out.c (gen_subprogram_die): It's a declaration
if DECL_INITIAL isn't set.
* gcc.dg/debug/dwarf2/pr97060.c: New test.
--- gcc/dwarf2out.c
+++ gcc/dwarf2out.c
@@ -22859,6 +22859,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
available.
*/
int declaration = (current_function_decl != decl
+ || (!DECL_INITIAL (decl) && !origin)
|| class_or_namespace_scope_p (context_die));
/* A declaration that has been previously dumped needs no
--- gcc/testsuite/gcc.dg/debug/dwarf2/pr97060.c
+++ gcc/testsuite/gcc.dg/debug/dwarf2/pr97060.c
@@ -0,0 +1,13 @@
+/* PR debug/97060 */
+/* { dg-do compile } */
+/* { dg-options "-g -dA" } */
+/* { dg-final { scan-assembler-times "DW_AT_declaration" 2 } } */
+
+extern int foo (unsigned int, unsigned int);
+
+int
+bar (void)
+{
+ foo (1, 2);
+ return 0;
+}

View File

@ -2,13 +2,13 @@
%{?scl:%global __strip %%{_scl_root}/usr/bin/strip}
%{?scl:%global __objdump %%{_scl_root}/usr/bin/objdump}
%{?scl:%scl_package gcc}
%global DATE 20201112
%global gitrev 86495efb7a403b1ee3419fb3b3b1aaf26345ada5
%global gcc_version 10.2.1
%global DATE 20210422
%global gitrev dc5e381a715a658cfcc08ba3cbaa6bc53adc596f
%global gcc_version 10.3.1
%global gcc_major 10
# Note, gcc_release must be integer, if you want to add suffixes to
# %%{release}, append them after %%{gcc_release} on Release: line.
%global gcc_release 8
%global gcc_release 1
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global mpc_version 0.8.1
@ -123,7 +123,7 @@
Summary: GCC version 10
Name: %{?scl_prefix}gcc
Version: %{gcc_version}
Release: %{gcc_release}.1%{?dist}
Release: %{gcc_release}.2%{?dist}
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@ -165,6 +165,7 @@ URL: http://gcc.gnu.org
# Need binutils which support -plugin
# Need binutils which support .loc view >= 2.30
# Need binutils which support --generate-missing-build-notes=yes >= 2.31
BuildRequires: procps-ng
BuildRequires: binutils >= 2.19.51.0.14-33
# While gcc doesn't include statically linked binaries, during testing
# -static is used several times.
@ -172,13 +173,8 @@ BuildRequires: glibc-static
%if 0%{?scl:1}
BuildRequires: %{?scl_prefix}binutils >= 2.31
# For testing
%if 0%{?rhel} >= 6
# FIXME gcc-toolset-10-gdb isn't yet in the buildroot.
BuildRequires: gdb
%else
BuildRequires: %{?scl_prefix}gdb >= 7.4.50
%endif
%endif
BuildRequires: zlib-devel, gettext, dejagnu, bison, flex, sharutils
BuildRequires: texinfo, texinfo-tex, /usr/bin/pod2man
#BuildRequires: systemtap-sdt-devel >= 1.3
@ -235,9 +231,9 @@ Requires: glibc-devel >= 2.2.90-12
# Make sure glibc supports TFmode long double
Requires: glibc >= 2.3.90-35
%endif
BuildRequires: gmp-devel >= 4.1.2-8
BuildRequires: mpfr-devel >= 3.1.0
%if 0%{?rhel} >= 7
BuildRequires: gmp-devel >= 4.3.2
BuildRequires: mpfr-devel >= 3.1.0
BuildRequires: libmpc-devel >= 0.8.1
%endif
%if %{build_libstdcxx_docs}
@ -310,10 +306,13 @@ Patch8: gcc10-foffload-default.patch
Patch9: gcc10-Wno-format-security.patch
Patch10: gcc10-rh1574936.patch
Patch11: gcc10-d-shared-libphobos.patch
Patch12: gcc10-pr94540.patch
Patch13: gcc10-pr96383.patch
Patch14: gcc10-pr97060.patch
Patch15: gcc10-pr97524.patch
Patch12: gcc10-pr96383.patch
Patch13: gcc10-pr96939.patch
Patch14: gcc10-pr96939-2.patch
Patch15: gcc10-pr96939-3.patch
Patch16: gcc10-pr94540.patch
Patch17: gcc10-pr97524.patch
Patch18: gcc10-add-Wbidirectional.patch
Patch1000: gcc10-libstdc++-compat.patch
Patch1002: gcc10-isl-dl2.patch
@ -522,9 +521,9 @@ GNU Transactional Memory library.
%package plugin-devel
Summary: Support for compiling GCC plugins
Requires: %{?scl_prefix}gcc%{!?scl:10} = %{version}-%{release}
Requires: gmp-devel >= 4.1.2-8
Requires: mpfr-devel >= 3.1.0
%if 0%{?rhel} >= 7
Requires: gmp-devel >= 4.3.2
Requires: mpfr-devel >= 3.1.0
Requires: libmpc-devel >= 0.8.1
%endif
@ -563,8 +562,12 @@ which is used for -fsanitize=address instrumented programs.
%package -n %{?scl_prefix}libasan-devel
Summary: The Address Sanitizer static library
%if 0%{?rhel} > 8
Requires: libasan%{_isa} >= 8.3.1
Obsoletes: libasan5
%else
Requires: libasan6%{_isa} >= 10.2.1
%endif
Obsoletes: libasan5 <= 8.3.1
%description -n %{?scl_prefix}libasan-devel
This package contains Address Sanitizer static runtime library.
@ -598,7 +601,7 @@ which is used for -fsanitize=undefined instrumented programs.
Summary: The Undefined Behavior Sanitizer static library
%if 0%{?rhel} > 7
Requires: libubsan%{_isa} >= 8.3.1
Obsoletes: libubsan1
Obsoletes: libubsan1 <= 8.3.1
%else
Requires: libubsan1%{_isa} >= 8.3.1
%endif
@ -657,10 +660,13 @@ to NVidia PTX capable devices if available.
%patch10 -p0 -b .rh1574936~
%endif
%patch11 -p0 -b .d-shared-libphobos~
%patch12 -p0 -b .pr94540~
%patch13 -p0 -b .pr96383~
%patch14 -p0 -b .pr97060~
%patch15 -p0 -b .pr97524~
%patch12 -p0 -b .pr96383~
%patch13 -p0 -b .pr96939~
%patch14 -p0 -b .pr96939-2~
%patch15 -p0 -b .pr96939-3~
%patch16 -p0 -b .pr94540~
%patch17 -p0 -b .pr97524~
%patch18 -p1 -b .bidi~
%patch1000 -p0 -b .libstdc++-compat~
%if %{build_isl}
@ -680,6 +686,8 @@ to NVidia PTX capable devices if available.
%patch3009 -p1 -b .fortran09~
%patch3010 -p1 -b .fortran10~
find gcc/testsuite -name \*.pr96939~ | xargs rm -f
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
cp -a libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
@ -719,6 +727,10 @@ rm -f libgomp/testsuite/libgomp.c/target-33.c
rm -f libgomp/testsuite/libgomp.c/target-34.c
rm -rf libgomp/testsuite/libgomp.oacc*
%endif
# This test gets stuck.
%ifarch %{ix86}
rm -f libstdc++-v3/testsuite/30_threads/future/members/poll.cc
%endif
%build
@ -812,7 +824,12 @@ ln -sf libisl.so.15 libisl.so
cd ../..
%endif
# With newer binutils we could generate dcbt 0,9,16 when building a file in
# libbacktrace and gas doesn't grok it; with older binutils we generate
# dcbt 0,9 instead.
%ifnarch ppc64le
%{?scl:PATH=%{_bindir}${PATH:+:${PATH}}}
%endif
CC=gcc
CXX=g++
@ -904,6 +921,7 @@ CONFIGURE_OPTS="\
--build=%{gcc_target_platform} --target=%{gcc_target_platform} --with-cpu=default32
%endif
%ifarch %{ix86} x86_64
--enable-cet \
--with-tune=generic \
%endif
%if 0%{?rhel} >= 7
@ -1293,6 +1311,23 @@ GROUP ( /lib/libgcc_s.so.1 libgcc.a )' > $FULLPATH/32/libgcc_s.so
mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.spec $FULLPATH/
cp -a %{gcc_target_platform}/libstdc++-v3/src/.libs/libstdc++_nonshared%{nonsharedver}.a \
$FULLLPATH/libstdc++_nonshared.a
cp -a %{gcc_target_platform}/libgfortran/.libs/libgfortran_nonshared80.a \
$FULLLPATH/libgfortran_nonshared.a
%if 0%{?rhel} <= 7
# Build libgomp_nonshared.a with the system RHEL 7 compiler. Use -O2 to
# get tailcalls.
gcc %{SOURCE4} -O2 -c
ar rcs libgomp_nonshared.a libgomp_nonshared.o
cp -a libgomp_nonshared.a $FULLLPATH
%ifarch x86_64
# Only need this for -m32 on x86_64. devtoolset-N-gcc isn't multilib,
# and we don't have a devtoolset-N-libgomp-devel subpackage.
gcc %{SOURCE4} -O2 -c -m32 -o libgomp_nonshared32.o
ar rcs libgomp_nonshared32.a libgomp_nonshared32.o
cp -a libgomp_nonshared32.a $FULLLPATH/32/libgomp_nonshared.a
%endif
%endif
rm -f $FULLEPATH/libgccjit.so
mkdir -p %{buildroot}%{_prefix}/%{_lib}/
@ -1307,9 +1342,18 @@ gzip -9 %{buildroot}/%{_infodir}/libgccjit.info
pushd $FULLPATH
%if 0%{?rhel} <= 7
echo '/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
%{oformat}
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libgomp.so.1 -lgomp_nonshared )' > libgomp.so
%else
echo '/* GNU ld script */
%{oformat}
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libgomp.so.1 )' > libgomp.so
%endif
%if 0%{?rhel} <= 8
echo '/* GNU ld script
Use the shared library, but some functions are only in
@ -1325,7 +1369,7 @@ echo '/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
%{oformat}
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libgfortran.so.5 )' > libgfortran.so
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libgfortran.so.5 -lgfortran_nonshared )' > libgfortran.so
%if %{build_libquadmath}
rm -f libquadmath.so
echo '/* GNU ld script */
@ -1425,7 +1469,7 @@ echo '/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
%{oformat2}
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib64/libgfortran.so.5 )' > 64/libgfortran.so
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib64/libgfortran.so.5 -lgfortran_nonshared )' > 64/libgfortran.so
echo '/* GNU ld script */
%{oformat2}
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib64/libgomp.so.1 )' > 64/libgomp.so
@ -1525,10 +1569,20 @@ echo '/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
%{oformat2}
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib/libgfortran.so.5 )' > 32/libgfortran.so
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib/libgfortran.so.5 -lgfortran_nonshared )' > 32/libgfortran.so
%if 0%{?rhel} <= 7
echo '/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
%{oformat2}
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib/libgomp.so.1 -lgomp_nonshared )' > 32/libgomp.so
%else
echo '/* GNU ld script */
%{oformat2}
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib/libgomp.so.1 )' > 32/libgomp.so
%endif
echo '/* GNU ld script */
%{oformat2}
INPUT ( %{_prefix}/lib/libgccjit.so.0 )' > 32/libgccjit.so
@ -1586,6 +1640,11 @@ ln -sf lib64/libstdc++fs.a libstdc++fs.a
ln -sf ../lib32/libstdc++_nonshared.a 32/libstdc++_nonshared.a
ln -sf lib64/libstdc++_nonshared.a libstdc++_nonshared.a
%endif
%if 0%{?rhel} <= 8
ln -sf ../lib32/libgfortran_nonshared.a 32/libgfortran_nonshared.a
ln -sf lib64/libgfortran_nonshared.a libgfortran_nonshared.a
ln -sf lib64/libgomp_nonshared.a libgomp_nonshared.a
%endif
%if %{build_libquadmath}
ln -sf ../lib32/libquadmath.a 32/libquadmath.a
ln -sf lib64/libquadmath.a libquadmath.a
@ -1615,6 +1674,9 @@ ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}%{?_gnu}/%{gcc_major
%if 0%{?rhel} <= 8
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}%{?_gnu}/%{gcc_major}/libstdc++_nonshared.a 32/libstdc++_nonshared.a
%endif
%if 0%{?rhel} <= 8
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}%{?_gnu}/%{gcc_major}/libgfortran_nonshared.a 32/libgfortran_nonshared.a
%endif
%if %{build_libquadmath}
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}%{?_gnu}/%{gcc_major}/libquadmath.a 32/libquadmath.a
%endif
@ -1651,6 +1713,8 @@ for f in `find $adirs -maxdepth 1 -a \
-o -name liblsan.a \
-o -name libcc1.a \
-o -name libstdc++_nonshared.a \
-o -name libgomp_nonshared.a \
-o -name libgfortran_nonshared.a \
-o -name libsupc++.a \
-o -name libstdc++.a -o -name libcaf_single.a \
-o -name libstdc++fs.a \) -a -type f`; do
@ -1799,7 +1863,6 @@ chmod 755 %{buildroot}%{_prefix}/bin/%{multilib_32_arch}-%{_vendor}-%{_target_os
%endif
# Help plugins find out nvra.
# ??? Fedora uses _arch
echo gcc-%{version}-%{release}.%{arch} > $FULLPATH/rpmver
# Add symlink to lto plugin in the binutils plugin directory.
@ -1810,6 +1873,10 @@ ln -s ../../libexec/gcc/%{gcc_target_platform}/%{gcc_major}/liblto_plugin.so \
%check
cd obj-%{gcc_target_platform}
%ifarch ppc ppc64 ppc64le %{ix86}
while :; do sleep 15m; ps -ejHf; done &
%endif
%{?scl:PATH=%{_bindir}${PATH:+:${PATH}}}
%if 0%{?rhel} <= 8
# Test against the system libstdc++.so.6 + libstdc++_nonshared.a combo
@ -2171,6 +2238,11 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgomp.spec
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgomp.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgomp.so
%if 0%{?rhel} <= 7
%ifnarch ppc
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgomp_nonshared.a
%endif
%endif
%if %{build_libitm}
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libitm.spec
%endif
@ -2227,6 +2299,20 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libgcc_s.so
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libgomp.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libgomp.so
# Add libgomp_nonshared.a
%if 0%{?rhel} <= 7
%ifarch x86_64
# Need it for -m32.
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libgomp_nonshared.a
%endif
%ifarch ppc64
# We've created a symlink to lib64/libgomp_nonshared.a, so add it.
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib64/libgomp_nonshared.a
%endif
%endif
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libgccjit.so
%if %{build_libquadmath}
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libquadmath.a
@ -2392,6 +2478,7 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libcaf_single.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgfortran.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgfortran.so
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgfortran_nonshared.a
%ifarch sparcv9 ppc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/64/libcaf_single.a
@ -2404,8 +2491,13 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libcaf_single.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libgfortran.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libgfortran.so
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/libgfortran_nonshared.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/32/finclude
%endif
%ifarch ppc64
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/lib64/libgfortran_nonshared.a
%endif
%doc rpm.doc/gfortran/*
%if %{build_libquadmath}
@ -2428,6 +2520,11 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libquadmath.a
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libquadmath.so
%endif
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}
%ifarch %{ix86}
# Need it for -m32.
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libgfortran_nonshared.a
%endif
%doc rpm.doc/libquadmath/ChangeLog*
%endif
@ -2590,6 +2687,7 @@ fi
%files -n %{?scl_prefix}offload-nvptx
%{_prefix}/bin/nvptx-none-*
%{_prefix}/bin/%{gcc_target_platform}-accel-nvptx-none-gcc
%{_prefix}/bin/%{gcc_target_platform}-accel-nvptx-none-lto-dump
%dir %{_prefix}/lib/gcc
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}
@ -2607,6 +2705,23 @@ fi
%endif
%changelog
* Fri Oct 29 2021 Marek Polacek <polacek@redhat.com> 10.3.1-1.2
- add -Wbidirectional patch (#2016244)
* Tue Sep 14 2021 Marek Polacek <polacek@redhat.com> 10.3.1-1.1
- bump NVR for rebuild (#1995192)
* Mon Apr 26 2021 Marek Polacek <polacek@redhat.com> 10.3.1-1
- update from Fedora gcc 10.3.1-1 (#1929382)
- drop gcc10-pr97060.patch
- use --enable-cet
- ship gcc-accel-nvptx-none-lto-dump
- backport PR96939 fixes
* Tue Mar 16 2021 Marek Polacek <polacek@redhat.com> 10.2.1-8.2
- actually use libgfortran_nonshared.a (#1929375)
- have libasan-devel require libasan6 (#1939638)
* Mon Nov 16 2020 Marek Polacek <polacek@redhat.com> 10.2.1-8.1
- apply fix for -flto=auto with missing make (#1896093, PR lto/97524)