Initialize for gcc12

This commit is contained in:
zyppe 2024-02-10 22:21:31 +08:00
commit f5f1280d33
26 changed files with 10615 additions and 0 deletions

2
.gcc12.metadata Normal file
View file

@ -0,0 +1,2 @@
1301ded114b9c98541722d27c2daed8870b90bbccfd63582538fedaf1559fa16 gcc-12.3.0+git1204.tar.xz
f5b3ba38c506af026b933c79aaf54500055c506d677e06e009e04c06e03768d2 newlib-4.2.0.20211231.tar.xz

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
gcc-12.3.0+git1204.tar.xz
newlib-4.2.0.20211231.tar.xz

View file

@ -0,0 +1,31 @@
IMPORTANT: Please change gcc.spec.in and then run ./pre_checkin.sh!
Do not change gcc.spec directly!
Since GCC comes with a testsuite that runs for quite a long time and
that test suite also contains some known failures, we should run the
testsuite of GCC whenever the compiler is changed to ensure a high
quality compiler.
The package is now split into multiple parts, gcc$VER,
gcc$VER-testresults and libffi$VER (plus various spec files for
cross and icecream cross compilers). The testsuite is run from
gcc$VER-testresults, a dummy package with the testresults, gcc$VER-testresults,
is generated from it which contains testing logfiles and summary.
Before checking in a new compiler, please do the following steps as QA
measure to check that the new compiler does not introduce any new
failures:
- Run mbuild for all archs for at least the gcc$VER and the gcc$VER-testresults
subpackages
- When mbuild is finished, call
/suse/rguenther/bin/compare-testresults.sh mbuild-directory
(for the gcc$VER-testresults build).
The output of that script should not show any failures. If it does,
please fix them or discuss this with the gcc package maintainers.
- Do not remove this file.
Thanks,
Your GCC packagers.

134
change_spec Normal file
View file

@ -0,0 +1,134 @@
#!/bin/bash
do_crosses=1
do_optional_compiler_languages=0
rm -f gcc*-testresults.spec gcc*-testresults.changes gcc*.spec cross*.spec cross*.changes
# Default is to generate the normal gcc package
# unless a parameter is given. In case that it is '-*',
# that parameter will be used as suffix for the package name
# and as suffix for the install path (/opt/gccSUFFIX)
# In case that it is '[0-9]*', that parameter will be used
# as a suffix for a versioned package name.
if [ $# -lt 1 ]; then
echo No package suffix given
outfile=gcc.spec
else
case $1 in
[0-9]*)
base_ver=$1
outfile=gcc$1.spec
;;
*)
echo Invalid package suffix
exit 1
;;
esac
fi
: > $outfile
if test "$do_optional_compiler_languages" = "1"; then
echo '%define build_optional_compiler_languages 1' >> $outfile
fi
sed -e 's%@base_ver@%'$base_ver'%g' \
gcc.spec.in \
| sed -n -e '{
/^# PACKAGE-BEGIN/h
/^# PACKAGE-BEGIN/,/^# PACKAGE-END/H
/^# PACKAGE-BEGIN/,/^# PACKAGE-END/!p
/^# PACKAGE-END/{g
s/@variant@//g
p
g
s/@variant@/-32bit/g
p
g
s/@variant@/-64bit/g
p
}
}' >> $outfile
echo '%define building_testsuite 1' > gcc$base_ver-testresults.spec
echo '%define run_tests 1' >> gcc$base_ver-testresults.spec
sed -e '/^# GCC-TESTSUITE-DELETE-BEGIN/,/^# GCC-TESTSUITE-DELETE-END/d;s/-n gcc@base_ver@-testresults$//g;s/^Name:[[:space:]]*gcc@base_ver@/Name: gcc@base_ver@-testresults/g' \
gcc.spec.in \
| sed -e 's%@base_ver@%'$base_ver'%g' \
>> gcc$base_ver-testresults.spec
echo '<multibuild>' > _multibuild
echo '<flavor>'gcc$base_ver-testresults'</flavor>' >> _multibuild
add_cross() {
local pkgname="$1"; shift
local rpmtarget="$1"; shift
local triplet="$1"; shift
echo "%define pkgname $pkgname" > $pkgname.spec
echo "%define cross_arch $rpmtarget" >> $pkgname.spec
echo "%define gcc_target_arch $triplet" >> $pkgname.spec
echo "$@" >> $pkgname.spec
{ sed -n -e '1,/SRC-COMMON-BEGIN/p' cross.spec.in
sed -n -e '/SRC-COMMON-BEGIN/,/SRC-COMMON-END/p' $outfile
sed -n -e '/SRC-COMMON-END/,/BUILD-COMMON-BEGIN/p' cross.spec.in
sed -n -e '/BUILD-COMMON-BEGIN/,/BUILD-COMMON-END/p' $outfile
sed -n -e '/BUILD-COMMON-END/,$p' cross.spec.in; } |
sed -e "s#@base_ver@#$base_ver#" \
-e "s/^\(ExclusiveArch.*\) $rpmtarget[^ \r]*/\1 /" \
>> $pkgname.spec
echo '<flavor>'$pkgname'</flavor>' >> _multibuild
}
add_newlib_cross() {
add_cross $1-bootstrap $2 $3 "%define gcc_target_newlib 1
%define gcc_libc_bootstrap 1"
add_cross $1 $2 $3 "%define gcc_target_newlib 1"
}
add_glibc_cross() {
add_cross $1-bootstrap $2 $3 "%define gcc_libc_bootstrap 1"
add_cross $1 $2 $3 "%define gcc_target_glibc 1"
}
# We now support "proper" cross-compilers to suse targets via a
# cross-glibc package, enable that via for example
#
# add_cross cross-aarch64-gcc$base_ver aarch64 aarch64-suse-linux
#
# For now keep the old way of doing things
if test "$do_crosses" = 1 ; then
add_glibc_cross cross-aarch64-gcc$base_ver aarch64 aarch64-suse-linux
add_glibc_cross cross-riscv64-gcc$base_ver riscv64 riscv64-suse-linux
add_cross cross-arm-gcc$base_ver arm arm-suse-linux-gnueabi %define gcc_icecream 1
add_cross cross-avr-gcc$base_ver-bootstrap avr avr "%define gcc_libc_bootstrap 1"
add_cross cross-avr-gcc$base_ver avr avr
add_newlib_cross cross-pru-gcc$base_ver pru pru
add_cross cross-x86_64-gcc$base_ver x86_64 x86_64-suse-linux %define gcc_icecream 1
add_cross cross-s390x-gcc$base_ver s390x s390x-suse-linux %define gcc_icecream 1
add_cross cross-sparc-gcc$base_ver sparcv9 sparc-suse-linux %define gcc_icecream 1
add_cross cross-sparc64-gcc$base_ver sparc64 sparc64-suse-linux %define gcc_icecream 1
add_cross cross-ppc64-gcc$base_ver ppc64 powerpc64-suse-linux %define gcc_icecream 1
add_cross cross-ppc64le-gcc$base_ver ppc64le powerpc64le-suse-linux %define gcc_icecream 1
add_cross cross-m68k-gcc$base_ver m68k m68k-suse-linux %define gcc_icecream 1
add_cross cross-mips-gcc$base_ver mips mips-suse-linux %define gcc_icecream 1
add_cross cross-hppa-gcc$base_ver-bootstrap hppa hppa-suse-linux %define gcc_libc_bootstrap 1
add_cross cross-hppa-gcc$base_ver hppa hppa-suse-linux %define gcc_icecream 1
add_newlib_cross cross-arm-none-gcc$base_ver arm-none arm-none-eabi
add_newlib_cross cross-epiphany-gcc$base_ver epiphany epiphany-elf
#add_newlib_cross cross-nds32le-gcc$base_ver nds32le nds32le-elf
add_newlib_cross cross-riscv64-elf-gcc$base_ver riscv64 riscv64-elf
#add_newlib_cross cross-rl78-gcc$base_ver rl78 rl78-elf
add_newlib_cross cross-rx-gcc$base_ver rx rx-elf
fi
# the nvptx and amdgcn crosses are used for offloading
add_cross cross-nvptx-gcc$base_ver nvptx nvptx-none %define gcc_accel 1
add_cross cross-amdgcn-gcc$base_ver amdgcn amdgcn-amdhsa %define gcc_accel 1
for f in *.spec; do
sed -i -e '/^# .*-\(BEGIN\|END\)$/d' $f
done
echo '</multibuild>' >> _multibuild
osc service localrun format_spec_file

51
gcc-add-defaultsspec.diff Normal file
View file

@ -0,0 +1,51 @@
Index: gcc/gcc.cc
===================================================================
--- gcc/gcc.cc.orig 2013-11-26 15:41:59.000000000 +0100
+++ gcc/gcc.cc 2013-11-26 16:40:35.780548125 +0100
@@ -258,6 +258,7 @@ static const char *replace_outfile_spec_
static const char *remove_outfile_spec_function (int, const char **);
static const char *version_compare_spec_function (int, const char **);
static const char *include_spec_function (int, const char **);
+static const char *include_noerr_spec_function (int, const char **);
static const char *find_file_spec_function (int, const char **);
static const char *find_plugindir_spec_function (int, const char **);
static const char *print_asm_header_spec_function (int, const char **);
@@ -1357,6 +1358,7 @@ static const struct spec_function static
{ "remove-outfile", remove_outfile_spec_function },
{ "version-compare", version_compare_spec_function },
{ "include", include_spec_function },
+ { "include_noerr", include_noerr_spec_function },
{ "find-file", find_file_spec_function },
{ "find-plugindir", find_plugindir_spec_function },
{ "print-asm-header", print_asm_header_spec_function },
@@ -6480,6 +6482,8 @@ main (int argc, char **argv)
if (access (specs_file, R_OK) == 0)
read_specs (specs_file, true, false);
+ do_self_spec ("%:include_noerr(defaults.spec)%(default_spec)");
+
/* Process any configure-time defaults specified for the command line
options, via OPTION_DEFAULT_SPECS. */
for (i = 0; i < ARRAY_SIZE (option_default_specs); i++)
@@ -8401,6 +8405,21 @@ get_random_number (void)
return ret ^ getpid ();
}
+static const char *
+include_noerr_spec_function (int argc, const char **argv)
+{
+ char *file;
+
+ if (argc != 1)
+ abort ();
+
+ file = find_a_file (&startfile_prefixes, argv[0], R_OK, 0);
+ if (file)
+ read_specs (file, FALSE, TRUE);
+
+ return NULL;
+}
+
/* %:compare-debug-dump-opt spec function. Save the last argument,
expected to be the last -fdump-final-insns option, or generate a
temporary. */

View file

@ -0,0 +1,31 @@
varasm.c: Always output flags in merged .section for LLVM assembler compatibility [PR97827]
For compatibility with LLVM 11's 'mc' assembler, the flags have to be
repeated every time. See also LLVM Bug 48201 for this issue and
https://reviews.llvm.org/D73999 for the patch causing the issue.
gcc/
PR target/97827
* varasm.c (default_elf_asm_named_section): Always output all
flags if SECTION_MERGE, even if already declared before.
diff --git a/gcc/varasm.cc b/gcc/varasm.cc
index 21be03aeba2..9cb46885aa5 100644
--- a/gcc/varasm.cc
+++ b/gcc/varasm.cc
@@ -6792,10 +6792,13 @@ default_elf_asm_named_section (const char *name, unsigned int flags,
/* If we have already declared this section, we can use an
abbreviated form to switch back to it -- unless this section is
part of a COMDAT groups or with SHF_GNU_RETAIN or with SHF_LINK_ORDER,
- in which case GAS requires the full declaration every time. */
+ in which case GAS requires the full declaration every time.
+ LLVM's MC linker requires that the
+ flags are identical, thus avoid the abbreviated form with MERGE. */
if (!(HAVE_COMDAT_GROUP && (flags & SECTION_LINKONCE))
&& !(flags & (SECTION_RETAIN | SECTION_LINK_ORDER))
- && (flags & SECTION_DECLARED))
+ && (flags & SECTION_DECLARED)
+ && !(flags & SECTION_MERGE))
{
fprintf (asm_out_file, "\t.section\t%s\n", name);
return;

View file

@ -0,0 +1,22 @@
diff --git a/gcc/config/gcn/gcn.cc b/gcc/config/gcn/gcn.cc
index 6d02a4a02..d77f66182 100644
--- a/gcc/config/gcn/gcn.cc
+++ b/gcc/config/gcn/gcn.cc
@@ -6413,9 +6413,17 @@ gcn_dwarf_register_span (rtx rtl)
return p;
}
+static void
+gcn_override_options_after_change (void)
+{
+ flag_reorder_blocks_and_partition = 0;
+}
+
/* }}} */
/* {{{ TARGET hook overrides. */
+#undef TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE
+#define TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE gcn_override_options_after_change
#undef TARGET_ADDR_SPACE_ADDRESS_MODE
#define TARGET_ADDR_SPACE_ADDRESS_MODE gcn_addr_space_address_mode
#undef TARGET_ADDR_SPACE_DEBUG

View file

@ -0,0 +1,29 @@
diff --git a/gcc/common.opt b/gcc/common.opt
index a75b44ee47e..2d33861ad1f 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -3175,7 +3175,7 @@ Common Driver JoinedOrMissing Negative(gdwarf-)
Generate debug information in default version of DWARF format.
gdwarf-
-Common Driver Joined UInteger Var(dwarf_version) Init(5) Negative(gstabs)
+Common Driver Joined UInteger Var(dwarf_version) Init(4) Negative(gstabs)
Generate debug information in DWARF v2 (or later) format.
gdwarf32
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 4a87b9ef8e8..4f1adcfe621 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -9638,9 +9638,8 @@ possible.
@opindex gdwarf
Produce debugging information in DWARF format (if that is supported).
The value of @var{version} may be either 2, 3, 4 or 5; the default
-version for most targets is 5 (with the exception of VxWorks, TPF and
-Darwin/Mac OS X, which default to version 2, and AIX, which defaults
-to version 4).
+version for most targets is 4 (with the exception of VxWorks, TPF and
+Darwin/Mac OS X, which default to version 2).
Note that with DWARF Version 2, some ports require and always
use some non-conflicting DWARF 3 extensions in the unwind tables.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

21
gcc12-riscv-pthread.patch Normal file
View file

@ -0,0 +1,21 @@
Index: gcc-12.0.1+git192423/gcc/config/riscv/linux.h
===================================================================
--- gcc-12.0.1+git192423.orig/gcc/config/riscv/linux.h
+++ gcc-12.0.1+git192423/gcc/config/riscv/linux.h
@@ -35,16 +35,6 @@ along with GCC; see the file COPYING3.
#undef MUSL_DYNAMIC_LINKER
#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-riscv" XLEN_SPEC MUSL_ABI_SUFFIX ".so.1"
-/* Because RISC-V only has word-sized atomics, it requries libatomic where
- others do not. So link libatomic by default, as needed. */
-#undef LIB_SPEC
-#ifdef LD_AS_NEEDED_OPTION
-#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC \
- " %{pthread:" LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION "}"
-#else
-#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC " -latomic "
-#endif
-
#define ICACHE_FLUSH_FUNC "__riscv_flush_icache"
#define CPP_SPEC "%{pthread:-D_REENTRANT}"

19
gcc12-rpmlintrc Normal file
View file

@ -0,0 +1,19 @@
# This line is mandatory to access the configuration functions
from Config import *
# gcc/gcc-c++ are devel packages even if not called -devel...
addFilter ("gcc.*devel-file-in-non-devel-package")
addFilter ("gcc.*devel-dependency glibc-devel")
addFilter ("gcc.*devel-dependency libstdc")
# libstdc++6-devel is the devel package of libstdc++6, no better name exists
# and we do package static libs and the .so links (but in a gcc versioned
# directory)
addFilter ("libstdc.*shlib-policy-missing-lib")
# We have names lib libgcc_s1-gcc7 for non-default GCCs
addFilter ("shlib-policy-name-error")
addFilter ("shlib-legacy-policy-name-error")
# Packages provide libgcc_s1 = $version and conflict with other providers
# of libgcc_s1
addFilter ("conflicts-with-provides")
# SLE12 rpmlint complains about valid SPDX licenses
addFilter ("invalid-license")

View file

@ -0,0 +1,10 @@
# This line is mandatory to access the configuration functions
from Config import *
# Currently gotools.log contains $RPM_BUILD_ROOT and there's nothing
# to be done about that and neither do we care
addFilter ("gcc.*-testresults.*file-contains-buildroot")
# The package should _not_ be noarch, testresults differ from architecture
# to architecture
addFilter ("gcc.*-testresults.*no-binary")

187
gcc12-testsuite-fixes.patch Normal file
View file

@ -0,0 +1,187 @@
From 5f803e68beee9f71c12c112ccda872997919f9cc Mon Sep 17 00:00:00 2001
From: Richard Biener <rguenther@suse.de>
Date: Wed, 10 May 2023 15:36:12 +0200
Subject: [PATCH 1/4] Avoid g++.dg/torture/pr106922.C FAIL with the pre-C++11
ABI
To: gcc-patches@gcc.gnu.org
The following forces the g++.dg/torture/pr106922.C testcase to use
the C++11 libstdc++ ABI and checks whether that worked.
gcc/testsuite/
* g++.dg/torture/pr106922.C: Force _GLIBCXX_USE_CXX11_ABI to 1.
(cherry picked from commit a056a9868e6ecab24b0b7e4e12e846097b8c8fb0)
---
gcc/testsuite/g++.dg/torture/pr106922.C | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/gcc/testsuite/g++.dg/torture/pr106922.C b/gcc/testsuite/g++.dg/torture/pr106922.C
index 046fc6cce76..b0c1489fbdc 100644
--- a/gcc/testsuite/g++.dg/torture/pr106922.C
+++ b/gcc/testsuite/g++.dg/torture/pr106922.C
@@ -4,8 +4,16 @@
// -O1 doesn't iterate VN and thus has bogus uninit diagnostics
// { dg-skip-if "" { *-*-* } { "-O1" } { "" } }
+// The testcase still emits bogus diagnostics with the pre-C++11 ABI
+#undef _GLIBCXX_USE_CXX11_ABI
+#define _GLIBCXX_USE_CXX11_ABI 1
+
#include <vector>
+// When the library is not dual-ABI and defaults to old just compile
+// an empty TU
+#if _GLIBCXX_USE_CXX11_ABI
+
#include <optional>
template <class T>
using Optional = std::optional<T>;
@@ -46,3 +54,4 @@ void test()
externals.external2 = internal2;
}
}
+#endif
--
2.35.3
From 35ca946985773e0fa49624d37323e0338a39c5f3 Mon Sep 17 00:00:00 2001
From: Richard Biener <rguenther@suse.de>
Date: Thu, 11 May 2023 09:13:31 +0200
Subject: [PATCH 3/4] testsuite/108776 - avoid c-c++-common/rotate-11.c FAIL
To: gcc-patches@gcc.gnu.org
On the branch ranger isn't powerful enough to handle some cases
appearing with logical-op-non-short-circuit evaluating to false
causing FAILs of the testcase for ppc64le and s390x. The following
foces logical-op-non-short-circuit to true for this testcase
on the branch.
PR testsuite/108776
* c-c++-common/rotate-11.c: Add --param logical-op-non-short-circuit=1.
---
gcc/testsuite/c-c++-common/rotate-11.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/testsuite/c-c++-common/rotate-11.c b/gcc/testsuite/c-c++-common/rotate-11.c
index e57db19d949..85cde2786e2 100644
--- a/gcc/testsuite/c-c++-common/rotate-11.c
+++ b/gcc/testsuite/c-c++-common/rotate-11.c
@@ -1,6 +1,6 @@
/* PR tree-optimization/108440 */
/* { dg-do compile { target { { ilp32 || lp64 } || llp64 } } } */
-/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fdump-tree-optimized --param logical-op-non-short-circuit=1" } */
/* { dg-final { scan-tree-dump-times " r<< " 5 "optimized" } } */
/* { dg-final { scan-tree-dump-times " \\\& 7;" 4 "optimized" } } */
--
2.35.3
From 7b4ab70f2d7182f119bc927f15876a3178c0cc14 Mon Sep 17 00:00:00 2001
From: Richard Biener <rguenther@suse.de>
Date: Thu, 11 May 2023 09:30:52 +0200
Subject: [PATCH 4/4] Fix gcc.dg/vect/pr108950.c
To: gcc-patches@gcc.gnu.org
The following puts the dg-require-effective-target properly after
the dg-do.
* gcc.dg/vect/pr108950.c: Re-order dg-require-effective-target
and dg-do.
---
gcc/testsuite/gcc.dg/vect/pr108950.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/testsuite/gcc.dg/vect/pr108950.c b/gcc/testsuite/gcc.dg/vect/pr108950.c
index ecf076c964b..563c4b9df38 100644
--- a/gcc/testsuite/gcc.dg/vect/pr108950.c
+++ b/gcc/testsuite/gcc.dg/vect/pr108950.c
@@ -1,5 +1,5 @@
-/* { dg-require-effective-target vect_simd_clones } */
/* { dg-do compile } */
+/* { dg-require-effective-target vect_simd_clones } */
int m;
short int n;
--
2.35.3
From 16a76499f916b5b6d11bccc03cc0d16b2b1ee31b Mon Sep 17 00:00:00 2001
From: Jonathan Wakely <jwakely@redhat.com>
Date: Wed, 16 Nov 2022 12:22:04 +0000
Subject: [PATCH] libstdc++: Fix std::any pretty printer
To: gcc-patches@gcc.gnu.org
The recent changes to FilteringTypePrinter affect the result of
gdb.lookup_type('std::string') in StdExpAnyPrinter, causing it to always
return the std::__cxx11::basic_string specialization. This then causes a
gdb.error exception when trying to lookup the std::any manager type for
a specialization using that string, but that manager was never
instantiated in the program. This causes FAILs when running the tests
with -D_GLIBCXX_USE_CXX11_ABI=0:
FAIL: libstdc++-prettyprinters/libfundts.cc print as
FAIL: libstdc++-prettyprinters/libfundts.cc print as
The ugly solution used in this patch is to repeat the lookup for every
type that std::string could be a typedef for, and hope it only works for
one of them.
libstdc++-v3/ChangeLog:
* python/libstdcxx/v6/printers.py (StdExpAnyPrinter): Make
expansion of std::string in manager name more robust.
(cherry picked from commit 3c54805d03ac1bcc3d8547ffb5e6c4e1f301a7a2)
---
libstdc++-v3/python/libstdcxx/v6/printers.py | 31 ++++++++++++++++++--
1 file changed, 28 insertions(+), 3 deletions(-)
diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py
index bb06a4959ee..d27a25bd96f 100644
--- a/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -1216,9 +1216,34 @@ class StdExpAnyPrinter(SingleObjContainerPrinter):
mgrname = m.group(1)
# FIXME need to expand 'std::string' so that gdb.lookup_type works
if 'std::string' in mgrname:
- mgrname = re.sub("std::string(?!\w)", str(gdb.lookup_type('std::string').strip_typedefs()), m.group(1))
-
- mgrtype = gdb.lookup_type(mgrname)
+ # This lookup for std::string might return the __cxx11 version,
+ # but that's not necessarily the one used by the std::any
+ # manager function we're trying to find.
+ strings = {str(gdb.lookup_type('std::string').strip_typedefs())}
+ # So also consider all the other possible std::string types!
+ s = 'basic_string<char, std::char_traits<char>, std::allocator<char> >'
+ quals = ['std::', 'std::__cxx11::', 'std::' + _versioned_namespace]
+ strings |= {q+s for q in quals} # set of unique strings
+ mgrtypes = []
+ for s in strings:
+ try:
+ x = re.sub("std::string(?!\w)", s, m.group(1))
+ # The following lookup might raise gdb.error if the
+ # manager function was never instantiated for 's' in the
+ # program, because there will be no such type.
+ mgrtypes.append(gdb.lookup_type(x))
+ except gdb.error:
+ pass
+ if len(mgrtypes) != 1:
+ # FIXME: this is unlikely in practice, but possible for
+ # programs that use both old and new string types with
+ # std::any in a single program. Can we do better?
+ # Maybe find the address of each type's _S_manage and
+ # compare to the address stored in _M_manager?
+ raise ValueError('Cannot uniquely determine std::string type used in std::any')
+ mgrtype = mgrtypes[0]
+ else:
+ mgrtype = gdb.lookup_type(mgrname)
self.contained_type = mgrtype.template_argument(0)
valptr = None
if '::_Manager_internal' in mgrname:
--
2.35.3

183
gcc12.changes Normal file
View file

@ -0,0 +1,183 @@
* Thu Aug 17 2023 rguenther@suse.com
- Add gcc12-aarch64-bsc1214052.patch to fix -fstack-protector issues
with variable length stack allocations on aarch64.
Fixes CVE-2023-4039. [bsc#1214052]
* Mon May 8 2023 rguenther@suse.com
- Update to GCC 12.3 release, 0c61aa720e62f1baf0bfd178e283, git1204
* includes regression bug fixes
- Add gcc12-testsuite-fixes.patch to pick testsuite related fixes
from the branch after the release.
* Wed Mar 29 2023 mliska@suse.cz
- Speed up builds with --enable-link-serialization.
* Tue Jan 24 2023 rguenther@suse.com
- Update to gcc-12 branch head, 193f7e62815b4089dfaed4c2bd3, git749
* Tue Dec 27 2022 lnussel@suse.com
- Don't rely on %%usrmerged, set it based on standard %%suse_version
* Thu Dec 22 2022 rguenther@suse.com
- Update to gcc-12 branch head, e4b5fec75aa8d0d01f6e042ec28, git696
* remove gcc12-fifo-jobserver-support.patch which is now
included upstream
* Wed Nov 23 2022 dmueller@suse.com
- avoid trailing backslashes at the end of post install scripts
* Thu Oct 20 2022 rguenther@suse.com
- Update to gcc-12 branch head, 0aaef83351473e8f4eb774f8f99, git537
* Thu Oct 13 2022 rguenther@suse.com
- Update embedded newlib to version 4.2.0
* includes newlib-4.1.0-aligned_alloc.patch
* Mon Sep 26 2022 dmueller@suse.com
- add gcc12-riscv-inline-atomics.patch,
gcc12-riscv-pthread.patch: handle subword size inline atomics
(needed by several openSUSE packages)
* Wed Aug 31 2022 rguenther@suse.com
- Prune invalid-license rpmlint warnings, the SLE12 codestream
doesn't get fixed but FF applies there, too. [bsc#1185337]
* Tue Aug 30 2022 rguenther@suse.com
- Update to gcc-12 branch head, e927d1cf141f221c5a32574bde0, git416
* includes GCC 12.2 release
* includes recent fixes backported from trunk
* Mon Aug 29 2022 mliska@suse.cz
- Add gcc12-fifo-jobserver-support.patch that adds support
for FIFO jobserver for make.
* Sun Aug 21 2022 matwey.kornilov@gmail.com
- Allow cross-pru-gcc12-bootstrap for armv7l architecture.
PRU architecture is used for real-time MCUs embedded into TI
armv7l and aarch64 SoCs. We need to have cross-pru-gcc12 for
armv7l in order to build both host applications and PRU firmware
during the same build.
* Fri Aug 12 2022 rguenther@suse.com
- Update to gcc-12 branch head, 6b7d570a5001bb79e34c0d1626a, git372
* includes release candidate for GCC 12.2
* Mon Aug 8 2022 mliska@suse.cz
- Remove workaround for obs-service-format_spec_file.
* Tue Jul 26 2022 rguenther@suse.com
- Add Provides of libstdc++6-pp-gccN to libstdc++6-pp. [bsc#1201848]
* Thu Jul 21 2022 rguenther@suse.com
- Update to gcc-12 branch head, 4f15d2234608e82159d030dadb1, git287
* includes build fixes when building against glibc 2.33.
* Wed Jun 29 2022 rguenther@suse.com
- Update to gcc-12 branch head, 7811663964aa7e31c3939b859bb, git215
* includes libgomp mold linker detection fix
* includes nvptx offload compiler build fix
* includes s390x tsan executable stack fix
* Tue May 17 2022 rguenther@suse.com
- Update to gcc-12 branch head, 325d82b08696da17fb26bd2e1b6b, git78
* Tue May 10 2022 matwey.kornilov@gmail.com
- Enable PRU architecture for AM335x platforms
* Fri May 6 2022 rguenther@suse.com
- Update to GCC 12.1 release, 1ea978e3066ac565a1ec28a96a4d61, git27
* Fri Apr 29 2022 rguenther@suse.com
- Bump to 621650f64fb6679c457c33abf27c925f28bddc62, git9
* GCC 12.1 release candidate
* Thu Apr 28 2022 rguenther@suse.com
- Bump to f27848a5dc4d3b16cd4112bddcb59e0916eba623, git192706.
- Switch ppc64le to the IEEE long double ABI by default in Factory.
- Separate ppc64le from ppc/ppc64 specific configury.
- Add _multibuild to gather all .spec files and reduce the number
of .changes files to one, autogenerated by change_spec.
- Drop %%ringdisabled handling.
- Ada bootstrap now requires at least GCC 5, use GCC 7 on SLES 12
instead of GCC 4.8.
* Wed Apr 27 2022 rguenther@suse.com
- Drop no longer necessary gcc12-d-workaround.patch
* Tue Apr 19 2022 mliska@suse.cz
- Bump to b85abacd902813daec5e44b97f275eb88caaf715, git192607.
* Wed Apr 6 2022 schwab@suse.de
- On SLE15 and later, use make -Oline to synchronize configure output by
lines
* Wed Apr 6 2022 mliska@suse.cz
- Bump to 86242eb1bd03eba82d8e22b01b16925d43bcc539, git192423.
Fixes aarch64 bootstrap issue (PR105144).
* Fri Apr 1 2022 rguenther@suse.com
- Add provides/conflicts to glibc crosses since only one GCC version
for the same target can be installed at the same time.
- Add provides/conflicts to libgccjit
* Mon Mar 28 2022 mliska@suse.cz
- Bump to 9f37d31324f89d0b7b2abac988a976d121ae29c6, git192251.
* Wed Mar 23 2022 mliska@suse.cz
- Bump to e8cd3edc0fc6c02a732dcecf519c22d835e5f422, git192197.
* Thu Mar 17 2022 mliska@suse.cz
- Bump to c43cb355f25dd22133d15819bd6ec03d3d3939fd, git192094.
* Tue Mar 15 2022 matz@suse.com
- Add a proper barebones cross compiler for hppa
(named cross-hppa-gcc12-bootstrap). Doesn't yet drop or
rename the icecream variant cross-hppa-gcc12, not does this
add a proper glibc-using cross compiler for hppa.
* Mon Mar 7 2022 dmueller@suse.com
- drop armv5tel, merge arm and armv6hl
- use --with-cpu rather than specifying --with-arch/--with-tune
* Mon Mar 7 2022 mliska@suse.cz
- Bump to 40c1d4a07e5798c01e4364336c9617550744861d, git191925.
* Wed Mar 2 2022 rguenther@suse.com
- Drop unconditional -gccN suffix from libstdc++6-pp packages and
instead use the same suffix as for the matching libstdc++6
package it supplements to ease future updates. Add Obsoletes
to pre-existing libstdc++6-pp-gcc{9,10,11} packages to allow
updates to happen. [bsc#1196107]
* Tue Mar 1 2022 mliska@suse.cz
- Use proper patch for SLE 15.x.
* Tue Mar 1 2022 mliska@suse.cz
- Bump to 4a1c20df82c9e14478d79fbe1ae9690a36285ac1, git191847.
* Tue Mar 1 2022 mliska@suse.cz
- Add gcc12-d-workaround.patch that fixes issue with gcc11 compiler.
* Tue Mar 1 2022 mliska@suse.cz
- Bump to 673a10aee1aafe0c99bfadc29a7458339bdddb3a, git191845.
* Mon Feb 28 2022 mliska@suse.cz
- Bump to 37b583b9d7719f663656ce65ac822c11471fb540, git191817.
- Bump sover of libgo library.
* Fri Feb 11 2022 rguenther@suse.com
- Update to trunk head, 165947fecf4d78c7effb0f1ee15e694 (git191602)
- Add gcc12-PIE, similar to gcc-PIE but affecting gcc12 [bsc#1195628]
* Wed Feb 9 2022 rguenther@suse.com
- Put libstdc++6-pp Requires on the shared library and drop
to Recoomends.
* Tue Feb 8 2022 mliska@suse.cz
- Bump to 943d631abdd7be623cbf2b870d3d0cfef89f5f26, git191519.
* Mon Jan 24 2022 rguenther@suse.com
- Update to trunk head, 978abe918f8c8deed28e92297d3c0cc (git191254)
- Fix filenames in the following patches:
gcc11-amdgcn-disable-hot-cold-partitioning.patch,
gcc41-ppc32-retaddr.patch.
* Wed Jan 19 2022 mliska@suse.cz
- Bump to 0bd247bbbe4cf396173f09eeec37e116e98f8471.
- Fix filename in gcc10-amdgcn-llvm-as.patch.
* Wed Jan 19 2022 rguenther@suse.com
- Remove sys/rseq.h from include-fixed
* Tue Jan 18 2022 mliska@suse.cz
- Bump to 3c4a54adb2164315d18fd8980c0fc37eb3d22252.
- Rebase patches after .cc renaming.
* Thu Jan 13 2022 mliska@suse.cz
- New package, inherits from gcc11
* Enable LSAN and TSAN for s390x target.
* Require gcc-d as dependency for proper bootstrap.
* Use gcc11-amdgcn-disable-hot-cold-partitioning.patch only conditionally
on older SUSE products.
* Add --enable-offload-defaulted to configure options.
* Include a couple of new header files.
* Do not require llvm11 for cross compilers (assembler was fixed
in latest LLVM releases), use llvm11 only on SLE 15.
* Remove unnecessary gcc10-foffload-default.patch patch.
- Take patches inherited from GCC 11.
* gcc-add-defaultsspec.diff, add the ability to provide a specs
file that is read by default
* tls-no-direct.diff, avoid direct %%fs references on x86 to not
slow down Xen
* gcc43-no-unwind-tables.diff, do not produce unwind tables for
CRT files
* gcc41-ppc32-retaddr.patch, fix expansion of __builtin_return_addr
for ppc, just a testcase
* gcc44-textdomain.patch, make translation files version specific
and adjust textdomain to find them
* gcc44-rename-info-files.patch, fix cross-references in info files
when renaming them to be version specific
* gcc48-libstdc++-api-reference.patch, fix link in the installed
libstdc++ html documentation
* gcc48-remove-mpfr-2.4.0-requirement.patch, make GCC work with
earlier mpfr versions on old products
* gcc5-no-return-gcc43-workaround.patch, make build work with
host gcc 4.3
* gcc7-remove-Wexpansion-to-defined-from-Wextra.patch, removes
new warning from -Wextra
* gcc7-avoid-fixinc-error.diff
* gcc9-reproducible-builds-buildid-for-checksum.patch
* gcc9-reproducible-builds.patch
* gcc10-amdgcn-llvm-as.patch

3623
gcc12.spec Normal file

File diff suppressed because it is too large Load diff

91
gcc41-ppc32-retaddr.patch Normal file
View file

@ -0,0 +1,91 @@
2005-11-28 Jakub Jelinek <jakub@redhat.com>
* config/rs6000/rs6000.c (rs6000_return_addr): If COUNT == 0,
read word RETURN_ADDRESS_OFFSET bytes above arg_pointer_rtx
instead of doing an extran indirection from frame_pointer_rtx.
* gcc.dg/20051128-1.c: New test.
#Index: gcc/config/rs6000/rs6000.cc
#===================================================================
#--- gcc/config/rs6000/rs6000.cc.orig 2013-11-26 15:42:33.000000000 +0100
#+++ gcc/config/rs6000/rs6000.cc 2013-11-26 16:44:14.566089231 +0100
#@@ -20878,18 +20878,22 @@ rs6000_return_addr (int count, rtx frame
if (count != 0
|| ((DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_DARWIN) && flag_pic))
{
+ rtx x;
cfun->machine->ra_needs_full_frame = 1;
- return
- gen_rtx_MEM
- (Pmode,
- memory_address
- (Pmode,
- plus_constant (Pmode,
- copy_to_reg
- (gen_rtx_MEM (Pmode,
- memory_address (Pmode, frame))),
- RETURN_ADDRESS_OFFSET)));
+ if (count == 0)
+ {
+ gcc_assert (frame == frame_pointer_rtx);
+ x = arg_pointer_rtx;
+ }
+ else
+ {
+ x = memory_address (Pmode, frame);
+ x = copy_to_reg (gen_rtx_MEM (Pmode, x));
+ }
+
+ x = plus_constant (Pmode, x, RETURN_ADDRESS_OFFSET);
+ return gen_rtx_MEM (Pmode, memory_address (Pmode, x));
}
cfun->machine->ra_need_lr = 1;
Index: gcc/testsuite/gcc.dg/20051128-1.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gcc/testsuite/gcc.dg/20051128-1.c 2013-11-26 16:44:14.566089231 +0100
@@ -0,0 +1,41 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fpic" } */
+
+extern void exit (int);
+extern void abort (void);
+
+int b;
+
+struct A
+{
+ void *pad[147];
+ void *ra, *h;
+ long o;
+};
+
+void
+__attribute__((noinline))
+foo (struct A *a, void *x)
+{
+ __builtin_memset (a, 0, sizeof (a));
+ if (!b)
+ exit (0);
+}
+
+void
+__attribute__((noinline))
+bar (void)
+{
+ struct A a;
+
+ __builtin_unwind_init ();
+ foo (&a, __builtin_return_address (0));
+}
+
+int
+main (void)
+{
+ bar ();
+ abort ();
+ return 0;
+}

View file

@ -0,0 +1,13 @@
Index: libgcc/Makefile.in
===================================================================
--- libgcc/Makefile.in.orig 2015-12-14 11:33:03.225790694 +0100
+++ libgcc/Makefile.in 2015-12-17 15:09:45.415136693 +0100
@@ -301,7 +301,7 @@ CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
$(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) \
- $(INHIBIT_LIBC_CFLAGS) $(USE_TM_CLONE_REGISTRY)
+ $(INHIBIT_LIBC_CFLAGS) $(USE_TM_CLONE_REGISTRY) -fno-unwind-tables -fno-asynchronous-unwind-tables
# Extra flags to use when compiling crt{begin,end}.o.
CRTSTUFF_T_CFLAGS =

View file

@ -0,0 +1,708 @@
#! /bin/sh -e
# DP: Allow transformations on info file names. Reference the
# DP: transformed info file names in the texinfo files.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
gcc/ChangeLog:
2004-02-17 Matthias Klose <doko@debian.org>
* Makefile.in: Allow transformations on info file names.
Define MAKEINFODEFS, macros to pass transformated info file
names to makeinfo.
* doc/cpp.texi: Use macros defined in MAKEINFODEFS for references.
* doc/cppinternals.texi: Likewise.
* doc/extend.texi: Likewise.
* doc/gcc.texi: Likewise.
* doc/gccint.texi: Likewise.
* doc/invoke.texi: Likewise.
* doc/libgcc.texi: Likewise.
* doc/makefile.texi: Likewise.
* doc/passes.texi: Likewise.
* doc/sourcebuild.texi: Likewise.
* doc/standards.texi: Likewise.
* doc/trouble.texi: Likewise.
gcc/fortran/ChangeLog:
* Make-lang.in: Allow transformations on info file names.
Pass macros of transformated info file defined in MAKEINFODEFS
names to makeinfo.
* gfortran.texi: Use macros defined in MAKEINFODEFS for references.
gcc/java/ChangeLog:
* Make-lang.in: Allow transformations on info file names.
Pass macros of transformated info file defined in MAKEINFODEFS
names to makeinfo.
* gcj.texi: Use macros defined in MAKEINFODEFS for references.
---
gcc/Makefile.in | 74 ++++++++++++++++++++++++++++++++++++----------
gcc/ada/gnat-style.texi | 2 -
gcc/ada/gnat_rm.texi | 2 -
gcc/ada/gnat_ugn.texi | 2 -
gcc/doc/cpp.texi | 2 -
gcc/doc/cppinternals.texi | 2 -
gcc/doc/extend.texi | 2 -
gcc/doc/gcc.texi | 8 ++--
gcc/doc/gccint.texi | 4 +-
gcc/doc/install.texi | 2 -
gcc/doc/invoke.texi | 10 +++---
gcc/doc/libgcc.texi | 2 -
gcc/doc/makefile.texi | 2 -
gcc/doc/passes.texi | 2 -
gcc/doc/standards.texi | 4 +-
gcc/fortran/Make-lang.in | 11 +++---
gcc/fortran/gfortran.texi | 2 -
gcc/java/Make-lang.in | 19 +++++++++--
gcc/java/gcj.texi | 20 ++++++------
libgomp/Makefile.am | 13 ++++----
libgomp/Makefile.in | 14 ++++----
libgomp/libgomp.texi | 2 -
22 files changed, 131 insertions(+), 70 deletions(-)
Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in.orig 2018-11-14 11:23:57.356904398 +0100
+++ gcc/Makefile.in 2018-11-14 11:23:57.368904603 +0100
@@ -3133,8 +3133,29 @@ install-no-fixedincludes:
doc: $(BUILD_INFO) $(GENERATED_MANPAGES)
-INFOFILES = doc/cpp.info doc/gcc.info doc/gccint.info \
- doc/gccinstall.info doc/cppinternals.info
+INFO_CPP_NAME = $(shell echo cpp|sed '$(program_transform_name)')
+INFO_GCC_NAME = $(shell echo gcc|sed '$(program_transform_name)')
+INFO_GXX_NAME = $(shell echo g++|sed '$(program_transform_name)')
+INFO_GCCINT_NAME = $(shell echo gccint|sed '$(program_transform_name)')
+INFO_GCCINSTALL_NAME = $(shell echo gccinstall|sed '$(program_transform_name)')
+INFO_CPPINT_NAME = $(shell echo cppinternals|sed '$(program_transform_name)')
+
+INFO_FORTRAN_NAME = $(shell echo gfortran|sed '$(program_transform_name)')
+INFO_GCJ_NAME = $(shell echo gcj|sed '$(program_transform_name)')
+INFO_GDC_NAME = $(shell echo gdc|sed '$(program_transform_name)')
+
+INFOFILES = doc/$(INFO_CPP_NAME).info doc/$(INFO_GCC_NAME).info \
+ doc/$(INFO_GCCINT_NAME).info \
+ doc/$(INFO_GCCINSTALL_NAME).info doc/$(INFO_CPPINT_NAME).info
+
+MAKEINFODEFS = -D 'fncpp $(INFO_CPP_NAME)' -D 'fngcc $(INFO_GCC_NAME)' \
+ -D 'fngxx $(INFO_GXX_NAME)' \
+ -D 'fngccint $(INFO_GCCINT_NAME)' \
+ -D 'fngccinstall $(INFO_GCCINSTALL_NAME)' \
+ -D 'fncppint $(INFO_CPPINT_NAME)' \
+ -D 'fngfortran $(INFO_FORTRAN_NAME)' \
+ -D 'fngcj $(INFO_GCJ_NAME)' \
+ -D 'fngdc $(INFO_GDC_NAME)'
info: $(INFOFILES) lang.info @GENINSRC@ srcinfo lang.srcinfo
@@ -3189,21 +3210,41 @@ gcc-vers.texi: $(BASEVER) $(DEVPHASE)
# patterns. To use them, put each of the specific targets with its
# specific dependencies but no build commands.
-doc/cpp.info: $(TEXI_CPP_FILES)
-doc/gcc.info: $(TEXI_GCC_FILES)
-doc/gccint.info: $(TEXI_GCCINT_FILES)
-doc/cppinternals.info: $(TEXI_CPPINT_FILES)
-
+# Generic entry to handle info files, which are not renamed (currently Ada)
doc/%.info: %.texi
if [ x$(BUILD_INFO) = xinfo ]; then \
$(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \
-I $(gcc_docdir)/include -o $@ $<; \
fi
+doc/$(INFO_CPP_NAME).info: $(TEXI_CPP_FILES)
+ if [ x$(BUILD_INFO) = xinfo ]; then \
+ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \
+ -I $(gcc_docdir)/include -o $@ $<; \
+ fi
+
+doc/$(INFO_GCC_NAME).info: $(TEXI_GCC_FILES)
+ if [ x$(BUILD_INFO) = xinfo ]; then \
+ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \
+ -I $(gcc_docdir)/include -o $@ $<; \
+ fi
+
+doc/$(INFO_GCCINT_NAME).info: $(TEXI_GCCINT_FILES)
+ if [ x$(BUILD_INFO) = xinfo ]; then \
+ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \
+ -I $(gcc_docdir)/include -o $@ $<; \
+ fi
+
+doc/$(INFO_CPPINT_NAME).info: $(TEXI_CPPINT_FILES)
+ if [ x$(BUILD_INFO) = xinfo ]; then \
+ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \
+ -I $(gcc_docdir)/include -o $@ $<; \
+ fi
+
# Duplicate entry to handle renaming of gccinstall.info
-doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES)
+doc/$(INFO_GCCINSTALL_NAME).info: $(TEXI_GCCINSTALL_FILES)
if [ x$(BUILD_INFO) = xinfo ]; then \
- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \
+ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \
-I $(gcc_docdir)/include -o $@ $<; \
fi
@@ -3622,11 +3663,11 @@ install-driver: installdirs xgcc$(exeext
# $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir
# to do the install.
install-info:: doc installdirs \
- $(DESTDIR)$(infodir)/cpp.info \
- $(DESTDIR)$(infodir)/gcc.info \
- $(DESTDIR)$(infodir)/cppinternals.info \
- $(DESTDIR)$(infodir)/gccinstall.info \
- $(DESTDIR)$(infodir)/gccint.info \
+ $(DESTDIR)$(infodir)/$(INFO_CPP_NAME).info \
+ $(DESTDIR)$(infodir)/$(INFO_GCC_NAME).info \
+ $(DESTDIR)$(infodir)/$(INFO_CPPINT_NAME).info \
+ $(DESTDIR)$(infodir)/$(INFO_GCCINSTALL_NAME).info \
+ $(DESTDIR)$(infodir)/$(INFO_GCCINT_NAME).info \
lang.install-info
$(DESTDIR)$(infodir)/%.info: doc/%.info installdirs
@@ -3847,8 +3888,11 @@ uninstall: lang.uninstall
-rm -rf $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext)
-rm -rf $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext)
-rm -rf $(DESTDIR)$(man1dir)/cpp$(man1ext)
- -rm -f $(DESTDIR)$(infodir)/cpp.info* $(DESTDIR)$(infodir)/gcc.info*
- -rm -f $(DESTDIR)$(infodir)/cppinternals.info* $(DESTDIR)$(infodir)/gccint.info*
+ -rm -f $(DESTDIR)$(infodir)/$(INFO_CPP_NAME).info*
+ -rm -f $(DESTDIR)$(infodir)/$(INFO_GCC_NAME).info*
+ -rm -f $(DESTDIR)$(infodir)/$(INFO_CPPINT_NAME).info*
+ -rm -f $(DESTDIR)$(infodir)/$(INFO_GCCINT_NAME).info*
+ -rm -f $(DESTDIR)$(infodir)/$(INFO_GCCINSTALL_NAME).info*
for i in ar nm ranlib ; do \
install_name=`echo gcc-$$i|sed '$(program_transform_name)'`$(exeext) ;\
target_install_name=$(target_noncanonical)-`echo gcc-$$i|sed '$(program_transform_name)'`$(exeext) ; \
Index: gcc/ada/gnat-style.texi
===================================================================
--- gcc/ada/gnat-style.texi.orig 2016-08-16 10:58:00.521572015 +0200
+++ gcc/ada/gnat-style.texi 2018-11-14 11:23:57.368904603 +0100
@@ -12,7 +12,7 @@
@finalout
@dircategory GNU Ada Tools
@direntry
-* gnat-style: (gnat-style.info). gnat-style
+* gnat-style: (gnat-style-12.info). gnat-style
@end direntry
@definfoenclose strong,`,'
Index: gcc/ada/gnat_rm.texi
===================================================================
--- gcc/ada/gnat_rm.texi.orig 2018-10-26 10:14:40.688554403 +0200
+++ gcc/ada/gnat_rm.texi 2018-11-14 11:23:57.372904672 +0100
@@ -12,7 +12,7 @@
@finalout
@dircategory GNU Ada Tools
@direntry
-* gnat_rm: (gnat_rm.info). gnat_rm
+* GNAT Reference Manual: (gnat_rm-12). Reference Manual for GNU Ada tools.
@end direntry
@definfoenclose strong,`,'
Index: gcc/ada/gnat_ugn.texi
===================================================================
--- gcc/ada/gnat_ugn.texi.orig 2018-10-26 10:14:48.048683475 +0200
+++ gcc/ada/gnat_ugn.texi 2018-11-14 11:23:57.376904740 +0100
@@ -12,7 +12,7 @@
@finalout
@dircategory GNU Ada Tools
@direntry
-* gnat_ugn: (gnat_ugn.info). gnat_ugn
+* User's Guide: (gnat_ugn-12).
@end direntry
@definfoenclose strong,`,'
Index: gcc/doc/cpp.texi
===================================================================
--- gcc/doc/cpp.texi.orig 2018-11-14 11:16:31.441269711 +0100
+++ gcc/doc/cpp.texi 2018-11-14 11:23:57.376904740 +0100
@@ -50,7 +50,7 @@ This manual contains no Invariant Sectio
@ifinfo
@dircategory Software development
@direntry
-* Cpp: (cpp). The GNU C preprocessor.
+* @value{fncpp}: (@value{fncpp}). The GNU C preprocessor.
@end direntry
@end ifinfo
Index: gcc/doc/cppinternals.texi
===================================================================
--- gcc/doc/cppinternals.texi.orig 2018-01-05 11:48:15.057892840 +0100
+++ gcc/doc/cppinternals.texi 2018-11-14 11:23:57.376904740 +0100
@@ -7,7 +7,7 @@
@ifinfo
@dircategory Software development
@direntry
-* Cpplib: (cppinternals). Cpplib internals.
+* @value{fncppint}: (@value{fncppint}). Cpplib internals.
@end direntry
@end ifinfo
Index: gcc/doc/extend.texi
===================================================================
--- gcc/doc/extend.texi.orig 2018-11-14 11:16:31.449269848 +0100
+++ gcc/doc/extend.texi 2018-11-14 11:23:57.380904808 +0100
@@ -23097,7 +23097,7 @@ want to write code that checks whether t
test for the GNU compiler the same way as for C programs: check for a
predefined macro @code{__GNUC__}. You can also use @code{__GNUG__} to
test specifically for GNU C++ (@pxref{Common Predefined Macros,,
-Predefined Macros,cpp,The GNU C Preprocessor}).
+Predefined Macros,@value{fncpp},The GNU C Preprocessor}).
@menu
* C++ Volatiles:: What constitutes an access to a volatile object.
Index: gcc/doc/gcc.texi
===================================================================
--- gcc/doc/gcc.texi.orig 2018-01-05 11:48:15.049892709 +0100
+++ gcc/doc/gcc.texi 2018-11-14 11:23:57.380904808 +0100
@@ -63,12 +63,12 @@ Texts being (a) (see below), and with the Back-Cover Texts being (b)
@ifnottex
@dircategory Software development
@direntry
-* gcc: (gcc). The GNU Compiler Collection.
-* g++: (gcc). The GNU C++ compiler.
-* gcov: (gcc) Gcov. @command{gcov}---a test coverage program.
-* gcov-tool: (gcc) Gcov-tool. @command{gcov-tool}---an offline gcda profile processing program.
-* gcov-dump: (gcc) Gcov-dump. @command{gcov-dump}---an offline gcda and gcno profile dump tool.
-* lto-dump: (gcc) lto-dump. @command{lto-dump}---Tool for
+* @value{fngcc}: (@value{fngcc}). The GNU Compiler Collection.
+* @value{fngxx}: (@value{fngcc}). The GNU C++ compiler.
+* gcov: (@value{fngcc}) Gcov. @command{gcov}---a test coverage program.
+* gcov-tool: (@value{fngcc}) Gcov-tool. @command{gcov-tool}---an offline gcda profile processing program.
+* gcov-dump: (@value{fngcc}) Gcov-dump. @command{gcov-dump}---an offline gcda and gcno profile dump tool.
+* lto-dump: (@value{fngcc}) Lto-dump. @command{lto-dump}---Tool for
dumping LTO object files.
@end direntry
This file documents the use of the GNU compilers.
@@ -127,7 +127,7 @@ version @value{version-GCC}.
The internals of the GNU compilers, including how to port them to new
targets and some information about how to write front ends for new
languages, are documented in a separate manual. @xref{Top,,
-Introduction, gccint, GNU Compiler Collection (GCC) Internals}.
+Introduction, @value{fngccint}, GNU Compiler Collection (GCC) Internals}.
@menu
* G++ and GCC:: You can compile C or C++ programs.
Index: gcc/doc/gccint.texi
===================================================================
--- gcc/doc/gccint.texi.orig 2018-10-26 10:14:33.412426798 +0200
+++ gcc/doc/gccint.texi 2018-11-14 11:23:57.380904808 +0100
@@ -49,7 +49,7 @@ Texts being (a) (see below), and with th
@ifnottex
@dircategory Software development
@direntry
-* gccint: (gccint). Internals of the GNU Compiler Collection.
+* @value{fngccint}: (@value{fngccint}). Internals of the GNU Compiler Collection.
@end direntry
This file documents the internals of the GNU compilers.
@sp 1
@@ -81,7 +81,7 @@ write front ends for new languages. It
@value{VERSION_PACKAGE}
@end ifset
version @value{version-GCC}. The use of the GNU compilers is documented in a
-separate manual. @xref{Top,, Introduction, gcc, Using the GNU
+separate manual. @xref{Top,, Introduction, @value{fngcc}, Using the GNU
Compiler Collection (GCC)}.
This manual is mainly a reference manual rather than a tutorial. It
Index: gcc/doc/install.texi
===================================================================
--- gcc/doc/install.texi.orig 2018-11-14 11:16:31.485270465 +0100
+++ gcc/doc/install.texi 2018-11-14 11:23:57.380904808 +0100
@@ -94,7 +94,7 @@ Free Documentation License}''.
@end ifinfo
@dircategory Software development
@direntry
-* gccinstall: (gccinstall). Installing the GNU Compiler Collection.
+* @value{fngccinstall}: (@value{fngccinstall}). Installing the GNU Compiler Collection.
@end direntry
@c Part 3 Titlepage and Copyright
Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi.orig 2018-11-14 11:16:31.473270259 +0100
+++ gcc/doc/invoke.texi 2018-11-14 11:23:57.384904877 +0100
@@ -12812,7 +12812,7 @@ One of the standard libraries bypassed b
@option{-nodefaultlibs} is @file{libgcc.a}, a library of internal subroutines
which GCC uses to overcome shortcomings of particular machines, or special
needs for some languages.
-(@xref{Interface,,Interfacing to GCC Output,gccint,GNU Compiler
+(@xref{Interface,,Interfacing to GCC Output,@value{fngccint},GNU Compiler
Collection (GCC) Internals},
for more discussion of @file{libgcc.a}.)
In most cases, you need @file{libgcc.a} even when you want to avoid
@@ -12821,7 +12821,7 @@ or @option{-nodefaultlibs} you should us
This ensures that you have no unresolved references to internal GCC
library subroutines.
(An example of such an internal subroutine is @code{__main}, used to ensure C++
-constructors are called; @pxref{Collect2,,@code{collect2}, gccint,
+constructors are called; @pxref{Collect2,,@code{collect2}, @value{fngccint},
GNU Compiler Collection (GCC) Internals}.)
@item -e @var{entry}
@@ -29745,7 +29745,7 @@ Note that you can also specify places to
@option{-B}, @option{-I} and @option{-L} (@pxref{Directory Options}). These
take precedence over places specified using environment variables, which
in turn take precedence over those specified by the configuration of GCC@.
-@xref{Driver,, Controlling the Compilation Driver @file{gcc}, gccint,
+@xref{Driver,, Controlling the Compilation Driver @file{gcc}, @value{fngccint},
GNU Compiler Collection (GCC) Internals}.
@table @env
@@ -29905,7 +29905,7 @@ the headers it contains change.
A precompiled header file is searched for when @code{#include} is
seen in the compilation. As it searches for the included file
-(@pxref{Search Path,,Search Path,cpp,The C Preprocessor}) the
+(@pxref{Search Path,,Search Path,@value{fncpp},The C Preprocessor}) the
compiler looks for a precompiled header in each directory just before it
looks for the include file in that directory. The name searched for is
the name specified in the @code{#include} with @samp{.gch} appended. If
Index: gcc/doc/libgcc.texi
===================================================================
--- gcc/doc/libgcc.texi.orig 2018-01-05 11:48:15.629902164 +0100
+++ gcc/doc/libgcc.texi 2018-11-14 11:23:57.384904877 +0100
@@ -24,7 +24,7 @@ that needs them.
GCC will also generate calls to C library routines, such as
@code{memcpy} and @code{memset}, in some cases. The set of routines
that GCC may possibly use is documented in @ref{Other
-Builtins,,,gcc, Using the GNU Compiler Collection (GCC)}.
+Builtins,,,@value{fngcc}, Using the GNU Compiler Collection (GCC)}.
These routines take arguments and return values of a specific machine
mode, not a specific C type. @xref{Machine Modes}, for an explanation
Index: gcc/fortran/Make-lang.in
===================================================================
--- gcc/fortran/Make-lang.in.orig 2018-10-26 10:15:03.220949527 +0200
+++ gcc/fortran/Make-lang.in 2018-11-14 11:23:57.384904877 +0100
@@ -116,7 +116,8 @@ fortran.tags: force
cd $(srcdir)/fortran; $(ETAGS) -o TAGS.sub *.c *.h; \
$(ETAGS) --include TAGS.sub --include ../TAGS.sub
-fortran.info: doc/gfortran.info doc/gfc-internals.info
+INFO_FORTRAN_NAME = $(shell echo gfortran|sed '$(program_transform_name)')
+fortran.info: doc/$(INFO_FORTRAN_NAME).info
F95_DVIFILES = doc/gfortran.dvi
@@ -184,10 +185,10 @@ GFORTRAN_TEXI = \
$(srcdir)/doc/include/gcc-common.texi \
gcc-vers.texi
-doc/gfortran.info: $(GFORTRAN_TEXI)
+doc/$(INFO_FORTRAN_NAME).info: $(GFORTRAN_TEXI)
if [ x$(BUILD_INFO) = xinfo ]; then \
rm -f doc/gfortran.info-*; \
- $(MAKEINFO) -I $(srcdir)/doc/include -I $(srcdir)/fortran \
+ $(MAKEINFO) $(MAKEINFODEFS) -I $(srcdir)/doc/include -I $(srcdir)/fortran \
-o $@ $<; \
else true; fi
@@ -252,7 +253,7 @@ fortran.install-common: install-finclude
fortran.install-plugin:
-fortran.install-info: $(DESTDIR)$(infodir)/gfortran.info
+fortran.install-info: $(DESTDIR)$(infodir)/$(INFO_FORTRAN_NAME).info
fortran.install-man: $(DESTDIR)$(man1dir)/$(GFORTRAN_INSTALL_NAME)$(man1ext)
@@ -270,7 +271,7 @@ fortran.uninstall:
rm -rf $(DESTDIR)$(bindir)/$(GFORTRAN_INSTALL_NAME)$(exeext); \
rm -rf $(DESTDIR)$(man1dir)/$(GFORTRAN_INSTALL_NAME)$(man1ext); \
rm -rf $(DESTDIR)$(bindir)/$(GFORTRAN_TARGET_INSTALL_NAME)$(exeext); \
- rm -rf $(DESTDIR)$(infodir)/gfortran.info*
+ rm -rf $(DESTDIR)$(infodir)/$(INFO_FORTRAN_NAME).info*
#
# Clean hooks:
Index: gcc/fortran/gfortran.texi
===================================================================
--- gcc/fortran/gfortran.texi.orig 2018-11-02 12:34:35.446010493 +0100
+++ gcc/fortran/gfortran.texi 2018-11-14 11:23:57.384904877 +0100
@@ -101,7 +101,7 @@ Texts being (a) (see below), and with th
@ifinfo
@dircategory Software development
@direntry
-* gfortran: (gfortran). The GNU Fortran Compiler.
+* @value{fngfortran}: (@value{fngfortran}). The GNU Fortran Compiler.
@end direntry
This file documents the use and the internals of
the GNU Fortran compiler, (@command{gfortran}).
Index: libffi/Makefile.am
===================================================================
--- libffi/Makefile.am.orig 2018-11-02 12:34:40.094088439 +0100
+++ libffi/Makefile.am 2018-11-14 11:23:57.384904877 +0100
@@ -25,6 +25,8 @@ TEXINFO_TEX = ../gcc/doc/include/texin
# Defines info, dvi, pdf and html targets
MAKEINFOFLAGS = -I $(srcdir)/../gcc/doc/include
info_TEXINFOS = doc/libffi.texi
+INFO_LIBFFI_NAME = $(shell echo libffi | sed '${program_transform_name}')
+INFO_DEPS = doc/$(INFO_LIBFFI_NAME).info
# AM_CONDITIONAL on configure option --generated-files-in-srcdir
if GENINSRC
@@ -42,14 +44,14 @@ endif
all-local: $(STAMP_GENINSRC)
-stamp-geninsrc: doc/libffi.info
- cp -p $(top_builddir)/doc/libffi.info $(srcdir)/doc/libffi.info
+stamp-geninsrc: doc/$(INFO_LIBFFI_NAME).info
+ cp -p $(top_builddir)/doc/$(INFO_LIBFFI_NAME).info $(srcdir)/doc/libffi.info
@touch $@
-doc/libffi.info: $(STAMP_BUILD_INFO)
+doc/$(INFO_LIBFFI_NAME).info: $(STAMP_BUILD_INFO)
stamp-build-info: doc/libffi.texi $(srcdir)/doc/version.texi doc/$(am__dirstamp)
- $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)/doc -o doc/libffi.info $(srcdir)/doc/libffi.texi
+ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -D 'fnlibffi $(INFO_LIBFFI_NAME)' -I $(srcdir)/doc -o doc/$(INFO_LIBFFI_NAME).info $(srcdir)/doc/libffi.texi
@touch $@
CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO)
Index: libffi/Makefile.in
===================================================================
--- libffi/Makefile.in.orig 2018-11-02 12:34:43.298142170 +0100
+++ libffi/Makefile.in 2018-11-14 11:23:57.384904877 +0100
@@ -247,7 +247,8 @@ AM_V_texidevnull = $(am__v_texidevnull_@AM_V@)
am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
am__v_texidevnull_0 = > /dev/null
am__v_texidevnull_1 =
-INFO_DEPS = doc/libffi.info
+INFO_LIBFFI_NAME = $(shell echo libffi | sed '${program_transform_name}')
+INFO_DEPS = doc/$(INFO_LIBFFI_NAME).info
am__TEXINFO_TEX_DIR = $(srcdir)/../gcc/doc/include
DVIS = doc/libffi.dvi
PDFS = doc/libffi.pdf
@@ -470,6 +471,8 @@ TEXINFO_TEX = ../gcc/doc/include/texinfo.tex
# Defines info, dvi, pdf and html targets
MAKEINFOFLAGS = -I $(srcdir)/../gcc/doc/include
info_TEXINFOS = doc/libffi.texi
+INFO_LIBFFI_NAME = $(shell echo libffi | sed '${program_transform_name}')
+INFO_DEPS = doc/$(INFO_LIBFFI_NAME).info
@GENINSRC_FALSE@STAMP_GENINSRC =
# AM_CONDITIONAL on configure option --generated-files-in-srcdir
@@ -1903,14 +1906,15 @@ uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
all-local: $(STAMP_GENINSRC)
-stamp-geninsrc: doc/libffi.info
- cp -p $(top_builddir)/doc/libffi.info $(srcdir)/doc/libffi.info
+$(srcdir)/doc/libffi.info: stamp-geninsrc
+stamp-geninsrc: doc/$(INFO_LIBFFI_NAME).info
+ cp -p $(top_builddir)/doc/$(INFO_LIBFFI_NAME).info $(srcdir)/doc/libffi.info
@touch $@
-doc/libffi.info: $(STAMP_BUILD_INFO)
+doc/$(INFO_LIBFFI_NAME).info: $(STAMP_BUILD_INFO)
stamp-build-info: doc/libffi.texi $(srcdir)/doc/version.texi doc/$(am__dirstamp)
- $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)/doc -o doc/libffi.info $(srcdir)/doc/libffi.texi
+ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -D 'fnlibffi $(INFO_LIBFFI_NAME)' -I $(srcdir)/doc -o doc/$(INFO_LIBFFI_NAME).info $(srcdir)/doc/libffi.texi
@touch $@
@LIBFFI_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBFFI_BUILD_VERSIONED_SHLIB_TRUE@libffi.map-sun : libffi.map $(top_srcdir)/../contrib/make_sunver.pl \
@LIBFFI_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBFFI_BUILD_VERSIONED_SHLIB_TRUE@ $(libffi_la_OBJECTS) $(libffi_la_LIBADD)
Index: libffi/doc/libffi.texi
===================================================================
--- libffi/doc/libffi.texi.orig 2015-01-29 13:55:28.849745068 +0100
+++ libffi/doc/libffi.texi 2018-11-14 11:23:57.384904877 +0100
@@ -43,7 +43,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@dircategory Development
@direntry
-* libffi: (libffi). Portable foreign function interface library.
+* libffi: (@value{fnlibffi}). Portable foreign-function interface library.
@end direntry
@titlepage
Index: libgomp/Makefile.am
===================================================================
--- libgomp/Makefile.am.orig 2018-11-14 11:16:19.017056772 +0100
+++ libgomp/Makefile.am 2018-11-14 11:23:57.384904877 +0100
@@ -127,14 +127,17 @@ endif
all-local: $(STAMP_GENINSRC)
-stamp-geninsrc: libgomp.info
- cp -p $(top_builddir)/libgomp.info $(srcdir)/libgomp.info
+INFO_LIBGOMP_NAME = $(shell echo libgomp|sed '$(program_transform_name)')
+stamp-geninsrc: $(INFO_LIBGOMP_NAME).info
+ cp -p $(top_builddir)/$(INFO_LIBGOMP_NAME).info $(srcdir)/libgomp.info
@touch $@
-libgomp.info: $(STAMP_BUILD_INFO)
+libgomp.info: $(INFO_LIBGOMP_NAME).info
+ cp $(INFO_LIBGOMP_NAME).info libgomp.info
+$(STAMP_BUILD_INFO).info: $(STAMP_BUILD_INFO)
stamp-build-info: libgomp.texi
- $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o libgomp.info $(srcdir)/libgomp.texi
+ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o $(INFO_LIBGOMP_NAME).info $(srcdir)/libgomp.texi
@touch $@
Index: libgomp/Makefile.in
===================================================================
--- libgomp/Makefile.in.orig 2018-11-14 11:16:58.797738530 +0100
+++ libgomp/Makefile.in 2018-11-14 11:23:57.384904877 +0100
@@ -601,6 +601,7 @@ info_TEXINFOS = libgomp.texi
# AM_CONDITIONAL on configure check ACX_CHECK_PROG_VER([MAKEINFO])
@BUILD_INFO_TRUE@STAMP_BUILD_INFO = stamp-build-info
+INFO_LIBGOMP_NAME = $(shell echo libgomp|sed '$(program_transform_name)')
CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO)
MAINTAINERCLEANFILES = $(srcdir)/libgomp.info
MULTISRCTOP =
@@ -1428,15 +1429,16 @@ env.lo: libgomp_f.h
env.o: libgomp_f.h
all-local: $(STAMP_GENINSRC)
-
-stamp-geninsrc: libgomp.info
- cp -p $(top_builddir)/libgomp.info $(srcdir)/libgomp.info
+stamp-geninsrc: $(INFO_LIBGOMP_NAME).info
+ cp -p $(top_builddir)/$(INFO_LIBGOMP_NAME).info $(srcdir)/libgomp.info
@touch $@
-libgomp.info: $(STAMP_BUILD_INFO)
+libgomp.info: $(INFO_LIBGOMP_NAME).info
+ cp $(INFO_LIBGOMP_NAME).info libgomp.info
+$(INFO_LIBGOMP_NAME).info: $(STAMP_BUILD_INFO)
stamp-build-info: libgomp.texi
- $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o libgomp.info $(srcdir)/libgomp.texi
+ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -D 'fnlibgomp $(INFO_LIBGOMP_NAME)' -I $(srcdir) -o $(INFO_LIBGOMP_NAME).info $(srcdir)/libgomp.texi
@touch $@
# target overrides
Index: libgomp/libgomp.texi
===================================================================
--- libgomp/libgomp.texi.orig 2018-10-26 10:15:47.925733302 +0200
+++ libgomp/libgomp.texi 2018-11-14 11:23:57.388904945 +0100
@@ -31,7 +31,7 @@ texts being (a) (see below), and with th
@ifinfo
@dircategory GNU Libraries
@direntry
-* libgomp: (libgomp). GNU Offloading and Multi Processing Runtime Library.
+* @value{fnlibgomp}: (@value{fnlibgomp}). GNU Offloading and Multi Processing Runtime Library.
@end direntry
This manual documents libgomp, the GNU Offloading and Multi Processing
Index: libitm/libitm.texi
===================================================================
--- libitm/libitm.texi.orig 2018-01-05 11:47:36.801269131 +0100
+++ libitm/libitm.texi 2018-11-14 11:23:57.388904945 +0100
@@ -20,7 +20,7 @@ Free Documentation License''.
@ifinfo
@dircategory GNU Libraries
@direntry
-* libitm: (libitm). GNU Transactional Memory Library
+* libitm: (libitm-6). GNU Transactional Memory Library
@end direntry
This manual documents the GNU Transactional Memory Library.
Index: libquadmath/libquadmath.texi
===================================================================
--- libquadmath/libquadmath.texi.orig 2018-11-06 11:26:49.566013749 +0100
+++ libquadmath/libquadmath.texi 2018-11-14 11:23:57.388904945 +0100
@@ -25,7 +25,7 @@ copy and modify this GNU manual.
@ifinfo
@dircategory GNU Libraries
@direntry
-* libquadmath: (libquadmath). GCC Quad-Precision Math Library
+* libquadmath: (libquadmath-6). GCC Quad-Precision Math Library
@end direntry
This manual documents the GCC Quad-Precision Math Library API.
Index: gcc/d/Make-lang.in
===================================================================
--- gcc/d/Make-lang.in.orig 2018-11-02 12:34:28.053886530 +0100
+++ gcc/d/Make-lang.in 2018-11-14 11:23:57.388904945 +0100
@@ -157,10 +157,11 @@ D_TEXI_FILES = \
$(gcc_docdir)/include/gcc-common.texi \
gcc-vers.texi
-doc/gdc.info: $(D_TEXI_FILES)
+INFO_GDC_NAME = $(shell echo gdc|sed '$(program_transform_name)')
+doc/$(INFO_GDC_NAME).info: $(D_TEXI_FILES)
if test "x$(BUILD_INFO)" = xinfo; then \
- rm -f doc/gdc.info*; \
- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \
+ rm -f doc/$(INFO_GDC_NAME).info*; \
+ $(MAKEINFO) $(MAKEINFOFLAGS) $(MAKEINFODEFS) -I $(gcc_docdir) \
-I $(gcc_docdir)/include -o $@ $<; \
else true; fi
@@ -186,11 +187,11 @@ gdc.pod: d/gdc.texi
d.all.cross: gdc-cross$(exeext)
d.start.encap: gdc$(exeext)
d.rest.encap:
-d.info: doc/gdc.info
+d.info: doc/$(INFO_GDC_NAME).info
d.dvi: doc/gdc.dvi
d.pdf: doc/gdc.pdf
d.html: $(build_htmldir)/d/index.html
-d.srcinfo: doc/gdc.info
+d.srcinfo: doc/$(INFO_GDC_NAME).info
-cp -p $^ $(srcdir)/doc
d.srcextra:
@@ -231,7 +232,7 @@ d.install-common: installdirs
d.install-plugin:
-d.install-info: $(DESTDIR)$(infodir)/gdc.info
+d.install-info: $(DESTDIR)$(infodir)/$(INFO_GDC_NAME).info
d.install-pdf: doc/gdc.pdf
@$(NORMAL_INSTALL)
@@ -271,7 +272,7 @@ d.uninstall:
-rm -rf $(DESTDIR)$(bindir)/$(D_INSTALL_NAME)$(exeext)
-rm -rf $(DESTDIR)$(man1dir)/$(D_INSTALL_NAME)$(man1ext)
-rm -rf $(DESTDIR)$(bindir)/$(D_TARGET_INSTALL_NAME)$(exeext)
- -rm -rf $(DESTDIR)$(infodir)/gdc.info*
+ -rm -rf $(DESTDIR)$(infodir)/$(INFO_GDC_NAME).info*
# Clean hooks.
Index: gcc/d/gdc.texi
===================================================================
--- gcc/d/gdc.texi.orig 2018-10-29 10:38:03.898079629 +0100
+++ gcc/d/gdc.texi 2018-11-14 11:23:57.388904945 +0100
@@ -36,7 +36,7 @@ man page gfdl(7).
@format
@dircategory Software development
@direntry
-* gdc: (gdc). A GCC-based compiler for the D language
+* @value{fngdc}: (@value{fngdc}). A GCC-based compiler for the D language
@end direntry
@end format

115
gcc44-textdomain.patch Normal file
View file

@ -0,0 +1,115 @@
#! /bin/sh -e
# DP: Set gettext's domain and textdomain to the versioned package name.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 0fe2ba241..86e5fb9e7 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -4303,8 +4303,8 @@ install-po:
dir=$(localedir)/$$lang/LC_MESSAGES; \
echo $(mkinstalldirs) $(DESTDIR)$$dir; \
$(mkinstalldirs) $(DESTDIR)$$dir || exit 1; \
- echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc.mo; \
- $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc.mo; \
+ echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc-12.mo; \
+ $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc-12.mo; \
done
# Rule for regenerating the message template (gcc.pot).
diff --git a/gcc/intl.cc b/gcc/intl.cc
index e8108b7dc..62895c11f 100644
--- a/gcc/intl.cc
+++ b/gcc/intl.cc
@@ -55,8 +55,8 @@ gcc_init_libintl (void)
setlocale (LC_ALL, "");
#endif
- (void) bindtextdomain ("gcc", LOCALEDIR);
- (void) textdomain ("gcc");
+ (void) bindtextdomain ("gcc-12", LOCALEDIR);
+ (void) textdomain ("gcc-12");
/* Opening quotation mark. */
open_quote = _("`");
diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in
index 5fbba9b9c..c37bc6bcf 100644
--- a/libcpp/Makefile.in
+++ b/libcpp/Makefile.in
@@ -49,6 +49,7 @@ LDFLAGS = @LDFLAGS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
PACKAGE = @PACKAGE@
+PACKAGE_SUFFIX = -12
RANLIB = @RANLIB@
SHELL = @SHELL@
USED_CATALOGS = @USED_CATALOGS@
@@ -76,8 +77,10 @@ INCLUDES = -I$(srcdir) -I. -I$(srcdir)/../include @INCINTL@ \
ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(CPPFLAGS) $(PICFLAG) \
$(CET_HOST_FLAGS)
+ALL_CFLAGS += -DPACKAGE_SUFFIX=\"$(strip $(PACKAGE_SUFFIX))\"
ALL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(NOEXCEPTION_FLAGS) $(INCLUDES) \
$(CPPFLAGS) $(PICFLAG) $(CET_HOST_FLAGS)
+ALL_CXXFLAGS += -DPACKAGE_SUFFIX=\"$(strip $(PACKAGE_SUFFIX))\"
# The name of the compiler to use.
COMPILER = $(CXX)
@@ -166,8 +169,8 @@ install-strip install: all installdirs
else continue; \
fi; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
- echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
- $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
+ echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE)$(PACKAGE_SUFFIX).mo; \
+ $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE)$(PACKAGE_SUFFIX).mo; \
done
mostlyclean:
diff --git a/libcpp/init.cc b/libcpp/init.cc
index 63124c816..4471ff358 100644
--- a/libcpp/init.cc
+++ b/libcpp/init.cc
@@ -167,7 +167,7 @@ init_library (void)
init_trigraph_map ();
#ifdef ENABLE_NLS
- (void) bindtextdomain (PACKAGE, LOCALEDIR);
+ (void) bindtextdomain (PACKAGE PACKAGE_SUFFIX, LOCALEDIR);
#endif
}
}
diff --git a/libcpp/system.h b/libcpp/system.h
index 0a0629d55..6fc28a651 100644
--- a/libcpp/system.h
+++ b/libcpp/system.h
@@ -284,7 +284,7 @@ extern int errno;
#endif
#ifndef _
-# define _(msgid) dgettext (PACKAGE, msgid)
+# define _(msgid) dgettext (PACKAGE PACKAGE_SUFFIX, msgid)
#endif
#ifndef N_

View file

@ -0,0 +1,14 @@
Index: libstdc++-v3/doc/html/index.html
===================================================================
--- libstdc++-v3/doc/html/index.html (revision 210144)
+++ libstdc++-v3/doc/html/index.html (working copy)
@@ -18,7 +18,7 @@
</p></li><li class="listitem"><p>
<a class="link" href="faq.html" title="Frequently Asked Questions">Frequently Asked Questions</a>
</p></li><li class="listitem"><p>
- <a class="link" href="api.html" title="The GNU C++ Library API Reference">API and Source Documentation</a>
+ <a class="link" href="api/index.html" title="The GNU C++ Library API Reference">API and Source Documentation</a>
</p></li></ul></div><p>
</p></div></div></div><hr /></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="book"><a href="manual/index.html">The GNU C++ Library Manual</a></span></dt><dd><dl><dt><span class="part"><a href="manual/intro.html">I.
Introduction

View file

@ -0,0 +1,18 @@
Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in (revision 255776)
+++ gcc/Makefile.in (working copy)
@@ -3066,13 +3066,6 @@ stmp-fixinc: gsyslimits.h macro_list fix
sysroot_headers_suffix=`echo $${ml} | sed -e 's/;.*$$//'`; \
multi_dir=`echo $${ml} | sed -e 's/^[^;]*;//'`; \
fix_dir=include-fixed$${multi_dir}; \
- if ! $(inhibit_libc) && test ! -d ${BUILD_SYSTEM_HEADER_DIR}; then \
- echo The directory that should contain system headers does not exist: >&2 ; \
- echo " ${BUILD_SYSTEM_HEADER_DIR}" >&2 ; \
- tooldir_sysinc=`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`; \
- if test "x${BUILD_SYSTEM_HEADER_DIR}" = "x$${tooldir_sysinc}"; \
- then sleep 1; else exit 1; fi; \
- fi; \
$(mkinstalldirs) $${fix_dir}; \
chmod a+rx $${fix_dir} || true; \
(TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); ${PWD_COMMAND}`; \

View file

@ -0,0 +1,13 @@
Index: gcc/c-family/c.opt
===================================================================
--- gcc/c-family/c.opt (revision 246224)
+++ gcc/c-family/c.opt (working copy)
@@ -596,7 +596,7 @@ C ObjC C++ ObjC++ Var(warn_double_promot
Warn about implicit conversions from \"float\" to \"double\".
Wexpansion-to-defined
-C ObjC C++ ObjC++ CPP(warn_expansion_to_defined) CppReason(CPP_W_EXPANSION_TO_DEFINED) Var(cpp_warn_expansion_to_defined) Init(0) Warning EnabledBy(Wextra || Wpedantic)
+C ObjC C++ ObjC++ CPP(warn_expansion_to_defined) CppReason(CPP_W_EXPANSION_TO_DEFINED) Var(cpp_warn_expansion_to_defined) Init(0) Warning EnabledBy(Wpedantic)
Warn if \"defined\" is used outside #if.
Wimplicit-function-declaration

View file

@ -0,0 +1,116 @@
Use the binaries build-id as checksum for PCH purposes.
diff --git a/gcc/c-family/c-pch.cc b/gcc/c-family/c-pch.cc
index 2cafa1387bb..7f51f977378 100644
--- a/gcc/c-family/c-pch.cc
+++ b/gcc/c-family/c-pch.cc
@@ -64,6 +64,66 @@ static FILE *pch_outfile;
static const char *get_ident (void);
+#if _GNU_SOURCE
+#include <link.h>
+
+#define ALIGN(val, align) (((val) + (align) - 1) & ~((align) - 1))
+
+static int
+get_build_id_1 (struct dl_phdr_info *info, size_t, void *data)
+{
+ for (unsigned i = 0; i < info->dlpi_phnum; ++i)
+ {
+ if (info->dlpi_phdr[i].p_type != PT_NOTE)
+ continue;
+ ElfW(Nhdr) *nhdr
+ = (ElfW(Nhdr) *)(info->dlpi_addr + info->dlpi_phdr[i].p_vaddr);
+ ptrdiff_t size = info->dlpi_phdr[i].p_filesz;
+ ptrdiff_t align = info->dlpi_phdr[i].p_align;
+ if (align != 8)
+ align = 4;
+ while (size >= (ptrdiff_t)sizeof (ElfW(Nhdr)))
+ {
+ if (nhdr->n_type == NT_GNU_BUILD_ID
+ && nhdr->n_namesz == 4
+ && strncmp ((char *)nhdr
+ + sizeof (ElfW(Nhdr)),
+ "GNU", 4) == 0
+ && nhdr->n_descsz >= 16)
+ {
+ memcpy (data,
+ (char *)nhdr
+ + ALIGN (sizeof (ElfW(Nhdr))
+ + nhdr->n_namesz, align), 16);
+ return 1;
+ }
+ size_t offset = (ALIGN (sizeof (ElfW(Nhdr))
+ + nhdr->n_namesz, align)
+ + ALIGN(nhdr->n_descsz, align));
+ nhdr = (ElfW(Nhdr) *)((char *)nhdr + offset);
+ size -= offset;
+ }
+ }
+
+ return 0;
+}
+
+static const unsigned char *
+get_build_id ()
+{
+ static unsigned char build_id[16];
+ if (!dl_iterate_phdr (get_build_id_1, build_id))
+ return NULL;
+ return build_id;
+}
+#else
+static const unsigned char *
+get_build_id ()
+{
+ return NULL;
+}
+#endif
+
/* Compute an appropriate 8-byte magic number for the PCH file, so that
utilities like file(1) can identify it, and so that GCC can quickly
ignore non-PCH files and PCH files that are of a completely different
@@ -118,8 +178,11 @@ pch_init (void)
}
target_validity = targetm.get_pch_validity (&v.target_data_length);
+ const unsigned char *chksum = get_build_id ();
+ if (!chksum)
+ chksum = executable_checksum;
if (fwrite (partial_pch, IDENT_LENGTH, 1, f) != 1
- || fwrite (executable_checksum, 16, 1, f) != 1
+ || fwrite (chksum, 16, 1, f) != 1
|| fwrite (&v, sizeof (v), 1, f) != 1
|| fwrite (target_validity, v.target_data_length, 1, f) != 1)
fatal_error (input_location, "cannot write to %s: %m", pch_file);
@@ -234,7 +297,10 @@ c_common_valid_pch (cpp_reader *pfile, const char *name, int fd)
cpp_warning (pfile, CPP_W_INVALID_PCH, "%s: not a PCH file", name);
return 2;
}
- if (memcmp (ident + IDENT_LENGTH, executable_checksum, 16) != 0)
+ const unsigned char *chksum = get_build_id ();
+ if (!chksum)
+ chksum = executable_checksum;
+ if (memcmp (ident + IDENT_LENGTH, chksum, 16) != 0)
{
cpp_warning (pfile, CPP_W_INVALID_PCH,
"%s: created by a different GCC executable", name);
diff --git a/gcc/genchecksum.cc b/gcc/genchecksum.cc
index 47280f5147b..bcfdcacf954 100644
--- a/gcc/genchecksum.cc
+++ b/gcc/genchecksum.cc
@@ -113,8 +113,13 @@ main (int argc, char ** argv)
puts ("#include \"config.h\"");
puts ("#include \"system.h\"");
fputs ("EXPORTED_CONST unsigned char executable_checksum[16] = { ", stdout);
+#if _GNU_SOURCE
+ for (i = 0; i < 16; i++)
+ printf ("0x%02x%s", 0, i == 15 ? " };\n" : ", ");
+#else
for (i = 0; i < 16; i++)
printf ("0x%02x%s", result[i], i == 15 ? " };\n" : ", ");
+#endif
return 0;
}

View file

@ -0,0 +1,15 @@
Avoid leaking current data on generated file for Ada.
Index: gcc/ada/gcc-interface/Makefile.in
===================================================================
--- gcc/ada/gcc-interface/Makefile.in (revision 268977)
+++ gcc/ada/gcc-interface/Makefile.in (working copy)
@@ -2407,6 +2407,7 @@ $(RTSDIR)/s-oscons.ads: ../stamp-gnatlib
$(OSCONS_CPP) ; \
$(OSCONS_EXTRACT) ; \
../bldtools/oscons/xoscons s-oscons)
+ touch -r $(fsrcpfx)ada/gsocket.h $@
gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR) $(RTSDIR)/s-oscons.ads
test -f $(RTSDIR)/s-oscons.ads || exit 1

20
tls-no-direct.diff Normal file
View file

@ -0,0 +1,20 @@
For i?86 negative offsets to %fs segment accesses cause a hypervisor
trap for Xen. Avoid this by making accesses indirect.
??? Note that similar to the behavior on SLE11 this only affects
the compiler built on %ix86, not that on x86_64, even with -m32.
Index: gcc/config/i386/linux.h
===================================================================
--- gcc/config/i386/linux.h.orig 2015-12-17 15:07:37.785650062 +0100
+++ gcc/config/i386/linux.h 2015-12-17 15:08:06.393983290 +0100
@@ -24,3 +24,9 @@ along with GCC; see the file COPYING3.
#undef MUSL_DYNAMIC_LINKER
#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
+
+/* This slows down Xen, so take a very small general performance hit
+ for not accessing the %fs segment with negative offsets by making
+ GCC not emit direct accesses to %fs at all. */
+#undef TARGET_TLS_DIRECT_SEG_REFS_DEFAULT
+#define TARGET_TLS_DIRECT_SEG_REFS_DEFAULT 0