Browse Source

initial package creation

Signed-off-by: Toshaan Bharvani <toshaan@powerel.org>
master
Toshaan Bharvani 3 years ago
commit
8cbf89f009
  1. 44
      SOURCES/cross-gcc-config.patch
  2. 38
      SOURCES/cross-gcc-format-config.patch
  3. 14
      SOURCES/cross-intl-filename.patch
  4. 27
      SOURCES/gcc11-Wno-format-security.patch
  5. 20
      SOURCES/gcc11-d-shared-libphobos.patch
  6. 116
      SOURCES/gcc11-foffload-default.patch
  7. 126
      SOURCES/gcc11-hack.patch
  8. 17
      SOURCES/gcc11-libgomp-omp_h-multilib.patch
  9. 27
      SOURCES/gcc11-libtool-no-rpath.patch
  10. 37
      SOURCES/gcc11-no-add-needed.patch
  11. 176
      SOURCES/gcc11-pr99341-revert.patch
  12. 30
      SOURCES/gcc11-rh1574936.patch
  13. 40
      SOURCES/gcc11-sparc-config-detection.patch
  14. 954
      SPECS/cross-gcc.spec

44
SOURCES/cross-gcc-config.patch

@ -0,0 +1,44 @@ @@ -0,0 +1,44 @@
diff -Nrup libiberty/acinclude.m4 libiberty/aclocal.m4
--- libiberty/acinclude.m4.orig 2021-07-24 20:41:34.037240447 +0100
+++ libiberty/acinclude.m4 2021-07-24 20:42:08.993997401 +0100
@@ -157,7 +157,7 @@
fi
AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
-[AC_TRY_RUN([find_stack_direction ()
+[AC_TRY_RUN([__attribute__ ((noclone,noinline)) find_stack_direction ()
{
static char *addr = 0;
auto char dummy;
diff --git config/intdiv0.m4 b//config/intdiv0.m4
index 55dddcf1..ba906efc 100644
--- config/intdiv0.m4
+++ config/intdiv0.m4
@@ -31,10 +31,10 @@ sigfpe_handler (sig) int sig;
exit (sig != SIGFPE);
}
-int x = 1;
-int y = 0;
-int z;
-int nan;
+volatile int x = 1;
+volatile int y = 0;
+volatile int z;
+volatile int nan;
int main ()
{
diff --git libiberty/configure.ac libiberty/configure.ac
index f1ce7601..fc20d228 100644
--- libiberty/configure.ac
+++ libiberty/configure.ac
@@ -661,7 +661,7 @@ if test -z "${setobjs}"; then
for v in $vars; do
AC_MSG_CHECKING([for $v])
AC_CACHE_VAL(libiberty_cv_var_$v,
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[int *p;]],[[extern int $v []; p = $v;]])],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[__attribute__ ((used)) int *p;]],[[extern int $v []; p = $v;]])],
[eval "libiberty_cv_var_$v=yes"],
[eval "libiberty_cv_var_$v=no"])])
if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then

38
SOURCES/cross-gcc-format-config.patch

@ -0,0 +1,38 @@ @@ -0,0 +1,38 @@
--- gcc/config/m68k/m68k.c.orig 2020-08-26 10:08:06.000000000 +0100
+++ gcc/config/m68k/m68k.c 2020-09-03 11:17:54.722580771 +0100
@@ -4979,7 +4979,7 @@
else if (letter == '/')
asm_fprintf (file, "%R");
else if (letter == '?')
- asm_fprintf (file, m68k_library_id_string);
+ asm_fprintf (file, "%s", m68k_library_id_string);
else if (letter == 'p')
{
output_addr_const (file, op);
--- gcc/config/s390/s390.c.orig 2020-08-26 10:08:06.000000000 +0100
+++ gcc/config/s390/s390.c 2020-09-03 11:17:54.731580857 +0100
@@ -7862,11 +7862,11 @@
}
return;
case 'C':
- fprintf (file, s390_branch_condition_mnemonic (x, FALSE));
+ fprintf (file, "%s", s390_branch_condition_mnemonic (x, FALSE));
return;
case 'D':
- fprintf (file, s390_branch_condition_mnemonic (x, TRUE));
+ fprintf (file, "%s", s390_branch_condition_mnemonic (x, TRUE));
return;
case 'E':
--- gcc/config/tilegx/tilegx.c.orig 2020-08-26 10:08:06.000000000 +0100
+++ gcc/config/tilegx/tilegx.c 2020-09-03 11:17:54.735580895 +0100
@@ -5349,7 +5349,7 @@
gcc_unreachable ();
}
- fprintf (file, reg);
+ fprintf (file, "%s", reg);
return;
}

14
SOURCES/cross-intl-filename.patch

@ -0,0 +1,14 @@ @@ -0,0 +1,14 @@
diff -uNr --exclude '*~' gcc-4.7.0-RC-20120302/gcc/intl.c gcc-4.7.0-RC-20120302-old/gcc/intl.c
--- gcc/intl.c 2010-12-01 17:29:12.000000000 +0000
+++ gcc/intl.c 2012-03-15 14:49:19.709968148 +0000
@@ -55,8 +55,8 @@
setlocale (LC_ALL, "");
#endif
- (void) bindtextdomain ("gcc", LOCALEDIR);
- (void) textdomain ("gcc");
+ (void) bindtextdomain ("cross-gcc", LOCALEDIR);
+ (void) textdomain ("cross-gcc");
/* Opening quotation mark. */
open_quote = _("`");

27
SOURCES/gcc11-Wno-format-security.patch

@ -0,0 +1,27 @@ @@ -0,0 +1,27 @@
2017-02-25 Jakub Jelinek <jakub@redhat.com>

* configure.ac: When adding -Wno-format, also add -Wno-format-security.
* configure: Regenerated.

--- gcc/configure.ac.jj 2017-02-13 12:20:53.000000000 +0100
+++ gcc/configure.ac 2017-02-25 12:42:32.859175403 +0100
@@ -480,7 +480,7 @@ AC_ARG_ENABLE(build-format-warnings,
AS_HELP_STRING([--disable-build-format-warnings],[don't use -Wformat while building GCC]),
[],[enable_build_format_warnings=yes])
AS_IF([test $enable_build_format_warnings = no],
- [wf_opt=-Wno-format],[wf_opt=])
+ [wf_opt="-Wno-format -Wno-format-security"],[wf_opt=])
ACX_PROG_CXX_WARNING_OPTS(
m4_quote(m4_do([-W -Wall -Wno-narrowing -Wwrite-strings ],
[-Wcast-qual -Wno-error=format-diag $wf_opt])),
--- gcc/configure.jj 2017-02-13 12:20:52.000000000 +0100
+++ gcc/configure 2017-02-25 12:42:50.041946391 +0100
@@ -6647,7 +6647,7 @@ else
fi
if test $enable_build_format_warnings = no; then :
- wf_opt=-Wno-format
+ wf_opt="-Wno-format -Wno-format-security"
else
wf_opt=
fi

20
SOURCES/gcc11-d-shared-libphobos.patch

@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
2019-01-17 Jakub Jelinek <jakub@redhat.com>

* d-spec.cc (lang_specific_driver): Make -shared-libphobos
the default rather than -static-libphobos.

--- gcc/d/d-spec.cc.jj 2019-01-01 12:37:49.502444257 +0100
+++ gcc/d/d-spec.cc 2019-01-17 17:09:45.364949246 +0100
@@ -408,9 +408,9 @@ lang_specific_driver (cl_decoded_option
/* Add `-lgphobos' if we haven't already done so. */
if (phobos_library != PHOBOS_NOLINK)
{
- /* Default to static linking. */
- if (phobos_library != PHOBOS_DYNAMIC)
- phobos_library = PHOBOS_STATIC;
+ /* Default to shared linking. */
+ if (phobos_library != PHOBOS_STATIC)
+ phobos_library = PHOBOS_DYNAMIC;
#ifdef HAVE_LD_STATIC_DYNAMIC
if (phobos_library == PHOBOS_STATIC && !static_link)

116
SOURCES/gcc11-foffload-default.patch

@ -0,0 +1,116 @@ @@ -0,0 +1,116 @@
2019-01-17 Jakub Jelinek <jakub@redhat.com>

* gcc.c (offload_targets_default): New variable.
(process_command): Set it if -foffload is defaulted.
(driver::maybe_putenv_OFFLOAD_TARGETS): Add OFFLOAD_TARGET_DEFAULT=1
into environment if -foffload has been defaulted.
* lto-wrapper.c (OFFLOAD_TARGET_DEFAULT_ENV): Define.
(compile_offload_image): If OFFLOAD_TARGET_DEFAULT
is in the environment, don't fail if corresponding mkoffload
can't be found.
(compile_images_for_offload_targets): Likewise. Free and clear
offload_names if no valid offload is found.
libgomp/
* target.c (gomp_load_plugin_for_device): If a plugin can't be
dlopened, assume it has no devices silently.

--- gcc/gcc.c.jj 2017-01-17 10:28:40.000000000 +0100
+++ gcc/gcc.c 2017-01-20 16:26:29.649962902 +0100
@@ -319,6 +319,10 @@ static const char *spec_host_machine = D
static char *offload_targets = NULL;
+/* Set to true if -foffload has not been used and offload_targets
+ is set to the configured in default. */
+static bool offload_targets_default;
+
/* Nonzero if cross-compiling.
When -b is used, the value comes from the `specs' file. */
@@ -4828,7 +4832,10 @@ process_command (unsigned int decoded_op
/* If the user didn't specify any, default to all configured offload
targets. */
if (ENABLE_OFFLOADING && offload_targets == NULL)
- handle_foffload_option (OFFLOAD_TARGETS);
+ {
+ handle_foffload_option (OFFLOAD_TARGETS);
+ offload_targets_default = true;
+ }
/* Handle -gtoggle as it would later in toplev.c:process_options to
make the debug-level-gt spec function work as expected. */
@@ -8494,6 +8501,8 @@ driver::maybe_putenv_OFFLOAD_TARGETS ()
obstack_grow (&collect_obstack, offload_targets,
strlen (offload_targets) + 1);
xputenv (XOBFINISH (&collect_obstack, char *));
+ if (offload_targets_default)
+ xputenv ("OFFLOAD_TARGET_DEFAULT=1");
}
free (offload_targets);
--- gcc/lto-wrapper.c.jj 2017-01-01 12:45:34.000000000 +0100
+++ gcc/lto-wrapper.c 2017-01-20 16:34:18.294016997 +0100
@@ -52,6 +52,7 @@ along with GCC; see the file COPYING3.
/* Environment variable, used for passing the names of offload targets from GCC
driver to lto-wrapper. */
#define OFFLOAD_TARGET_NAMES_ENV "OFFLOAD_TARGET_NAMES"
+#define OFFLOAD_TARGET_DEFAULT_ENV "OFFLOAD_TARGET_DEFAULT"
/* By default there is no special suffix for target executables. */
#ifdef TARGET_EXECUTABLE_SUFFIX
@@ -906,6 +907,12 @@ compile_offload_image (const char *targe
break;
}
+ if (!compiler && getenv (OFFLOAD_TARGET_DEFAULT_ENV))
+ {
+ free_array_of_ptrs ((void **) paths, n_paths);
+ return NULL;
+ }
+
if (!compiler)
fatal_error (input_location,
"could not find %s in %s (consider using %<-B%>)",
@@ -975,6 +982,7 @@ compile_images_for_offload_targets (unsi
if (!target_names)
return;
unsigned num_targets = parse_env_var (target_names, &names, NULL);
+ int next_name_entry = 0;
const char *compiler_path = getenv ("COMPILER_PATH");
if (!compiler_path)
@@ -985,13 +993,19 @@ compile_images_for_offload_targets (unsi
offload_names = XCNEWVEC (char *, num_targets + 1);
for (unsigned i = 0; i < num_targets; i++)
{
- offload_names[i]
+ offload_names[next_name_entry]
= compile_offload_image (names[i], compiler_path, in_argc, in_argv,
compiler_opts, compiler_opt_count,
linker_opts, linker_opt_count);
- if (!offload_names[i])
- fatal_error (input_location,
- "problem with building target image for %s", names[i]);
+ if (!offload_names[next_name_entry])
+ continue;
+ next_name_entry++;
+ }
+
+ if (next_name_entry == 0)
+ {
+ free (offload_names);
+ offload_names = NULL;
}
out:
--- libgomp/target.c.jj 2017-01-01 12:45:52.000000000 +0100
+++ libgomp/target.c 2017-01-20 20:12:13.756710875 +0100
@@ -2356,7 +2356,7 @@ gomp_load_plugin_for_device (struct gomp
void *plugin_handle = dlopen (plugin_name, RTLD_LAZY);
if (!plugin_handle)
- goto dl_fail;
+ return 0;
/* Check if all required functions are available in the plugin and store
their handlers. None of the symbols can legitimately be NULL,

126
SOURCES/gcc11-hack.patch

@ -0,0 +1,126 @@ @@ -0,0 +1,126 @@
--- libada/Makefile.in.jj 2019-01-09 13:01:18.015608205 +0100
+++ libada/Makefile.in 2019-01-11 18:16:23.441726931 +0100
@@ -71,18 +71,40 @@ version := $(shell @get_gcc_base_ver@ $(
libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR)
ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
+DEFAULTMULTIFLAGS :=
+ifeq ($(MULTISUBDIR),)
+targ:=$(subst -, ,$(target))
+arch:=$(word 1,$(targ))
+ifeq ($(words $(targ)),2)
+osys:=$(word 2,$(targ))
+else
+osys:=$(word 3,$(targ))
+endif
+ifeq ($(strip $(filter-out i%86 x86_64 powerpc% ppc% s390% sparc% linux%, $(arch) $(osys))),)
+ifeq ($(shell $(CC) $(CFLAGS) -print-multi-os-directory),../lib64)
+DEFAULTMULTIFLAGS := -m64
+else
+ifeq ($(strip $(filter-out s390%, $(arch))),)
+DEFAULTMULTIFLAGS := -m31
+else
+DEFAULTMULTIFLAGS := -m32
+endif
+endif
+endif
+endif
+
# exeext should not be used because it's the *host* exeext. We're building
# a *target* library, aren't we?!? Likewise for CC. Still, provide bogus
# definitions just in case something slips through the safety net provided
# by recursive make invocations in gcc/ada/Makefile.in
LIBADA_FLAGS_TO_PASS = \
"MAKEOVERRIDES=" \
- "LDFLAGS=$(LDFLAGS)" \
+ "LDFLAGS=$(LDFLAGS) $(DEFAULTMULTIFLAGS)" \
"LN_S=$(LN_S)" \
"SHELL=$(SHELL)" \
- "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \
- "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \
- "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS)" \
+ "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
+ "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
+ "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS)" \
"PICFLAG_FOR_TARGET=$(PICFLAG)" \
"THREAD_KIND=$(THREAD_KIND)" \
"TRACE=$(TRACE)" \
@@ -93,7 +115,7 @@ LIBADA_FLAGS_TO_PASS = \
"exeext=.exeext.should.not.be.used " \
'CC=the.host.compiler.should.not.be.needed' \
"GCC_FOR_TARGET=$(CC)" \
- "CFLAGS=$(CFLAGS)"
+ "CFLAGS=$(CFLAGS) $(DEFAULTMULTIFLAGS)"
.PHONY: libada gnatlib gnatlib-shared gnatlib-sjlj gnatlib-zcx osconstool
--- config-ml.in.jj 2019-01-09 12:50:16.646501448 +0100
+++ config-ml.in 2019-01-11 18:16:23.442726914 +0100
@@ -511,6 +511,8 @@ multi-do:
ADAFLAGS="$(ADAFLAGS) $${flags}" \
prefix="$(prefix)" \
exec_prefix="$(exec_prefix)" \
+ mandir="$(mandir)" \
+ infodir="$(infodir)" \
GOCFLAGS="$(GOCFLAGS) $${flags}" \
GDCFLAGS="$(GDCFLAGS) $${flags}" \
CXXFLAGS="$(CXXFLAGS) $${flags}" \
--- libcpp/macro.c.jj 2019-01-09 13:01:21.420552123 +0100
+++ libcpp/macro.c 2019-01-11 18:18:17.736876285 +0100
@@ -3256,8 +3256,6 @@ static cpp_macro *
create_iso_definition (cpp_reader *pfile)
{
bool following_paste_op = false;
- const char *paste_op_error_msg =
- N_("'##' cannot appear at either end of a macro expansion");
unsigned int num_extra_tokens = 0;
unsigned nparms = 0;
cpp_hashnode **params = NULL;
@@ -3382,7 +3380,9 @@ create_iso_definition (cpp_reader *pfile
function-like macros, but not at the end. */
if (following_paste_op)
{
- cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
+ cpp_error (pfile, CPP_DL_ERROR,
+ "'##' cannot appear at either end of a macro "
+ "expansion");
goto out;
}
if (!vaopt_tracker.completed ())
@@ -3397,7 +3397,9 @@ create_iso_definition (cpp_reader *pfile
function-like macros, but not at the beginning. */
if (macro->count == 1)
{
- cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
+ cpp_error (pfile, CPP_DL_ERROR,
+ "'##' cannot appear at either end of a macro "
+ "expansion");
goto out;
}
--- libcpp/expr.c.jj 2019-01-09 13:01:22.415535734 +0100
+++ libcpp/expr.c 2019-01-11 18:16:23.444726882 +0100
@@ -803,16 +803,17 @@ cpp_classify_number (cpp_reader *pfile,
if ((result & CPP_N_WIDTH) == CPP_N_LARGE
&& CPP_OPTION (pfile, cpp_warn_long_long))
{
- const char *message = CPP_OPTION (pfile, cplusplus)
- ? N_("use of C++11 long long integer constant")
- : N_("use of C99 long long integer constant");
-
if (CPP_OPTION (pfile, c99))
cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location,
- 0, message);
+ 0, CPP_OPTION (pfile, cplusplus)
+ ? N_("use of C++11 long long integer constant")
+ : N_("use of C99 long long integer constant"));
else
cpp_pedwarning_with_line (pfile, CPP_W_LONG_LONG,
- virtual_location, 0, message);
+ virtual_location, 0,
+ CPP_OPTION (pfile, cplusplus)
+ ? N_("use of C++11 long long integer constant")
+ : N_("use of C99 long long integer constant"));
}
if ((result & CPP_N_SIZE_T) == CPP_N_SIZE_T

17
SOURCES/gcc11-libgomp-omp_h-multilib.patch

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
2008-06-09 Jakub Jelinek <jakub@redhat.com>

* omp.h.in (omp_nest_lock_t): Fix up for Linux multilibs.

--- libgomp/omp.h.in.jj 2008-06-09 13:34:05.000000000 +0200
+++ libgomp/omp.h.in 2008-06-09 13:34:48.000000000 +0200
@@ -42,8 +42,8 @@ typedef struct
typedef struct
{
- unsigned char _x[@OMP_NEST_LOCK_SIZE@]
- __attribute__((__aligned__(@OMP_NEST_LOCK_ALIGN@)));
+ unsigned char _x[8 + sizeof (void *)]
+ __attribute__((__aligned__(sizeof (void *))));
} omp_nest_lock_t;
#endif

27
SOURCES/gcc11-libtool-no-rpath.patch

@ -0,0 +1,27 @@ @@ -0,0 +1,27 @@
libtool sucks.
--- ltmain.sh.jj 2007-12-07 14:53:21.000000000 +0100
+++ ltmain.sh 2008-09-05 21:51:48.000000000 +0200
@@ -5394,6 +5394,7 @@ EOF
rpath="$finalize_rpath"
test "$mode" != relink && rpath="$compile_rpath$rpath"
for libdir in $rpath; do
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
@@ -6071,6 +6072,7 @@ EOF
rpath=
hardcode_libdirs=
for libdir in $compile_rpath $finalize_rpath; do
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
@@ -6120,6 +6122,7 @@ EOF
rpath=
hardcode_libdirs=
for libdir in $finalize_rpath; do
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then

37
SOURCES/gcc11-no-add-needed.patch

@ -0,0 +1,37 @@ @@ -0,0 +1,37 @@
2010-02-08 Roland McGrath <roland@redhat.com>

* config/gnu-user.h (LINK_EH_SPEC): Pass --no-add-needed to the linker.
* config/alpha/elf.h (LINK_EH_SPEC): Likewise.
* config/ia64/linux.h (LINK_EH_SPEC): Likewise.

--- gcc/config/alpha/elf.h.jj 2011-01-03 12:52:31.118056764 +0100
+++ gcc/config/alpha/elf.h 2011-01-04 18:14:10.931874160 +0100
@@ -168,5 +168,5 @@ extern int alpha_this_gpdisp_sequence_nu
I imagine that other systems will catch up. In the meantime, it
doesn't harm to make sure that the data exists to be used later. */
#if defined(HAVE_LD_EH_FRAME_HDR)
-#define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} "
+#define LINK_EH_SPEC "--no-add-needed %{!static|static-pie:--eh-frame-hdr} "
#endif
--- gcc/config/ia64/linux.h.jj 2011-01-03 13:02:11.462994522 +0100
+++ gcc/config/ia64/linux.h 2011-01-04 18:14:10.931874160 +0100
@@ -76,7 +76,7 @@ do { \
Signalize that because we have fde-glibc, we don't need all C shared libs
linked against -lgcc_s. */
#undef LINK_EH_SPEC
-#define LINK_EH_SPEC ""
+#define LINK_EH_SPEC "--no-add-needed "
#undef TARGET_INIT_LIBFUNCS
#define TARGET_INIT_LIBFUNCS ia64_soft_fp_init_libfuncs
--- gcc/config/gnu-user.h.jj 2011-01-03 12:53:03.739057299 +0100
+++ gcc/config/gnu-user.h 2011-01-04 18:14:10.932814884 +0100
@@ -106,7 +106,7 @@ see the files COPYING3 and COPYING.RUNTI
#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC
#if defined(HAVE_LD_EH_FRAME_HDR)
-#define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} "
+#define LINK_EH_SPEC "--no-add-needed %{!static|static-pie:--eh-frame-hdr} "
#endif
#define GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC \

176
SOURCES/gcc11-pr99341-revert.patch

@ -0,0 +1,176 @@ @@ -0,0 +1,176 @@
libstdc++: Remove symbols for new std::call_once implementation [PR 99341]
This removes the new symbols added for the new futex-based
std::call_once implementation. These symbols were new on trunk, so not
in any released version. However, they are already present in some
beta distro releases (Fedora Linux 34) and in Fedora Linux rawhide. This
change can be locally reverted by distros that need to keep the symbols
present until affected packages have been rebuilt.

Revert:
2021-03-12 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/99341
* config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Remove
std::once_flag symbols.
* config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Likewise.
* config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Likewise.
* config/abi/post/riscv64-linux-gnu/baseline_symbols.txt:
Likewise.
* config/abi/pre/gnu.ver: Likewise.
* src/c++11/mutex.cc [_GLIBCXX_HAVE_LINUX_FUTEX]
(struct __once_flag_compat): Remove.
(_ZNSt9once_flag11_M_activateEv): Remove.
(_ZNSt9once_flag9_M_finishEb): Remove.

--- libstdc++-v3/config/abi/post/aarch64-linux-gnu/baseline_symbols.txt
+++ libstdc++-v3/config/abi/post/aarch64-linux-gnu/baseline_symbols.txt
@@ -4086,6 +4086,8 @@ FUNC:_ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEEC2Em@@GLIBCXX
FUNC:_ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED0Ev@@GLIBCXX_3.4
FUNC:_ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED1Ev@@GLIBCXX_3.4
FUNC:_ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED2Ev@@GLIBCXX_3.4
+FUNC:_ZNSt9once_flag11_M_activateEv@@GLIBCXX_3.4.29
+FUNC:_ZNSt9once_flag9_M_finishEb@@GLIBCXX_3.4.29
FUNC:_ZNSt9strstream3strEv@@GLIBCXX_3.4
FUNC:_ZNSt9strstream6freezeEb@@GLIBCXX_3.4
FUNC:_ZNSt9strstreamC1EPciSt13_Ios_Openmode@@GLIBCXX_3.4
--- libstdc++-v3/config/abi/post/ia64-linux-gnu/baseline_symbols.txt
+++ libstdc++-v3/config/abi/post/ia64-linux-gnu/baseline_symbols.txt
@@ -4086,6 +4086,8 @@ FUNC:_ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEEC2Em@@GLIBCXX
FUNC:_ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED0Ev@@GLIBCXX_3.4
FUNC:_ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED1Ev@@GLIBCXX_3.4
FUNC:_ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED2Ev@@GLIBCXX_3.4
+FUNC:_ZNSt9once_flag11_M_activateEv@@GLIBCXX_3.4.29
+FUNC:_ZNSt9once_flag9_M_finishEb@@GLIBCXX_3.4.29
FUNC:_ZNSt9strstream3strEv@@GLIBCXX_3.4
FUNC:_ZNSt9strstream6freezeEb@@GLIBCXX_3.4
FUNC:_ZNSt9strstreamC1EPciSt13_Ios_Openmode@@GLIBCXX_3.4
--- libstdc++-v3/config/abi/post/m68k-linux-gnu/baseline_symbols.txt
+++ libstdc++-v3/config/abi/post/m68k-linux-gnu/baseline_symbols.txt
@@ -4086,6 +4086,8 @@ FUNC:_ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEEC2Ej@@GLIBCXX
FUNC:_ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED0Ev@@GLIBCXX_3.4
FUNC:_ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED1Ev@@GLIBCXX_3.4
FUNC:_ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED2Ev@@GLIBCXX_3.4
+FUNC:_ZNSt9once_flag11_M_activateEv@@GLIBCXX_3.4.29
+FUNC:_ZNSt9once_flag9_M_finishEb@@GLIBCXX_3.4.29
FUNC:_ZNSt9strstream3strEv@@GLIBCXX_3.4
FUNC:_ZNSt9strstream6freezeEb@@GLIBCXX_3.4
FUNC:_ZNSt9strstreamC1EPciSt13_Ios_Openmode@@GLIBCXX_3.4
--- libstdc++-v3/config/abi/post/riscv64-linux-gnu/baseline_symbols.txt
+++ libstdc++-v3/config/abi/post/riscv64-linux-gnu/baseline_symbols.txt
@@ -4086,6 +4086,8 @@ FUNC:_ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEEC2Em@@GLIBCXX
FUNC:_ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED0Ev@@GLIBCXX_3.4
FUNC:_ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED1Ev@@GLIBCXX_3.4
FUNC:_ZNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED2Ev@@GLIBCXX_3.4
+FUNC:_ZNSt9once_flag11_M_activateEv@@GLIBCXX_3.4.29
+FUNC:_ZNSt9once_flag9_M_finishEb@@GLIBCXX_3.4.29
FUNC:_ZNSt9strstream3strEv@@GLIBCXX_3.4
FUNC:_ZNSt9strstream6freezeEb@@GLIBCXX_3.4
FUNC:_ZNSt9strstreamC1EPciSt13_Ios_Openmode@@GLIBCXX_3.4
--- libstdc++-v3/config/abi/pre/gnu.ver
+++ libstdc++-v3/config/abi/pre/gnu.ver
@@ -2388,6 +2388,11 @@ GLIBCXX_3.4.29 {
_ZNKRSt7__cxx1118basic_stringstreamI[cw]St11char_traitsI[cw]ESaI[cw]EE3strEv;
_ZNSt7__cxx1118basic_stringstreamI[cw]St11char_traitsI[cw]ESaI[cw]EE3strEONS_12basic_stringI[cw]S2_S3_EE;
+ # std::once_flag::_M_activate()
+ _ZNSt9once_flag11_M_activateEv;
+ # std::once_flag::_M_finish(bool)
+ _ZNSt9once_flag9_M_finishEb;
+
# std::to_chars(char*, char*, [float|double|long double])
_ZSt8to_charsPcS_[def];
# std::to_chars(char*, char*, [float|double|long double], chars_format)
--- libstdc++-v3/src/c++11/mutex.cc
+++ libstdc++-v3/src/c++11/mutex.cc
@@ -26,6 +26,90 @@
#ifdef _GLIBCXX_HAS_GTHREADS
+#if defined _GLIBCXX_SHARED && ! _GLIBCXX_INLINE_VERSION
+
+#ifdef _GLIBCXX_HAVE_LINUX_FUTEX
+# include <syscall.h>
+# include <unistd.h>
+# include <limits.h>
+
+namespace std _GLIBCXX_VISIBILITY(default)
+{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
+struct __once_flag_compat
+{
+ enum _Bits : int { _Init = 0, _Active = 1, _Done = 2 };
+ int _M_once = 0;
+ bool _M_activate();
+ void _M_finish(bool returning) noexcept;
+};
+
+bool
+__once_flag_compat::_M_activate()
+{
+ if (__gnu_cxx::__is_single_threaded())
+ {
+ if (_M_once == _Bits::_Done)
+ return false;
+ _M_once = _Bits::_Active;
+ return true;
+ }
+
+ while (true)
+ {
+ int expected = _Bits::_Init;
+ constexpr int active = _Bits::_Active;
+ if (__atomic_compare_exchange_n(&_M_once, &expected, active, false,
+ __ATOMIC_ACQ_REL,
+ __ATOMIC_ACQUIRE))
+ {
+ // This thread is now doing an active execution.
+ return true;
+ }
+
+ if (expected == _Bits::_Done)
+ return false; // A returning execution happened, this is passive.
+
+ // Otherwise, an active execution is happening. Wait for it to finish.
+ constexpr int futex_wait = 128; // FUTEX_WAIT_PRIVATE
+ syscall (SYS_futex, &_M_once, futex_wait, expected, 0);
+ }
+}
+
+void
+std::__once_flag_compat::_M_finish(bool returning) noexcept
+{
+ const int newval = returning ? _Bits::_Done : _Bits::_Init;
+ if (__gnu_cxx::__is_single_threaded())
+ {
+ __glibcxx_assert(_M_once == _Bits::_Active);
+ _M_once = newval;
+ }
+ else
+ {
+ int prev [[maybe_unused]]
+ = __atomic_exchange_n(&_M_once, newval, __ATOMIC_RELEASE);
+ __glibcxx_assert(prev & _Bits::_Active);
+ // Wake any other threads waiting for this execution to finish.
+ constexpr int futex_wake = 129; // FUTEX_WAKE_PRIVATE
+ syscall (SYS_futex, &_M_once, futex_wake, INT_MAX);
+ }
+}
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wattribute-alias"
+extern "C" bool _ZNSt9once_flag11_M_activateEv()
+ __attribute__((alias ("_ZNSt18__once_flag_compat11_M_activateEv")));
+extern "C" void _ZNSt9once_flag9_M_finishEb() noexcept
+ __attribute__((alias ("_ZNSt18__once_flag_compat9_M_finishEb")));
+#pragma GCC diagnostic pop
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace std
+#endif // FUTEX
+#endif // ONCE_FLAG_COMPAT && SHARED && ! INLINE_VERSION
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION

30
SOURCES/gcc11-rh1574936.patch

@ -0,0 +1,30 @@ @@ -0,0 +1,30 @@
crt files and statically linked libgcc objects cause false positives
in annobin coverage, so we add the assembler flag to generate notes
for them.

The patch also adds notes to libgcc_s.so, but this is harmless because
these notes only confer that there is no other annobin markup.

2018-07-25 Florian Weimer <fweimer@redhat.com>

* Makefile.in (LIBGCC2_CFLAGS, CRTSTUFF_CFLAGS): Add
-Wa,--generate-missing-build-notes=yes.

--- libgcc/Makefile.in 2018-01-13 13:05:41.000000000 +0100
+++ libgcc/Makefile.in 2018-07-25 13:15:02.036226940 +0200
@@ -246,6 +246,7 @@ LIBGCC2_DEBUG_CFLAGS = -g
LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \
$(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 \
-fbuilding-libgcc -fno-stack-protector \
+ -Wa,--generate-missing-build-notes=yes \
$(INHIBIT_LIBC_CFLAGS)
# Additional options to use when compiling libgcc2.a.
@@ -301,6 +302,7 @@ CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(IN
$(NO_PIE_CFLAGS) -finhibit-size-directive -fno-inline -fno-exceptions \
-fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \
-fbuilding-libgcc -fno-stack-protector $(FORCE_EXPLICIT_EH_REGISTRY) \
+ -Wa,--generate-missing-build-notes=yes \
$(INHIBIT_LIBC_CFLAGS) $(USE_TM_CLONE_REGISTRY)
# Extra flags to use when compiling crt{begin,end}.o.

40
SOURCES/gcc11-sparc-config-detection.patch

@ -0,0 +1,40 @@ @@ -0,0 +1,40 @@
--- gcc/config.gcc.jj 2008-04-24 15:42:46.000000000 -0500
+++ gcc/config.gcc 2008-04-24 15:44:51.000000000 -0500
@@ -2790,7 +2790,7 @@ sparc-*-rtems*)
tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems"
;;
-sparc-*-linux*)
+sparc-*-linux* | sparcv9-*-linux*)
tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/tso.h"
extra_options="${extra_options} sparc/long-double-switch.opt"
case ${target} in
@@ -2844,7 +2844,7 @@ sparc64-*-rtems*)
extra_options="${extra_options}"
tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems-64"
;;
-sparc64-*-linux*)
+sparc64*-*-linux*)
tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/default64.h sparc/linux64.h sparc/tso.h"
extra_options="${extra_options} sparc/long-double-switch.opt"
tmake_file="${tmake_file} sparc/t-sparc sparc/t-linux64"
--- libgcc/config.host.jj 2008-04-24 15:46:19.000000000 -0500
+++ libgcc/config.host 2008-04-24 15:46:49.000000000 -0500
@@ -1002,7 +1002,7 @@ sparc-*-elf*)
tmake_file="${tmake_file} t-fdpbit t-crtfm"
extra_parts="$extra_parts crti.o crtn.o crtfastmath.o"
;;
-sparc-*-linux*) # SPARC's running GNU/Linux, libc6
+sparc-*-linux* | sparcv9-*-linux*) # SPARC's running GNU/Linux, libc6
tmake_file="${tmake_file} t-crtfm"
if test "${host_address}" = 64; then
tmake_file="$tmake_file sparc/t-linux64"
@@ -1050,7 +1050,7 @@ sparc64-*-freebsd*|ultrasparc-*-freebsd*
tmake_file="$tmake_file t-crtfm"
extra_parts="$extra_parts crtfastmath.o"
;;
-sparc64-*-linux*) # 64-bit SPARC's running GNU/Linux
+sparc64*-*-linux*) # 64-bit SPARC's running GNU/Linux
extra_parts="$extra_parts crtfastmath.o"
tmake_file="${tmake_file} t-crtfm sparc/t-linux"
if test "${host_address}" = 64; then

954
SPECS/cross-gcc.spec

@ -0,0 +1,954 @@ @@ -0,0 +1,954 @@
# workaround LTO related issue when stripping the target files (#1863378)
%global __brp_strip_lto %{nil}

%global cross cross
%global rpmprefix %{nil}

%global build_all 1
%global build_aarch64 %{build_all}
%global build_alpha %{build_all}
%global build_arm %{build_all}
%global build_arc %{build_all}
%global build_avr32 %{build_all}
%global build_blackfin %{build_all}
%global build_c6x %{build_all}
%global build_cris %{build_all}
%global build_frv %{build_all}
%global build_h8300 %{build_all}
%global build_hppa %{build_all}
%global build_hppa64 %{build_all}
%global build_ia64 %{build_all}
%global build_m32r %{build_all}
%global build_m68k %{build_all}
%global build_microblaze %{build_all}
%global build_mips64 %{build_all}
%global build_mn10300 %{build_all}
%global build_nios2 %{build_all}
%global build_openrisc %{build_all}
%global build_powerpc64 %{build_all}
%global build_powerpc64le %{build_all}
%global build_riscv64 %{build_all}
%global build_s390x %{build_all}
%global build_sh %{build_all}
%global build_sparc64 %{build_all}
%global build_tile %{build_all}
%global build_x86_64 %{build_all}
%global build_xtensa %{build_all}

# built compiler generates lots of ICEs
# - none at this time

# gcc considers obsolete
%global build_score 0
%global build_sh64 0
%global build_sh 0
%global build_cris 0

# gcc doesn't build
# - none at this time

# 32-bit packages we don't build as we can use the 64-bit package instead
%global build_i386 0
%global build_mips 0
%global build_powerpc 0
%global build_s390 0
%global build_sh4 0
%global build_sparc 0

# gcc doesn't support
%global build_metag 0

# not available in binutils-2.22
%global build_unicore32 0

%global multilib_64_archs sparc64 ppc64 s390x x86_64

# we won't build libgcc for these as it depends on C library or kernel headers
# % global no_libgcc_targets nios2*|tile-*
%global no_libgcc_targets none

###############################################################################
#
# The gcc versioning information. In a sed command below, the specfile winds
# pre-release version numbers in BASE-VER back to the last actually-released
# number.
%global DATE 20210728
%global gitrev 134ab8155c937122663513b76afa8e64ad61fe99
%global gcc_version 11.2.1
%global gcc_major 11

# Note, cross_gcc_release must be integer, if you want to add suffixes
# to %%{release}, append them after %%{cross_gcc_release} on Release:
# line. gcc_release is the Fedora gcc release that the patches were
# taken from.
%global gcc_release 1
%global cross_gcc_release 1
%global cross_binutils_version 2.35.1
%global isl_version 0.16.1
%global isl_libmajor 15

%global _performance_build 1
# Hardening slows the compiler way too much.
%undefine _hardened_build

Summary: Cross C compiler
Name: %{cross}-gcc
Version: %{gcc_version}
Release: %{cross_gcc_release}%{?dist}
# libgcc, libgfortran, libmudflap, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
URL: http://gcc.gnu.org
BuildRequires: gcc-c++ autoconf
BuildRequires: isl-devel >= %{isl_version}

# The source for this package was pulled from upstream's vcs. Use the
# following commands to generate the tarball:
# git clone --depth 1 git://gcc.gnu.org/git/gcc.git gcc-dir.tmp
# git --git-dir=gcc-dir.tmp/.git fetch --depth 1 origin %%{gitrev}
# git --git-dir=gcc-dir.tmp/.git archive --prefix=%%{name}-%%{version}-%%{DATE}/ %%{gitrev} | xz -9e > %%{name}-%%{version}-%%{DATE}.tar.xz
# rm -rf gcc-dir.tmp
%global srcdir gcc-%{version}-%{DATE}
Source0: %{srcdir}.tar.xz

Patch0: gcc11-hack.patch
Patch2: gcc11-sparc-config-detection.patch
Patch3: gcc11-libgomp-omp_h-multilib.patch
Patch4: gcc11-libtool-no-rpath.patch
Patch8: gcc11-no-add-needed.patch
Patch9: gcc11-foffload-default.patch
Patch10: gcc11-Wno-format-security.patch
Patch11: gcc11-rh1574936.patch
Patch12: gcc11-d-shared-libphobos.patch
Patch13: gcc11-pr99341-revert.patch

Patch900: cross-intl-filename.patch
Patch901: cross-gcc-format-config.patch
Patch902: cross-gcc-config.patch

%if 0%{?fedora} >= 29 || 0%{?rhel} > 7
BuildRequires: binutils >= 2.31
%else
BuildRequires: binutils >= 2.24
%endif
BuildRequires: zlib-devel, gettext, dejagnu, bison, flex, texinfo, sharutils
BuildRequires: %{cross}-binutils-common >= %{cross_binutils_version}

# Make sure pthread.h doesn't contain __thread tokens
# Make sure glibc supports stack protector
# Make sure glibc supports DT_GNU_HASH
BuildRequires: glibc-devel >= 2.4.90-13
BuildRequires: elfutils-devel >= 0.147
BuildRequires: elfutils-libelf-devel >= 0.147
BuildRequires: gmp-devel >= 4.1.2-8, mpfr-devel >= 2.2.1, libmpc-devel >= 0.8.1
Provides: bundled(libiberty)

%description
Cross-build GNU C compiler collection.

%package -n %{cross}-gcc-common
Summary: Cross-build GNU C compiler documentation and translation files
BuildArch: noarch

%description -n %{cross}-gcc-common
Documentation, manual pages and translation files for cross-build GNU C
compiler.

This is the common part of a set of cross-build GNU C compiler packages for
building kernels for other architectures. No support for cross-building
user space programs is currently supplied as that would massively multiply the
number of packages.

###############################################################################
#
# Conditional arch package definition
#
###############################################################################
%global do_package() \
%if %2 \
%package -n %{rpmprefix}gcc-%1 \
Summary: Cross-build binary utilities for %1 \
Requires: %{cross}-gcc-common == %{version}-%{release} \
BuildRequires: %{rpmprefix}binutils-%1 >= %{cross_binutils_version} \
Requires: %{rpmprefix}binutils-%1 >= %{cross_binutils_version} \
%if 0%{?__isa_bits} == 64 \
Requires: libisl.so.%{isl_libmajor}()(64bit) \
%else \
Requires: libisl.so.%{isl_libmajor} \
%endif \
%description -n %{rpmprefix}gcc-%1 \
Cross-build GNU C compiler. \
\
Only building kernels is currently supported. Support for cross-building \
user space programs is not currently provided as that would massively multiply \
the number of packages. \
\
%package -n %{rpmprefix}gcc-c++-%1 \
Summary: Cross-build binary utilities for %1 \
Requires: %{rpmprefix}gcc-%1 == %{version}-%{release} \
%description -n %{rpmprefix}gcc-c++-%1 \
Cross-build GNU C++ compiler. \
\
Only the compiler is provided; not libstdc++. Support for cross-building \
user space programs is not currently provided as that would massively multiply \
the number of packages. \
%endif

%global do_symlink() \
%if %2 \
%package -n gcc-%1 \
Summary: Cross-build binary utilities for %1 \
Requires: gcc-%3 == %{version}-%{release} \
%description -n gcc-%1 \
Cross-build GNU C++ compiler. \
\
Only building kernels is currently supported. Support for cross-building \
user space programs is not currently provided as that would massively multiply \
the number of packages. \
\
%package -n gcc-c++-%1 \
Summary: Cross-build binary utilities for %1 \
Requires: gcc-%1 == %{version}-%{release} \
Requires: gcc-c++-%3 == %{version}-%{release} \
%description -n gcc-c++-%1 \
Cross-build GNU C++ compiler. \
\
Only the compiler is provided; not libstdc++. Support for cross-building \
user space programs is not currently provided as that would massively multiply \
the number of packages. \
%endif

%do_package aarch64-linux-gnu %{build_aarch64}
%do_package alpha-linux-gnu %{build_alpha}
%do_package arc-linux-gnu %{build_arc}
%do_package arm-linux-gnu %{build_arm}
%do_package avr32-linux-gnu %{build_avr32}
%do_package bfin-linux-gnu %{build_blackfin}
%do_package c6x-linux-gnu %{build_c6x}
%do_package cris-linux-gnu %{build_cris}
%do_package frv-linux-gnu %{build_frv}
%do_package h8300-linux-gnu %{build_h8300}
%do_package hppa-linux-gnu %{build_hppa}
%do_package hppa64-linux-gnu %{build_hppa64}
%do_package i386-linux-gnu %{build_i386}
%do_package ia64-linux-gnu %{build_ia64}
%do_package m32r-linux-gnu %{build_m32r}
%do_package m68k-linux-gnu %{build_m68k}
%do_package metag-linux-gnu %{build_metag}
%do_package microblaze-linux-gnu %{build_microblaze}
%do_package mips-linux-gnu %{build_mips}
%do_package mips64-linux-gnu %{build_mips64}
%do_package mn10300-linux-gnu %{build_mn10300}
%do_package nios2-linux-gnu %{build_nios2}
%do_package openrisc-linux-gnu %{build_openrisc}
%do_package powerpc-linux-gnu %{build_powerpc}
%do_package powerpc64-linux-gnu %{build_powerpc64}
%do_package powerpc64le-linux-gnu %{build_powerpc64le}
%do_symlink ppc-linux-gnu %{build_powerpc} powerpc-linux-gnu
%do_symlink ppc64-linux-gnu %{build_powerpc64} powerpc64-linux-gnu
%do_symlink ppc64le-linux-gnu %{build_powerpc64le} powerpc64le-linux-gnu
%do_package riscv64-linux-gnu %{build_riscv64}
%do_package s390-linux-gnu %{build_s390}
%do_package s390x-linux-gnu %{build_s390x}
%do_package score-linux-gnu %{build_score}
%do_package sh-linux-gnu %{build_sh}
%do_package sh4-linux-gnu %{build_sh4}
%do_package sh64-linux-gnu %{build_sh64}
%do_package sparc-linux-gnu %{build_sparc}
%do_package sparc64-linux-gnu %{build_sparc64}
%do_package tile-linux-gnu %{build_tile}
%do_package unicore32-linux-gnu %{build_unicore32}
%do_package x86_64-linux-gnu %{build_x86_64}
%do_package xtensa-linux-gnu %{build_xtensa}

###############################################################################
#
# Preparation
#
###############################################################################
%prep

%setup -q -n %{srcdir} -c
cd %{srcdir}
%patch0 -p0 -b .hack~
%patch2 -p0 -b .sparc-config-detection~
%patch3 -p0 -b .libgomp-omp_h-multilib~
%patch4 -p0 -b .libtool-no-rpath~
%patch8 -p0 -b .no-add-needed~
%patch9 -p0 -b .foffload-default~
%patch10 -p0 -b .Wno-format-security~
%if 0%{?fedora} >= 29 || 0%{?rhel} > 7
%patch11 -p0 -b .rh1574936~
%endif
%patch12 -p0 -b .d-shared-libphobos~
%patch13 -p0 -b .pr99341-revert~

%patch900 -p0 -b .cross-intl~
%patch901 -p0 -b .format-config~
%patch902 -p0 -b .config

echo 'Red Hat Cross %{version}-%{cross_gcc_release}' > gcc/DEV-PHASE

echo 'TM_H += $(srcdir)/config/rs6000/rs6000-modes.h' >> gcc/config/rs6000/t-rs6000

pushd libiberty
autoconf -f
popd
pushd intl
autoconf -f
popd

./contrib/gcc_update --touch

LC_ALL=C sed -i -e 's/\xa0/ /' gcc/doc/options.texi

sed -i -e 's/Common Driver Var(flag_report_bug)/& Init(1)/' gcc/common.opt

# This test causes fork failures, because it spawns way too many threads
rm -f gcc/testsuite/go.test/test/chan/goroutines.go

function prep_target () {
target=$1
cond=$2

if [ $cond != 0 ]
then
echo $1 >&5
fi
}

cd ..

(
prep_target aarch64-linux-gnu %{build_aarch64}
prep_target alpha-linux-gnu %{build_alpha}
prep_target arc-linux-gnu %{build_arc}
prep_target arm-linux-gnu %{build_arm}
prep_target avr32-linux-gnu %{build_avr32}
prep_target bfin-linux-gnu %{build_blackfin}
prep_target c6x-linux-gnu %{build_c6x}
prep_target cris-linux-gnu %{build_cris}
prep_target frv-linux-gnu %{build_frv}
prep_target h8300-linux-gnu %{build_h8300}
prep_target hppa-linux-gnu %{build_hppa}
prep_target hppa64-linux-gnu %{build_hppa64}
prep_target i386-linux-gnu %{build_i386}
prep_target ia64-linux-gnu %{build_ia64}
prep_target m32r-linux-gnu %{build_m32r}
prep_target m68k-linux-gnu %{build_m68k}
prep_target metag-linux-gnu %{build_metag}
prep_target microblaze-linux-gnu %{build_microblaze}
prep_target mips-linux-gnu %{build_mips}
prep_target mips64-linux-gnu %{build_mips64}
prep_target mn10300-linux-gnu %{build_mn10300}
prep_target nios2-linux-gnu %{build_nios2}
prep_target openrisc-linux-gnu %{build_openrisc}
prep_target powerpc-linux-gnu %{build_powerpc}
prep_target powerpc64-linux-gnu %{build_powerpc64}
prep_target powerpc64le-linux-gnu %{build_powerpc64le}
prep_target riscv64-linux-gnu %{build_riscv64}
prep_target s390-linux-gnu %{build_s390}
prep_target s390x-linux-gnu %{build_s390x}
prep_target score-linux-gnu %{build_score}
prep_target sh-linux-gnu %{build_sh}
prep_target sh4-linux-gnu %{build_sh4}
prep_target sh64-linux-gnu %{build_sh64}
prep_target sparc-linux-gnu %{build_sparc}
prep_target sparc64-linux-gnu %{build_sparc64}
prep_target tile-linux-gnu %{build_tile}
prep_target unicore32-linux-gnu %{build_unicore32}
prep_target x86_64-linux-gnu %{build_x86_64}
prep_target xtensa-linux-gnu %{build_xtensa}
) 5>target.list

n=0
for target in `cat target.list`
do
n=1
break
done
if [ $n = 0 ]
then
echo "No targets selected" >&2
exit 8
fi

###############################################################################
#
# Build
#
###############################################################################
%build

%global builddir %{_builddir}/%{srcdir}

# Undo the broken autoconf change in recent Fedora versions
export CONFIG_SITE=NONE

CC=gcc
CXX=g++
OPT_FLAGS=`echo %{optflags}|sed -e 's/\(-Wp,\)\?-D_FORTIFY_SOURCE=[12]//g'`
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-flto=auto//g;s/-flto//g;s/-ffat-lto-objects//g'`
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-m64//g;s/-m32//g;s/-m31//g'`
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mfpmath=sse/-mfpmath=sse -msse2/g'`
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/ -pipe / /g'`
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/ -g / -g1 /g'`
%ifarch sparc
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mcpu=ultrasparc/-mtune=ultrasparc/g;s/-mcpu=v[78]//g'`
%endif
%ifarch %{ix86}
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-march=i.86//g'`
%endif
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-Werror=format-security/-Wformat-security/g'`
OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e 's/[[:blank:]]\+/ /g'`
case "$OPT_FLAGS" in
*-fasynchronous-unwind-tables*)
sed -i -e 's/-fno-exceptions /-fno-exceptions -fno-asynchronous-unwind-tables /' \
%{srcdir}/libgcc/Makefile.in
;;
esac

#
# Configure the compiler
#
cd %{builddir}
function config_target () {
echo "=== CONFIGURING $1"

arch=$1
prefix=$arch-
build_dir=$1

case $arch in
aarch64-*) target=aarch64-linux-gnu;;
arc-*) target=arc-linux-gnu;;
arm-*) target=arm-linux-gnueabi;;
avr32-*) target=avr-linux;;
bfin-*) target=bfin-uclinux;;
c6x-*) target=c6x-uclinux;;
h8300-*) target=h8300-elf;;
mn10300-*) target=am33_2.0-linux;;
m68knommu-*) target=m68k-linux;;
openrisc-*) target=or1k-linux;;
parisc-*) target=hppa-linux;;
score-*) target=score-elf;;
sh64-*) target=sh64-linux-elf;;
tile-*) target=tilegx-linux;;
v850-*) target=v850e-linux;;
x86-*) target=x86_64-linux;;
*) target=$arch;;
esac

echo $arch: target is $target
#export CFLAGS="$RPM_OPT_FLAGS"

CONFIG_FLAGS=
case $arch in
arc-*)
CONFIG_FLAGS="--with-cpu=hs38"
;;

arm-*)
CONFIG_FLAGS="--with-tune=generic-armv7-a --with-arch=armv7-a \
--with-float=hard --with-fpu=vfpv3-d16 --with-abi=aapcs-linux"
;;
mips64-*)
CONFIG_FLAGS="--with-arch=mips64r2 --with-abi=64 --with-arch_32=mips32r2 --with-fp-32=xx"
;;
powerpc-*|powerpc64-*|ppc-*|ppc64-*)
CONFIG_FLAGS="--with-cpu-32=power7 --with-tune-32=power8 --with-cpu-64=power7 --with-tune-64=power8 --enable-secureplt"
;;
powerpc64le-*|ppc64le-*)
CONFIG_FLAGS="--with-cpu-32=power8 --with-tune-32=power8 --with-cpu-64=power8 --with-tune-64=power8 --enable-secureplt"
;;
s390*-*)
%if 0%{?fedora} >= 26 || 0%{?rhel} > 7
CONFIG_FLAGS="--with-arch=zEC12 --with-tune=z13 --enable-decimal-float"
%else
CONFIG_FLAGS="--with-arch=z9-109 --with-tune=z10 --enable-decimal-float"
%endif
;;
sh-*)
CONFIG_FLAGS=--with-multilib-list=m1,m2,m2e,m2a,m2a-single,m4,m4-single,m4-single-only,m4-nofpu
;;
sh4-*)
CONFIG_FLAGS=--with-multilib-list=m4,m4-single,m4-single-only,m4-nofpu
;;
sh64-*)
CONFIG_FLAGS=--with-multilib-list=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu
;;
sparc-*)
CONFIG_FLAGS="--disable-linux-futex --with-cpu=v7"
;;
sparc64-*)
CONFIG_FLAGS="--disable-linux-futex --with-cpu=ultrasparc"
;;
tile-*)
#CONFIG_FLAGS="--with-arch_32=tilepro"
;;
x86_64-*)
CONFIG_FLAGS="--with-arch_32=i686 --with-tune=generic --enable-cet"
;;
esac

case $arch in
alpha*|powerpc*|ppc*|s390*|sparc*)
CONFIG_FLAGS="$CONFIG_FLAGS --with-long-double-128" ;;
esac

case $arch in
i[3456]86*|x86_64*|ppc*|ppc64*|s390*|arm*|aarch64*|mips*)
CONFIG_FLAGS="$CONFIG_FLAGS --enable-gnu-indirect-function" ;;
esac

%ifnarch %{mips}
case $arch in
mips*) ;;
*) CONFIG_FLAGS="$CONFIG_FLAGS --with-linker-hash-style=gnu" ;;
esac
%endif

mkdir $build_dir
cd $build_dir

# We could optimize the cross builds size by --enable-shared but the produced
# binaries may be less convenient in the embedded environment.
CC="$CC" \
CXX="$CXX" \
CFLAGS="$OPT_FLAGS" \
CXXFLAGS="`echo " $OPT_FLAGS " | sed 's/ -Wall / /g;s/ -fexceptions / /g' \
| sed 's/ -Wformat-security / -Wformat -Wformat-security /'`" \
CFLAGS_FOR_TARGET="-g -O2 -Wall -fexceptions" \
AR_FOR_TARGET=%{_bindir}/$arch-ar \
AS_FOR_TARGET=%{_bindir}/$arch-as \
DLLTOOL_FOR_TARGET=%{_bindir}/$arch-dlltool \
LD_FOR_TARGET=%{_bindir}/$arch-ld \
NM_FOR_TARGET=%{_bindir}/$arch-nm \
OBJDUMP_FOR_TARGET=%{_bindir}/$arch-objdump \
RANLIB_FOR_TARGET=%{_bindir}/$arch-ranlib \
READELF_FOR_TARGET=%{_bindir}/$arch-readelf \
STRIP_FOR_TARGET=%{_bindir}/$arch-strip \
WINDRES_FOR_TARGET=%{_bindir}/$arch-windres \
WINDMC_FOR_TARGET=%{_bindir}/$arch-windmc \
LDFLAGS='-Wl,-z,relro ' \
../%{srcdir}/configure \
--bindir=%{_bindir} \
--build=%{_target_platform} \
--datadir=%{_datadir} \
--disable-decimal-float \
--disable-dependency-tracking \
--disable-gold \
--disable-libgcj \
--disable-libgomp \
--disable-libmpx \
--disable-libquadmath \
--disable-libssp \
--disable-libunwind-exceptions \
--disable-shared \
--disable-silent-rules \
--disable-sjlj-exceptions \
--disable-threads \
--with-ld=/usr/bin/$arch-ld \
--enable-__cxa_atexit \
--enable-checking=release \
--enable-gnu-unique-object \
--enable-initfini-array \
--enable-languages=c,c++ \
--enable-linker-build-id \
--enable-lto \
--enable-nls \
--enable-obsolete \
--enable-plugin \
%ifarch ppc ppc64 ppc64le ppc64p7
--enable-secureplt \
%endif
--enable-targets=all \
--exec-prefix=%{_exec_prefix} \
--host=%{_target_platform} \
--includedir=%{_includedir} \
--infodir=%{_infodir} \
--libexecdir=%{_libexecdir} \
--localstatedir=%{_localstatedir} \
--mandir=%{_mandir} \
--prefix=%{_prefix} \
--program-prefix=$prefix \
--sbindir=%{_sbindir} \
--sharedstatedir=%{_sharedstatedir} \
--sysconfdir=%{_sysconfdir} \
--target=$target \
--with-bugurl=http://bugzilla.redhat.com/bugzilla/ \
--with-gcc-major-version-only \
--with-isl \
--with-newlib \
--with-plugin-ld=%{_bindir}/$arch-ld \
--with-sysroot=%{_prefix}/$arch/sys-root \
--with-system-libunwind \
--with-system-zlib \
--without-headers \
$CONFIG_FLAGS
%if 0
--libdir=%{_libdir} # we want stuff in /usr/lib/gcc/ not /usr/lib64/gcc
%endif

cd ..
}

for target in `cat target.list`
do
config_target $target
done

function build_target () {
echo "=== BUILDING $1"

arch=$1
build_dir=$1

BUILD_FLAGS=
case $arch in
x86_64-*)
BUILD_FLAGS="gcc_cv_libc_provides_ssp=yes gcc_cv_as_ix86_tlsldm=yes"
;;
esac

AR_FOR_TARGET=%{_bindir}/$arch-ar \
AS_FOR_TARGET=%{_bindir}/$arch-as \
DLLTOOL_FOR_TARGET=%{_bindir}/$arch-dlltool \
LD_FOR_TARGET=%{_bindir}/$arch-ld \
NM_FOR_TARGET=%{_bindir}/$arch-nm \
OBJDUMP_FOR_TARGET=%{_bindir}/$arch-objdump \
RANLIB_FOR_TARGET=%{_bindir}/$arch-ranlib \
READELF_FOR_TARGET=%{_bindir}/$arch-readelf \
STRIP_FOR_TARGET=%{_bindir}/$arch-strip \
WINDRES_FOR_TARGET=%{_bindir}/$arch-windres \
WINDMC_FOR_TARGET=%{_bindir}/$arch-windmc \
make -C $build_dir %{_smp_mflags} tooldir=%{_prefix} $BUILD_FLAGS all-gcc

echo "=== BUILDING LIBGCC $1"
case $arch in
%{no_libgcc_targets})
;;
*)
make -C $build_dir tooldir=%{_prefix} all-target-libgcc
;;
esac

}

for target in `cat target.list`
do
build_target $target
done

###############################################################################
#
# Installation
#
###############################################################################
%install
rm -rf %{buildroot}

function install_bin () {
echo "=== INSTALLING $1"

arch=$1
cpu=${1%%%%-*}

case $arch in
%{no_libgcc_targets}) with_libgcc="";;
*) with_libgcc="install-target-libgcc";;
esac

make -C $arch DESTDIR=%{buildroot} install-gcc ${with_libgcc}

# We want links for ppc and ppc64 also if we make powerpc, powerpc64 or powerpc64le
case $cpu in
powerpc*)
cd %{buildroot}/usr/bin
for i in $cpu-*
do
ln -s $i ppc${i#powerpc}
done
cd -
;;
esac
}

for target in `cat target.list`
do
mkdir -p %{buildroot}%{_prefix}/$target/sys-root
install_bin $target
done

grep ^powerpc target.list | sed -e s/powerpc/ppc/ >symlink-target.list

# For cross-gcc we drop the documentation.
rm -rf %{buildroot}%{_infodir}

# Remove binaries we will not be including, so that they don't end up in
# gcc-debuginfo
rm -f %{buildroot}%{_libdir}/{libffi*,libiberty.a}
rm -f %{buildroot}%{_libexecdir}/gcc/*/%{gcc_major}/install-tools/{mkheaders,fixincl}
rm -f %{buildroot}%{_prefix}/bin/*-gcc-%{gcc_major} || :
rmdir %{buildroot}%{_includedir}

find %{buildroot}%{_datadir} -name gcc.mo |
while read x
do
y=`dirname $x`
mv $x $y/%{cross}-gcc.mo
done

%find_lang %{cross}-gcc

gzip %{buildroot}%{_mandir}/man1/*.1
rm %{buildroot}%{_mandir}/man7/*.7
rmdir %{buildroot}%{_mandir}/man7

# All the installed manual pages and translation files for each program are the
# same, so symlink them to the common package
cd %{buildroot}%{_mandir}/man1
for i in %{cross}-cpp.1.gz %{cross}-gcc.1.gz %{cross}-g++.1.gz %{cross}-gcov.1.gz
do
j=${i#%{cross}-}

for k in *-$j
do
if [ $k != $i -a ! -L $k ]
then
mv $k $i
ln -s $i $k
fi
done
done

# Add manpages the additional symlink-only targets
%if %{build_powerpc}%{build_powerpc64}%{build_powerpc64le}
for i in powerpc*
do
ln -s $i ppc${i#powerpc}
done
%endif

cd -

function install_lang () {
arch=$1
cpu=${arch%%%%-*}

case $cpu in
avr32) target_cpu=avr;;
bfin) target_cpu=bfin;;
h8300) target_cpu=h8300;;
mn10300) target_cpu=am33_2.0;;
openrisc) target_cpu=or1k;;
parisc) target_cpu=hppa;;
score) target_cpu=score;;
tile) target_cpu=tilegx;;
v850) target_cpu=v850e;;
x86) target_cpu=x86_64;;
*) target_cpu=$cpu;;
esac

(
echo '%{_bindir}/'$arch'*-cpp'
echo '%{_bindir}/'$arch'*-gcc'
echo '%{_bindir}/'$arch'*-gcc-ar'
echo '%{_bindir}/'$arch'*-gcc-nm'
echo '%{_bindir}/'$arch'*-gcc-ranlib'
echo '%{_bindir}/'$arch'*-gcov*'
echo '%{_bindir}/'$arch'*-lto-dump'
echo '%{_mandir}/man1/'$arch'*-cpp*'
echo '%{_mandir}/man1/'$arch'*-gcc*'
echo '%{_mandir}/man1/'$arch'*-gcov*'
echo '%{_mandir}/man1/'$arch'*-lto-dump*'
case $cpu in
ppc*|ppc64*)
;;
*)
echo '/usr/lib/gcc/'$target_cpu'-*/'
echo '%{_libexecdir}/gcc/'$target_cpu'*/*/cc1'
echo '%{_libexecdir}/gcc/'$target_cpu'*/*/collect2'
echo '%{_libexecdir}/gcc/'$target_cpu'*/*/[abd-z]*'
echo %{_prefix}/$arch/sys-root
;;
esac

) >files.$arch

(
echo '%{_bindir}/'$arch'*-c++'
echo '%{_bindir}/'$arch'*-g++'
echo '%{_mandir}/man1/'$arch'*-g++*'
case $cpu in
ppc*|ppc64*)
;;
*)
echo '%{_libexecdir}/gcc/'$target_cpu'*/*/cc1plus'
esac
) >files-c++.$arch
}

for target in `cat target.list symlink-target.list`
do
install_lang $target
done

%global __ar_no_strip $RPM_BUILD_DIR/%{srcdir}/ar-no-strip
cat >%{__ar_no_strip} <<EOF
#!/bin/bash
f=\$2
if [ \${f##*/} = libgcc.a -o \${f##*/} = libgcov.a ]
then
:
else
%{__strip} \$*
fi
EOF
chmod +x %{__ar_no_strip}
%undefine __strip
%global __strip %{__ar_no_strip}

###############################################################################
#
# Filesets
#
###############################################################################
%files -n %{cross}-gcc-common -f %{cross}-gcc.lang
%doc %{srcdir}/COPYING*
%doc %{srcdir}/README
%{_mandir}/man1/%{cross}-*

%global do_files() \
%if %2 \
%files -n %{rpmprefix}gcc-%1 -f files.%1 \
%files -n %{rpmprefix}gcc-c++-%1 -f files-c++.%1 \
%endif

%do_files aarch64-linux-gnu %{build_aarch64}
%do_files alpha-linux-gnu %{build_alpha}
%do_files arc-linux-gnu %{build_arc}
%do_files arm-linux-gnu %{build_arm}
%do_files avr32-linux-gnu %{build_avr32}
%do_files bfin-linux-gnu %{build_blackfin}
%do_files c6x-linux-gnu %{build_c6x}
%do_files cris-linux-gnu %{build_cris}
%do_files frv-linux-gnu %{build_frv}
%do_files h8300-linux-gnu %{build_h8300}
%do_files hppa-linux-gnu %{build_hppa}
%do_files hppa64-linux-gnu %{build_hppa64}
%do_files i386-linux-gnu %{build_i386}
%do_files ia64-linux-gnu %{build_ia64}
%do_files m32r-linux-gnu %{build_m32r}
%do_files m68k-linux-gnu %{build_m68k}
%do_files metag-linux-gnu %{build_metag}
%do_files microblaze-linux-gnu %{build_microblaze}
%do_files mips-linux-gnu %{build_mips}
%do_files mips64-linux-gnu %{build_mips64}
%do_files mn10300-linux-gnu %{build_mn10300}
%do_files nios2-linux-gnu %{build_nios2}
%do_files openrisc-linux-gnu %{build_openrisc}
%do_files powerpc-linux-gnu %{build_powerpc}
%do_files powerpc64-linux-gnu %{build_powerpc64}
%do_files powerpc64le-linux-gnu %{build_powerpc64le}
%do_files ppc-linux-gnu %{build_powerpc}
%do_files ppc64-linux-gnu %{build_powerpc64}
%do_files ppc64le-linux-gnu %{build_powerpc64le}
%do_files riscv64-linux-gnu %{build_riscv64}
%do_files s390-linux-gnu %{build_s390}
%do_files s390x-linux-gnu %{build_s390x}
%do_files score-linux-gnu %{build_score}
%do_files sh-linux-gnu %{build_sh}
%do_files sh4-linux-gnu %{build_sh4}
%do_files sh64-linux-gnu %{build_sh64}
%do_files sparc-linux-gnu %{build_sparc}
%do_files sparc64-linux-gnu %{build_sparc64}
%do_files tile-linux-gnu %{build_tile}
%do_files unicore32-linux-gnu %{build_unicore32}
%do_files x86_64-linux-gnu %{build_x86_64}
%do_files xtensa-linux-gnu %{build_xtensa}

%changelog
* Sat Jul 31 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 11.2.1-1
- Update to gcc 11.2.1

* Sat Jul 24 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 11.1.1-1
- Update to gcc 11.1.1
- Enable OpenRISC (or1k) support
- Disable sh/crui support

* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 10.2.1-3.3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Thu Mar 11 2021 Dan Horák <dan[at]danny.cz> - 10.2.1-3.2
- reduce debuginfo verbosity

* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 10.2.1-3.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Fri Sep 04 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 10.2.1-3
- GCC 10.2.0 release

* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 10.1.1-2.2
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 10.1.1-2.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Mon Jul 20 2020 Jeff Law <law@redhat.com> - 10.1.1-2
- Fix broken configure files compromised by LTO
- Add autoconf to BuildRequires

* Fri May 08 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 10.1.1-1
- GCC 10.1.0 release

* Thu Apr 30 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 10.0.1-0.13
- Update to gcc 10 snapshot 0.13

* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 9.2.1-3.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Sat Dec 14 2019 Jeff Law <law@redhat.com> - 9.2.1-3
- Fix unprintable control character in PA backend caught by gcc-10

* Wed Oct 9 2019 Jerry James <loganjerry@gmail.com> - 9.2.1-2
- Rebuild for mpfr 4

* Tue Aug 27 2019 Peter Robinson <pbrobinson@fedoraproject.org> 9.2.1-1
- Sync with gcc-9.2.1-1

* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 9.1.1-2.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Mon Jun 10 2019 Tom Callaway <spot@fedoraproject.org> - 9.1.1-2
- remove shared support from arm (glibc-arm-linux-gnu is dead)

* Sun May 26 2019 Peter Robinson <pbrobinson@fedoraproject.org> 9.1.1-1
- Sync with gcc-9.1.1-1

* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 8.2.1-1.2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Wed Nov 7 2018 Tom Callaway <spot@fedoraproject.org> - 8.2.1-1
- update to 8.2.1

* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 8.1.1-3.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Thu Jul 12 2018 David Howells <dhowells@redhat.com> - 8.1.1-3
- Change ARC to multilib (#1600183).
- Fix arc700 cpu type (#1600183).

* Wed Jul 11 2018 David Howells <dhowells@redhat.com> - 8.1.1-3
- Switch ARC to arc-linux-gnu and use hs38 not arc700 (#1600183).

* Tue Jul 10 2018 David Howells <dhowells@redhat.com> - 8.1.1-2
- Sync with gcc-8.1.1-4.
- Add support for the ARC arch (#1599744).

* Tue May 29 2018 David Howells <dhowells@redhat.com> - 8.1.1-1
- Sync with gcc-8.1.1-1.

* Fri Mar 30 2018 David Howells <dhowells@redhat.com> - 8.0.1-0.1
- Move to gcc-8 (#1580076).
Loading…
Cancel
Save