Skip to content
Snippets Groups Projects
Commit 41a2023a authored by Bernhard Rosenkränzer's avatar Bernhard Rosenkränzer
Browse files

Merge branch 'features/gcc-12.2' into 'kirkstone'

gcc: Update to 12.2 and merge improvements from upstream

See merge request !281
parents d50b75b9 3305908b
No related branches found
No related tags found
No related merge requests found
Showing
with 364 additions and 84 deletions
From 0ae7090dec149cb2ff0c87eef87c043d4000ece1 Mon Sep 17 00:00:00 2001 From 32129f9682d0d27fc67af10f077ad2768935cbe6 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 29 Mar 2013 09:30:32 +0400 Date: Fri, 29 Mar 2013 09:30:32 +0400
Subject: [PATCH] gcc: armv4: pass fix-v4bx to linker to support EABI. Subject: [PATCH] gcc: armv4: pass fix-v4bx to linker to support EABI.
...@@ -19,12 +19,12 @@ Upstream-Status: Pending ...@@ -19,12 +19,12 @@ Upstream-Status: Pending
1 file changed, 5 insertions(+), 1 deletion(-) 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
index 6bd95855827..77befab5da8 100644 index 17c18b27145..8eacb099317 100644
--- a/gcc/config/arm/linux-eabi.h --- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h +++ b/gcc/config/arm/linux-eabi.h
@@ -91,10 +91,14 @@ @@ -91,10 +91,14 @@
#define MUSL_DYNAMIC_LINKER \ #define MUSL_DYNAMIC_LINKER \
"/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1" SYSTEMLIBS_DIR "ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1"
+/* For armv4 we pass --fix-v4bx to linker to support EABI */ +/* For armv4 we pass --fix-v4bx to linker to support EABI */
+#undef TARGET_FIX_V4BX_SPEC +#undef TARGET_FIX_V4BX_SPEC
......
From 5ce8aa4615a3816d12c43752323154744517ae9f Mon Sep 17 00:00:00 2001 From bf85b8bbcb4b77725d4c22c1bb25a29f6ff21038 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 29 Mar 2013 09:33:04 +0400 Date: Fri, 29 Mar 2013 09:33:04 +0400
Subject: [PATCH] Use the multilib config files from ${B} instead of using the Subject: [PATCH] Use the multilib config files from ${B} instead of using the
...@@ -18,10 +18,10 @@ Upstream-Status: Inappropriate [configuration] ...@@ -18,10 +18,10 @@ Upstream-Status: Inappropriate [configuration]
2 files changed, 36 insertions(+), 8 deletions(-) 2 files changed, 36 insertions(+), 8 deletions(-)
diff --git a/gcc/configure b/gcc/configure diff --git a/gcc/configure b/gcc/configure
index 5160917d73e..e663052cad2 100755 index 3fc0e2f5813..2f0f0e057a9 100755
--- a/gcc/configure --- a/gcc/configure
+++ b/gcc/configure +++ b/gcc/configure
@@ -13070,10 +13070,20 @@ done @@ -13361,10 +13361,20 @@ done
tmake_file_= tmake_file_=
for f in ${tmake_file} for f in ${tmake_file}
do do
...@@ -46,7 +46,7 @@ index 5160917d73e..e663052cad2 100755 ...@@ -46,7 +46,7 @@ index 5160917d73e..e663052cad2 100755
done done
tmake_file="${tmake_file_}${omp_device_property_tmake_file}" tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
@@ -13084,6 +13094,10 @@ tm_file_list="options.h" @@ -13375,6 +13385,10 @@ tm_file_list="options.h"
tm_include_list="options.h insn-constants.h" tm_include_list="options.h insn-constants.h"
for f in $tm_file; do for f in $tm_file; do
case $f in case $f in
...@@ -58,10 +58,10 @@ index 5160917d73e..e663052cad2 100755 ...@@ -58,10 +58,10 @@ index 5160917d73e..e663052cad2 100755
f=`echo $f | sed 's/^..//'` f=`echo $f | sed 's/^..//'`
tm_file_list="${tm_file_list} $f" tm_file_list="${tm_file_list} $f"
diff --git a/gcc/configure.ac b/gcc/configure.ac diff --git a/gcc/configure.ac b/gcc/configure.ac
index 50f78308e8a..2b84875b028 100644 index 46de496b256..6155b83a732 100644
--- a/gcc/configure.ac --- a/gcc/configure.ac
+++ b/gcc/configure.ac +++ b/gcc/configure.ac
@@ -2243,10 +2243,20 @@ done @@ -2312,10 +2312,20 @@ done
tmake_file_= tmake_file_=
for f in ${tmake_file} for f in ${tmake_file}
do do
...@@ -86,7 +86,7 @@ index 50f78308e8a..2b84875b028 100644 ...@@ -86,7 +86,7 @@ index 50f78308e8a..2b84875b028 100644
done done
tmake_file="${tmake_file_}${omp_device_property_tmake_file}" tmake_file="${tmake_file_}${omp_device_property_tmake_file}"
@@ -2257,6 +2267,10 @@ tm_file_list="options.h" @@ -2326,6 +2336,10 @@ tm_file_list="options.h"
tm_include_list="options.h insn-constants.h" tm_include_list="options.h insn-constants.h"
for f in $tm_file; do for f in $tm_file; do
case $f in case $f in
......
From 75a1ce0265ca123f74f17a40ad8bd8f26d9c2ab3 Mon Sep 17 00:00:00 2001 From e5463727ff028cee5e452da38f5b4c44d52e412e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 20 Feb 2015 09:39:38 +0000 Date: Fri, 20 Feb 2015 09:39:38 +0000
Subject: [PATCH] Avoid using libdir from .la which usually points to a host Subject: [PATCH] Avoid using libdir from .la which usually points to a host
......
From 20afebc61199cd74481b0b831c1b56465cd37fa0 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 20 Feb 2015 09:40:59 +0000
Subject: [PATCH] export CPP
The OE environment sets and exports CPP as being the target gcc. When
building gcc-cross-canadian for a mingw targetted sdk, the following can be found
in build.x86_64-pokysdk-mingw32.i586-poky-linux/build-x86_64-linux/libiberty/config.log:
configure:3641: checking for _FILE_OFFSET_BITS value needed for large files
configure:3666: gcc -c -isystem/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe conftest.c >&5
configure:3666: $? = 0
configure:3698: result: no
configure:3786: checking how to run the C preprocessor
configure:3856: result: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32
configure:3876: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 conftest.c
configure:3876: $? = 0
Note this is a *build* target (in build-x86_64-linux) so it should be
using the host "gcc", not x86_64-pokysdk-mingw32-gcc. Since the mingw32
headers are very different, using the wrong cpp is a real problem. It is leaking
into configure through the CPP variable. Ultimately this leads to build
failures related to not being able to include a process.h file for pem-unix.c.
The fix is to ensure we export a sane CPP value into the build
environment when using build targets. We could define a CPP_FOR_BUILD value which may be
the version which needs to be upstreamed but for now, this fix is good enough to
avoid the problem.
RP 22/08/2013
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Makefile.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile.in b/Makefile.in
index 1d9c83cc566..11819667751 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -152,6 +152,7 @@ BUILD_EXPORTS = \
AR="$(AR_FOR_BUILD)"; export AR; \
AS="$(AS_FOR_BUILD)"; export AS; \
CC="$(CC_FOR_BUILD)"; export CC; \
+ CPP="$(CC_FOR_BUILD) -E"; export CPP; \
CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
CPP="$(CPP_FOR_BUILD)"; export CPP; \
From 6f410ed8fb7eee11ba7a25634c2257666b98ef52 Mon Sep 17 00:00:00 2001 From 612801d426e75ff997cfabda380dbe52c2cbc532 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 20 Feb 2015 10:25:11 +0000 Date: Fri, 20 Feb 2015 10:25:11 +0000
Subject: [PATCH] Ensure target gcc headers can be included Subject: [PATCH] Ensure target gcc headers can be included
...@@ -25,10 +25,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> ...@@ -25,10 +25,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
4 files changed, 22 insertions(+) 4 files changed, 22 insertions(+)
diff --git a/gcc/Makefile.in b/gcc/Makefile.in diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 59c45c81393..9b17d120aa1 100644 index a8277254696..07fa63b6640 100644
--- a/gcc/Makefile.in --- a/gcc/Makefile.in
+++ b/gcc/Makefile.in +++ b/gcc/Makefile.in
@@ -630,6 +630,7 @@ libexecdir = @libexecdir@ @@ -632,6 +632,7 @@ libexecdir = @libexecdir@
# Directory in which the compiler finds libraries etc. # Directory in which the compiler finds libraries etc.
libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix) libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
...@@ -36,7 +36,7 @@ index 59c45c81393..9b17d120aa1 100644 ...@@ -36,7 +36,7 @@ index 59c45c81393..9b17d120aa1 100644
# Directory in which the compiler finds executables # Directory in which the compiler finds executables
libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix) libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
# Directory in which all plugin resources are installed # Directory in which all plugin resources are installed
@@ -3016,6 +3017,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\" @@ -3024,6 +3025,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\"
PREPROCESSOR_DEFINES = \ PREPROCESSOR_DEFINES = \
-DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
...@@ -45,10 +45,10 @@ index 59c45c81393..9b17d120aa1 100644 ...@@ -45,10 +45,10 @@ index 59c45c81393..9b17d120aa1 100644
-DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \ -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
-DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \ -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
diff --git a/gcc/config/linux.h b/gcc/config/linux.h diff --git a/gcc/config/linux.h b/gcc/config/linux.h
index 87efc5f69fe..b525bcd56b3 100644 index 4ce173384ef..8a3cd4f2d34 100644
--- a/gcc/config/linux.h --- a/gcc/config/linux.h
+++ b/gcc/config/linux.h +++ b/gcc/config/linux.h
@@ -165,6 +165,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see @@ -170,6 +170,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define INCLUDE_DEFAULTS_MUSL_TOOL #define INCLUDE_DEFAULTS_MUSL_TOOL
#endif #endif
...@@ -62,7 +62,7 @@ index 87efc5f69fe..b525bcd56b3 100644 ...@@ -62,7 +62,7 @@ index 87efc5f69fe..b525bcd56b3 100644
#ifdef NATIVE_SYSTEM_HEADER_DIR #ifdef NATIVE_SYSTEM_HEADER_DIR
#define INCLUDE_DEFAULTS_MUSL_NATIVE \ #define INCLUDE_DEFAULTS_MUSL_NATIVE \
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
@@ -191,6 +198,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see @@ -196,6 +203,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
INCLUDE_DEFAULTS_MUSL_PREFIX \ INCLUDE_DEFAULTS_MUSL_PREFIX \
INCLUDE_DEFAULTS_MUSL_CROSS \ INCLUDE_DEFAULTS_MUSL_CROSS \
INCLUDE_DEFAULTS_MUSL_TOOL \ INCLUDE_DEFAULTS_MUSL_TOOL \
...@@ -71,10 +71,10 @@ index 87efc5f69fe..b525bcd56b3 100644 ...@@ -71,10 +71,10 @@ index 87efc5f69fe..b525bcd56b3 100644
{ GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
{ 0, 0, 0, 0, 0, 0 } \ { 0, 0, 0, 0, 0, 0 } \
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index 510abe169c5..0c2bba5ea32 100644 index a73954d9de5..e5dd6538358 100644
--- a/gcc/config/rs6000/sysv4.h --- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h +++ b/gcc/config/rs6000/sysv4.h
@@ -995,6 +995,13 @@ ncrtn.o%s" @@ -994,6 +994,13 @@ ncrtn.o%s"
#define INCLUDE_DEFAULTS_MUSL_TOOL #define INCLUDE_DEFAULTS_MUSL_TOOL
#endif #endif
...@@ -88,7 +88,7 @@ index 510abe169c5..0c2bba5ea32 100644 ...@@ -88,7 +88,7 @@ index 510abe169c5..0c2bba5ea32 100644
#ifdef NATIVE_SYSTEM_HEADER_DIR #ifdef NATIVE_SYSTEM_HEADER_DIR
#define INCLUDE_DEFAULTS_MUSL_NATIVE \ #define INCLUDE_DEFAULTS_MUSL_NATIVE \
{ NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \
@@ -1021,6 +1028,7 @@ ncrtn.o%s" @@ -1020,6 +1027,7 @@ ncrtn.o%s"
INCLUDE_DEFAULTS_MUSL_PREFIX \ INCLUDE_DEFAULTS_MUSL_PREFIX \
INCLUDE_DEFAULTS_MUSL_CROSS \ INCLUDE_DEFAULTS_MUSL_CROSS \
INCLUDE_DEFAULTS_MUSL_TOOL \ INCLUDE_DEFAULTS_MUSL_TOOL \
...@@ -97,7 +97,7 @@ index 510abe169c5..0c2bba5ea32 100644 ...@@ -97,7 +97,7 @@ index 510abe169c5..0c2bba5ea32 100644
{ GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \
{ 0, 0, 0, 0, 0, 0 } \ { 0, 0, 0, 0, 0, 0 } \
diff --git a/gcc/cppdefault.cc b/gcc/cppdefault.cc diff --git a/gcc/cppdefault.cc b/gcc/cppdefault.cc
index c503d14fc3f..d54d6ce0076 100644 index 7888300f277..52cf14e92f8 100644
--- a/gcc/cppdefault.cc --- a/gcc/cppdefault.cc
+++ b/gcc/cppdefault.cc +++ b/gcc/cppdefault.cc
@@ -64,6 +64,10 @@ const struct default_include cpp_include_defaults[] @@ -64,6 +64,10 @@ const struct default_include cpp_include_defaults[]
......
From cd09adb1e7f2a7e81a9f595a17c36f24911b90ac Mon Sep 17 00:00:00 2001 From 9ae49e7b88c208ab79ec9c2fc4a2fa8a3f1e85bb Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 3 Mar 2015 08:21:19 +0000 Date: Tue, 3 Mar 2015 08:21:19 +0000
Subject: [PATCH] Don't search host directory during "relink" if $inst_prefix Subject: [PATCH] Don't search host directory during "relink" if $inst_prefix
......
From 2cfc5ee38b3f5ec1d7965aae0991bcd48b5dc2e6 Mon Sep 17 00:00:00 2001 From bf918db7117f41d3c04162095641165ca241707d Mon Sep 17 00:00:00 2001
From: Robert Yang <liezhi.yang@windriver.com> From: Robert Yang <liezhi.yang@windriver.com>
Date: Sun, 5 Jul 2015 20:25:18 -0700 Date: Sun, 5 Jul 2015 20:25:18 -0700
Subject: [PATCH] libcc1: fix libcc1's install path and rpath Subject: [PATCH] libcc1: fix libcc1's install path and rpath
...@@ -20,7 +20,7 @@ Signed-off-by: Robert Yang <liezhi.yang@windriver.com> ...@@ -20,7 +20,7 @@ Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2 files changed, 4 insertions(+), 4 deletions(-) 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am
index f148fdd7aa2..0b6eb8f2855 100644 index 6e3a34ff7e2..3f3f6391aba 100644
--- a/libcc1/Makefile.am --- a/libcc1/Makefile.am
+++ b/libcc1/Makefile.am +++ b/libcc1/Makefile.am
@@ -40,8 +40,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \ @@ -40,8 +40,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
...@@ -35,10 +35,10 @@ index f148fdd7aa2..0b6eb8f2855 100644 ...@@ -35,10 +35,10 @@ index f148fdd7aa2..0b6eb8f2855 100644
if ENABLE_PLUGIN if ENABLE_PLUGIN
plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la
diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in
index 753d435c9cb..455627b0a3b 100644 index f8f590d71e9..56462492045 100644
--- a/libcc1/Makefile.in --- a/libcc1/Makefile.in
+++ b/libcc1/Makefile.in +++ b/libcc1/Makefile.in
@@ -398,8 +398,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \ @@ -396,8 +396,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
$(Wc)$(libiberty_normal))) $(Wc)$(libiberty_normal)))
libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty)) libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
......
From 354682ad8f71f62643dcd83f64b51b5979615a0c Mon Sep 17 00:00:00 2001 From 4fbbd40d7db89cdbeaf93df1e1da692b1f80a5bc Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 7 Dec 2015 23:39:54 +0000 Date: Mon, 7 Dec 2015 23:39:54 +0000
Subject: [PATCH] handle sysroot support for nativesdk-gcc Subject: [PATCH] handle sysroot support for nativesdk-gcc
...@@ -34,7 +34,6 @@ if the executable is moved. (These paths were missed in the original ...@@ -34,7 +34,6 @@ if the executable is moved. (These paths were missed in the original
implementation.) implementation.)
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Bernhard Rosenkränzer <bernhard.rosenkraenzer.ext@huawei.com> [ported to gcc 12]
--- ---
gcc/c-family/c-opts.cc | 4 +-- gcc/c-family/c-opts.cc | 4 +--
gcc/config/linux.h | 24 +++++++-------- gcc/config/linux.h | 24 +++++++--------
...@@ -47,10 +46,10 @@ Signed-off-by: Bernhard Rosenkränzer <bernhard.rosenkraenzer.ext@huawei.com> [p ...@@ -47,10 +46,10 @@ Signed-off-by: Bernhard Rosenkränzer <bernhard.rosenkraenzer.ext@huawei.com> [p
8 files changed, 94 insertions(+), 72 deletions(-) 8 files changed, 94 insertions(+), 72 deletions(-)
diff --git a/gcc/c-family/c-opts.cc b/gcc/c-family/c-opts.cc diff --git a/gcc/c-family/c-opts.cc b/gcc/c-family/c-opts.cc
index 89e05a4c551..5577383665d 100644 index a341a061758..83b0bef4dbb 100644
--- a/gcc/c-family/c-opts.cc --- a/gcc/c-family/c-opts.cc
+++ b/gcc/c-family/c-opts.cc +++ b/gcc/c-family/c-opts.cc
@@ -1436,8 +1436,8 @@ add_prefixed_path (const char *suffix, incpath_kind chain) @@ -1458,8 +1458,8 @@ add_prefixed_path (const char *suffix, incpath_kind chain)
size_t prefix_len, suffix_len; size_t prefix_len, suffix_len;
suffix_len = strlen (suffix); suffix_len = strlen (suffix);
...@@ -62,11 +61,11 @@ index 89e05a4c551..5577383665d 100644 ...@@ -62,11 +61,11 @@ index 89e05a4c551..5577383665d 100644
path = (char *) xmalloc (prefix_len + suffix_len + 1); path = (char *) xmalloc (prefix_len + suffix_len + 1);
memcpy (path, prefix, prefix_len); memcpy (path, prefix, prefix_len);
diff --git a/gcc/config/linux.h b/gcc/config/linux.h diff --git a/gcc/config/linux.h b/gcc/config/linux.h
index b525bcd56b3..ba02c013e30 100644 index 8a3cd4f2d34..58143dff731 100644
--- a/gcc/config/linux.h --- a/gcc/config/linux.h
+++ b/gcc/config/linux.h +++ b/gcc/config/linux.h
@@ -129,53 +129,53 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see @@ -134,53 +134,53 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
* Unfortunately, this is mostly duplicated from cppdefault.c */ * Unfortunately, this is mostly duplicated from cppdefault.cc */
#if DEFAULT_LIBC == LIBC_MUSL #if DEFAULT_LIBC == LIBC_MUSL
#define INCLUDE_DEFAULTS_MUSL_GPP \ #define INCLUDE_DEFAULTS_MUSL_GPP \
- { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ - { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \
...@@ -130,7 +129,7 @@ index b525bcd56b3..ba02c013e30 100644 ...@@ -130,7 +129,7 @@ index b525bcd56b3..ba02c013e30 100644
#else #else
#define INCLUDE_DEFAULTS_MUSL_NATIVE #define INCLUDE_DEFAULTS_MUSL_NATIVE
#endif #endif
@@ -200,7 +200,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see @@ -205,7 +205,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
INCLUDE_DEFAULTS_MUSL_TOOL \ INCLUDE_DEFAULTS_MUSL_TOOL \
INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \ INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \
INCLUDE_DEFAULTS_MUSL_NATIVE \ INCLUDE_DEFAULTS_MUSL_NATIVE \
...@@ -140,10 +139,10 @@ index b525bcd56b3..ba02c013e30 100644 ...@@ -140,10 +139,10 @@ index b525bcd56b3..ba02c013e30 100644
} }
#endif #endif
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index 0c2bba5ea32..313a8de4417 100644 index e5dd6538358..b496849b792 100644
--- a/gcc/config/rs6000/sysv4.h --- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h +++ b/gcc/config/rs6000/sysv4.h
@@ -959,53 +959,53 @@ ncrtn.o%s" @@ -958,53 +958,53 @@ ncrtn.o%s"
/* Include order changes for musl, same as in generic linux.h. */ /* Include order changes for musl, same as in generic linux.h. */
#if DEFAULT_LIBC == LIBC_MUSL #if DEFAULT_LIBC == LIBC_MUSL
#define INCLUDE_DEFAULTS_MUSL_GPP \ #define INCLUDE_DEFAULTS_MUSL_GPP \
...@@ -208,7 +207,7 @@ index 0c2bba5ea32..313a8de4417 100644 ...@@ -208,7 +207,7 @@ index 0c2bba5ea32..313a8de4417 100644
#else #else
#define INCLUDE_DEFAULTS_MUSL_NATIVE #define INCLUDE_DEFAULTS_MUSL_NATIVE
#endif #endif
@@ -1030,7 +1030,7 @@ ncrtn.o%s" @@ -1029,7 +1029,7 @@ ncrtn.o%s"
INCLUDE_DEFAULTS_MUSL_TOOL \ INCLUDE_DEFAULTS_MUSL_TOOL \
INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \ INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \
INCLUDE_DEFAULTS_MUSL_NATIVE \ INCLUDE_DEFAULTS_MUSL_NATIVE \
...@@ -218,7 +217,7 @@ index 0c2bba5ea32..313a8de4417 100644 ...@@ -218,7 +217,7 @@ index 0c2bba5ea32..313a8de4417 100644
} }
#endif #endif
diff --git a/gcc/cppdefault.cc b/gcc/cppdefault.cc diff --git a/gcc/cppdefault.cc b/gcc/cppdefault.cc
index d54d6ce0076..784a92a0c24 100644 index 52cf14e92f8..d8977afc05e 100644
--- a/gcc/cppdefault.cc --- a/gcc/cppdefault.cc
+++ b/gcc/cppdefault.cc +++ b/gcc/cppdefault.cc
@@ -35,6 +35,30 @@ @@ -35,6 +35,30 @@
...@@ -344,7 +343,7 @@ index d54d6ce0076..784a92a0c24 100644 ...@@ -344,7 +343,7 @@ index d54d6ce0076..784a92a0c24 100644
/* This value is set by cpp_relocated at runtime */ /* This value is set by cpp_relocated at runtime */
const char *gcc_exec_prefix; const char *gcc_exec_prefix;
diff --git a/gcc/cppdefault.h b/gcc/cppdefault.h diff --git a/gcc/cppdefault.h b/gcc/cppdefault.h
index fd3c655db1c..20669ac427d 100644 index fb97c0b5814..6267150facc 100644
--- a/gcc/cppdefault.h --- a/gcc/cppdefault.h
+++ b/gcc/cppdefault.h +++ b/gcc/cppdefault.h
@@ -33,7 +33,8 @@ @@ -33,7 +33,8 @@
...@@ -355,7 +354,7 @@ index fd3c655db1c..20669ac427d 100644 ...@@ -355,7 +354,7 @@ index fd3c655db1c..20669ac427d 100644
+ const char *fname; /* The name of the directory. */ + const char *fname; /* The name of the directory. */
+ +
const char *const component; /* The component containing the directory const char *const component; /* The component containing the directory
(see update_path in prefix.c) */ (see update_path in prefix.cc) */
const char cplusplus; /* When this is non-zero, we should only const char cplusplus; /* When this is non-zero, we should only
@@ -55,17 +56,13 @@ struct default_include @@ -55,17 +56,13 @@ struct default_include
}; };
...@@ -379,7 +378,7 @@ index fd3c655db1c..20669ac427d 100644 ...@@ -379,7 +378,7 @@ index fd3c655db1c..20669ac427d 100644
subdirectory of the actual installation. */ subdirectory of the actual installation. */
extern const char *gcc_exec_prefix; extern const char *gcc_exec_prefix;
diff --git a/gcc/gcc.cc b/gcc/gcc.cc diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index 8737bae5353..aa6fbe43965 100644 index aa4cf92fb78..5569a39a14a 100644
--- a/gcc/gcc.cc --- a/gcc/gcc.cc
+++ b/gcc/gcc.cc +++ b/gcc/gcc.cc
@@ -252,6 +252,8 @@ FILE *report_times_to_file = NULL; @@ -252,6 +252,8 @@ FILE *report_times_to_file = NULL;
...@@ -391,7 +390,7 @@ index 8737bae5353..aa6fbe43965 100644 ...@@ -391,7 +390,7 @@ index 8737bae5353..aa6fbe43965 100644
/* Nonzero means pass the updated target_system_root to the compiler. */ /* Nonzero means pass the updated target_system_root to the compiler. */
static int target_system_root_changed; static int target_system_root_changed;
@@ -568,6 +570,7 @@ or with constant text in a single argument. @@ -575,6 +577,7 @@ or with constant text in a single argument.
%G process LIBGCC_SPEC as a spec. %G process LIBGCC_SPEC as a spec.
%R Output the concatenation of target_system_root and %R Output the concatenation of target_system_root and
target_sysroot_suffix. target_sysroot_suffix.
...@@ -399,7 +398,7 @@ index 8737bae5353..aa6fbe43965 100644 ...@@ -399,7 +398,7 @@ index 8737bae5353..aa6fbe43965 100644
%S process STARTFILE_SPEC as a spec. A capital S is actually used here. %S process STARTFILE_SPEC as a spec. A capital S is actually used here.
%E process ENDFILE_SPEC as a spec. A capital E is actually used here. %E process ENDFILE_SPEC as a spec. A capital E is actually used here.
%C process CPP_SPEC as a spec. %C process CPP_SPEC as a spec.
@@ -1621,10 +1624,10 @@ static const char *gcc_libexec_prefix; @@ -1627,10 +1630,10 @@ static const char *gcc_libexec_prefix;
gcc_exec_prefix is set because, in that case, we know where the gcc_exec_prefix is set because, in that case, we know where the
compiler has been installed, and use paths relative to that compiler has been installed, and use paths relative to that
location instead. */ location instead. */
...@@ -414,7 +413,7 @@ index 8737bae5353..aa6fbe43965 100644 ...@@ -414,7 +413,7 @@ index 8737bae5353..aa6fbe43965 100644
/* For native compilers, these are well-known paths containing /* For native compilers, these are well-known paths containing
components that may be provided by the system. For cross components that may be provided by the system. For cross
@@ -1632,9 +1635,9 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; @@ -1638,9 +1641,9 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
static const char *md_exec_prefix = MD_EXEC_PREFIX; static const char *md_exec_prefix = MD_EXEC_PREFIX;
static const char *md_startfile_prefix = MD_STARTFILE_PREFIX; static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1; static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
...@@ -426,7 +425,7 @@ index 8737bae5353..aa6fbe43965 100644 ...@@ -426,7 +425,7 @@ index 8737bae5353..aa6fbe43965 100644
= STANDARD_STARTFILE_PREFIX_2; = STANDARD_STARTFILE_PREFIX_2;
/* A relative path to be used in finding the location of tools /* A relative path to be used in finding the location of tools
@@ -6564,6 +6567,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) @@ -6676,6 +6679,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
} }
break; break;
...@@ -439,10 +438,10 @@ index 8737bae5353..aa6fbe43965 100644 ...@@ -439,10 +438,10 @@ index 8737bae5353..aa6fbe43965 100644
value = do_spec_1 (startfile_spec, 0, NULL); value = do_spec_1 (startfile_spec, 0, NULL);
if (value != 0) if (value != 0)
diff --git a/gcc/incpath.cc b/gcc/incpath.cc diff --git a/gcc/incpath.cc b/gcc/incpath.cc
index fbfc0ce03b8..a82e543428b 100644 index c80f100f476..5ac03c08693 100644
--- a/gcc/incpath.cc --- a/gcc/incpath.cc
+++ b/gcc/incpath.cc +++ b/gcc/incpath.cc
@@ -131,7 +131,7 @@ add_standard_paths (const char *sysroot, const char *iprefix, @@ -135,7 +135,7 @@ add_standard_paths (const char *sysroot, const char *iprefix,
int relocated = cpp_relocated (); int relocated = cpp_relocated ();
size_t len; size_t len;
...@@ -451,7 +450,7 @@ index fbfc0ce03b8..a82e543428b 100644 ...@@ -451,7 +450,7 @@ index fbfc0ce03b8..a82e543428b 100644
{ {
/* Look for directories that start with the standard prefix. /* Look for directories that start with the standard prefix.
"Translate" them, i.e. replace /usr/local/lib/gcc... with "Translate" them, i.e. replace /usr/local/lib/gcc... with
@@ -146,7 +146,7 @@ add_standard_paths (const char *sysroot, const char *iprefix, @@ -150,7 +150,7 @@ add_standard_paths (const char *sysroot, const char *iprefix,
now. */ now. */
if (sysroot && p->add_sysroot) if (sysroot && p->add_sysroot)
continue; continue;
...@@ -460,7 +459,7 @@ index fbfc0ce03b8..a82e543428b 100644 ...@@ -460,7 +459,7 @@ index fbfc0ce03b8..a82e543428b 100644
{ {
char *str = concat (iprefix, p->fname + len, NULL); char *str = concat (iprefix, p->fname + len, NULL);
if (p->multilib == 1 && imultilib) if (p->multilib == 1 && imultilib)
@@ -187,7 +187,7 @@ add_standard_paths (const char *sysroot, const char *iprefix, @@ -191,7 +191,7 @@ add_standard_paths (const char *sysroot, const char *iprefix,
free (sysroot_no_trailing_dir_separator); free (sysroot_no_trailing_dir_separator);
} }
else if (!p->add_sysroot && relocated else if (!p->add_sysroot && relocated
...@@ -469,7 +468,7 @@ index fbfc0ce03b8..a82e543428b 100644 ...@@ -469,7 +468,7 @@ index fbfc0ce03b8..a82e543428b 100644
{ {
static const char *relocated_prefix; static const char *relocated_prefix;
char *ostr; char *ostr;
@@ -204,12 +204,12 @@ add_standard_paths (const char *sysroot, const char *iprefix, @@ -208,12 +208,12 @@ add_standard_paths (const char *sysroot, const char *iprefix,
dummy = concat (gcc_exec_prefix, "dummy", NULL); dummy = concat (gcc_exec_prefix, "dummy", NULL);
relocated_prefix relocated_prefix
= make_relative_prefix (dummy, = make_relative_prefix (dummy,
...@@ -486,7 +485,7 @@ index fbfc0ce03b8..a82e543428b 100644 ...@@ -486,7 +485,7 @@ index fbfc0ce03b8..a82e543428b 100644
str = update_path (ostr, p->component); str = update_path (ostr, p->component);
free (ostr); free (ostr);
diff --git a/gcc/prefix.cc b/gcc/prefix.cc diff --git a/gcc/prefix.cc b/gcc/prefix.cc
index 747c09de638..f728638dc65 100644 index 096ed5afa3d..2526f0ecc39 100644
--- a/gcc/prefix.cc --- a/gcc/prefix.cc
+++ b/gcc/prefix.cc +++ b/gcc/prefix.cc
@@ -72,7 +72,9 @@ License along with GCC; see the file COPYING3. If not see @@ -72,7 +72,9 @@ License along with GCC; see the file COPYING3. If not see
......
From c55e24459370ad96577496ecd87475e3a9de7dad Mon Sep 17 00:00:00 2001 From 33a1f07a4417247dc24819d4e583ca09f56d5a7b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 7 Dec 2015 23:41:45 +0000 Date: Mon, 7 Dec 2015 23:41:45 +0000
Subject: [PATCH] Search target sysroot gcc version specific dirs with Subject: [PATCH] Search target sysroot gcc version specific dirs with
...@@ -46,16 +46,15 @@ Upstream-Status: Pending ...@@ -46,16 +46,15 @@ Upstream-Status: Pending
RP 2015/7/31 RP 2015/7/31
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bernhard Rosenkränzer <bernhard.rosenkraenzer.ext@huawei.com> [ported to gcc 12]
--- ---
gcc/gcc.cc | 29 ++++++++++++++++++++++++++++- gcc/gcc.cc | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-) 1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/gcc/gcc.cc b/gcc/gcc.cc diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index aa6fbe43965..f8a71a13826 100644 index 5569a39a14a..4598f6cd7c9 100644
--- a/gcc/gcc.cc --- a/gcc/gcc.cc
+++ b/gcc/gcc.cc +++ b/gcc/gcc.cc
@@ -2811,7 +2811,7 @@ for_each_path (const struct path_prefix *paths, @@ -2817,7 +2817,7 @@ for_each_path (const struct path_prefix *paths,
if (path == NULL) if (path == NULL)
{ {
len = paths->max_len + extra_space + 1; len = paths->max_len + extra_space + 1;
...@@ -64,7 +63,7 @@ index aa6fbe43965..f8a71a13826 100644 ...@@ -64,7 +63,7 @@ index aa6fbe43965..f8a71a13826 100644
path = XNEWVEC (char, len); path = XNEWVEC (char, len);
} }
@@ -2823,6 +2823,33 @@ for_each_path (const struct path_prefix *paths, @@ -2829,6 +2829,33 @@ for_each_path (const struct path_prefix *paths,
/* Look first in MACHINE/VERSION subdirectory. */ /* Look first in MACHINE/VERSION subdirectory. */
if (!skip_multi_dir) if (!skip_multi_dir)
{ {
......
From 745a2ac7825c73102b888226c54397d21512f86b Mon Sep 17 00:00:00 2001 From d7dc2861840e88a4592817a398a054a886c3f3ee Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 27 Jun 2017 18:10:54 -0700 Date: Tue, 27 Jun 2017 18:10:54 -0700
Subject: [PATCH] Add ssp_nonshared to link commandline for musl targets Subject: [PATCH] Add ssp_nonshared to link commandline for musl targets
...@@ -22,9 +22,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> ...@@ -22,9 +22,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
gcc/config/rs6000/linux64.h | 10 ++++++++++ gcc/config/rs6000/linux64.h | 10 ++++++++++
3 files changed, 27 insertions(+) 3 files changed, 27 insertions(+)
diff --git a/gcc/config/linux.h b/gcc/config/linux.h
index 58143dff731..d2409ccac26 100644
--- a/gcc/config/linux.h --- a/gcc/config/linux.h
+++ b/gcc/config/linux.h +++ b/gcc/config/linux.h
@@ -203,6 +203,13 @@ see the files COPYING3 and COPYING.RUNTI @@ -208,6 +208,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
{ GCC_INCLUDE_DIRVAR, "GCC", 0, 1, 0, 0 }, \ { GCC_INCLUDE_DIRVAR, "GCC", 0, 1, 0, 0 }, \
{ 0, 0, 0, 0, 0, 0 } \ { 0, 0, 0, 0, 0, 0 } \
} }
...@@ -38,9 +40,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> ...@@ -38,9 +40,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#endif #endif
#if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */ #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */
diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h
index 8c9039ac1e5..259cd485973 100644
--- a/gcc/config/rs6000/linux.h --- a/gcc/config/rs6000/linux.h
+++ b/gcc/config/rs6000/linux.h +++ b/gcc/config/rs6000/linux.h
@@ -94,6 +94,16 @@ @@ -99,6 +99,16 @@
" -m elf32ppclinux") " -m elf32ppclinux")
#endif #endif
...@@ -57,9 +61,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> ...@@ -57,9 +61,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
#undef LINK_OS_LINUX_SPEC #undef LINK_OS_LINUX_SPEC
#define LINK_OS_LINUX_SPEC LINK_OS_LINUX_EMUL " %{!shared: %{!static: \ #define LINK_OS_LINUX_SPEC LINK_OS_LINUX_EMUL " %{!shared: %{!static: \
%{!static-pie: \ %{!static-pie: \
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
index 364c1a5b155..e33d9ae98e0 100644
--- a/gcc/config/rs6000/linux64.h --- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h +++ b/gcc/config/rs6000/linux64.h
@@ -369,6 +369,16 @@ extern int dot_symbols; @@ -372,6 +372,16 @@ extern int dot_symbols;
" -m elf64ppc") " -m elf64ppc")
#endif #endif
......
From 0b900d6410b7c1938e86eceb87b032fd538566a9 Mon Sep 17 00:00:00 2001 From bf0d7c463e1fab62804556099b56319fe94be1eb Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 6 Jun 2018 12:10:22 -0700 Date: Wed, 6 Jun 2018 12:10:22 -0700
Subject: [PATCH] Re-introduce spe commandline options Subject: [PATCH] Re-introduce spe commandline options
...@@ -14,10 +14,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> ...@@ -14,10 +14,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 13 insertions(+) 1 file changed, 13 insertions(+)
diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
index 0dbdf753673..b273eb65c35 100644 index 4931d781c4e..3fb87b6f7d5 100644
--- a/gcc/config/rs6000/rs6000.opt --- a/gcc/config/rs6000/rs6000.opt
+++ b/gcc/config/rs6000/rs6000.opt +++ b/gcc/config/rs6000/rs6000.opt
@@ -352,6 +352,19 @@ mdebug= @@ -348,6 +348,19 @@ mdebug=
Target RejectNegative Joined Target RejectNegative Joined
-mdebug= Enable debug output. -mdebug= Enable debug output.
......
From ea9154338cb3acbd75945fddde4202e73c20dd1a Mon Sep 17 00:00:00 2001 From a32c75b37209d6836eaaa943dc6b1207acba5d27 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net> From: Szabolcs Nagy <nsz@port70.net>
Date: Sat, 24 Oct 2015 20:09:53 +0000 Date: Sat, 24 Oct 2015 20:09:53 +0000
Subject: [PATCH] libgcc_s: Use alias for __cpu_indicator_init instead of Subject: [PATCH] libgcc_s: Use alias for __cpu_indicator_init instead of
...@@ -32,7 +32,6 @@ gcc/Changelog: ...@@ -32,7 +32,6 @@ gcc/Changelog:
Upstream-Status: Pending Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bernhard Rosenkränzer <bernhard.rosenkraenzer.ext@huawei.com> [ported to gcc 12]
--- ---
gcc/config/i386/i386-expand.cc | 4 ++-- gcc/config/i386/i386-expand.cc | 4 ++--
libgcc/config/i386/cpuinfo.c | 6 +++--- libgcc/config/i386/cpuinfo.c | 6 +++---
...@@ -40,10 +39,10 @@ Signed-off-by: Bernhard Rosenkränzer <bernhard.rosenkraenzer.ext@huawei.com> [p ...@@ -40,10 +39,10 @@ Signed-off-by: Bernhard Rosenkränzer <bernhard.rosenkraenzer.ext@huawei.com> [p
3 files changed, 6 insertions(+), 6 deletions(-) 3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc
index ac69eed4d32..ffaa44a16fc 100644 index 68978ef8dc2..0c71f36b572 100644
--- a/gcc/config/i386/i386-expand.cc --- a/gcc/config/i386/i386-expand.cc
+++ b/gcc/config/i386/i386-expand.cc +++ b/gcc/config/i386/i386-expand.cc
@@ -12338,10 +12338,10 @@ ix86_expand_builtin (tree exp, rtx targe @@ -12321,10 +12321,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
{ {
case IX86_BUILTIN_CPU_INIT: case IX86_BUILTIN_CPU_INIT:
{ {
...@@ -57,7 +56,7 @@ index ac69eed4d32..ffaa44a16fc 100644 ...@@ -57,7 +56,7 @@ index ac69eed4d32..ffaa44a16fc 100644
return expand_expr (call_expr, target, mode, EXPAND_NORMAL); return expand_expr (call_expr, target, mode, EXPAND_NORMAL);
} }
diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c
index ef463848f9d..1a3de052c80 100644 index dab1d98060f..cf824b4114a 100644
--- a/libgcc/config/i386/cpuinfo.c --- a/libgcc/config/i386/cpuinfo.c
+++ b/libgcc/config/i386/cpuinfo.c +++ b/libgcc/config/i386/cpuinfo.c
@@ -63,7 +63,7 @@ __cpu_indicator_init (void) @@ -63,7 +63,7 @@ __cpu_indicator_init (void)
......
From 520411cf364ee4b0b5a8f0857498aaabd790afb3 Mon Sep 17 00:00:00 2001 From 4efc42b99c96b026f560b0918de7e237ac3dc8d1 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org> From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Tue, 10 Mar 2020 08:26:53 -0700 Date: Tue, 10 Mar 2020 08:26:53 -0700
Subject: [PATCH] gentypes/genmodes: Do not use __LINE__ for maintaining Subject: [PATCH] gentypes/genmodes: Do not use __LINE__ for maintaining
...@@ -11,7 +11,6 @@ Upstream-Status: Inappropriate [OE Reproducibility specific] ...@@ -11,7 +11,6 @@ Upstream-Status: Inappropriate [OE Reproducibility specific]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bernhard Rosenkränzer <bernhard.rosenkraenzer.ext@huawei.com> [ported to gcc 12]
--- ---
gcc/gengtype.cc | 6 +++--- gcc/gengtype.cc | 6 +++---
gcc/genmodes.cc | 32 ++++++++++++++++---------------- gcc/genmodes.cc | 32 ++++++++++++++++----------------
......
From 96d895c8d5dc895d24fe37aa2b4f201a2566b4cc Mon Sep 17 00:00:00 2001 From 061cf79e7b6e89fdf0f2630ddaebbf1d7b271ac3 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 12 May 2020 10:39:09 -0700 Date: Tue, 12 May 2020 10:39:09 -0700
Subject: [PATCH] mingw32: Enable operation_not_supported Subject: [PATCH] mingw32: Enable operation_not_supported
...@@ -12,7 +12,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> ...@@ -12,7 +12,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libstdc++-v3/config/os/mingw32/error_constants.h b/libstdc++-v3/config/os/mingw32/error_constants.h diff --git a/libstdc++-v3/config/os/mingw32/error_constants.h b/libstdc++-v3/config/os/mingw32/error_constants.h
index eca06a97014..933cfab49cf 100644 index da5f4c2ac85..e855c86267c 100644
--- a/libstdc++-v3/config/os/mingw32/error_constants.h --- a/libstdc++-v3/config/os/mingw32/error_constants.h
+++ b/libstdc++-v3/config/os/mingw32/error_constants.h +++ b/libstdc++-v3/config/os/mingw32/error_constants.h
@@ -107,7 +107,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION @@ -107,7 +107,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
......
From 36d4fdbc99e69f9d70a29e2bada40cc3c1534557 Mon Sep 17 00:00:00 2001 From 52931ec7a708b58d68e69ce9eb99001ae9f099dd Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com> From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 13 May 2020 15:10:38 -0700 Date: Wed, 13 May 2020 15:10:38 -0700
Subject: [PATCH] libatomic: Do not enforce march on aarch64 Subject: [PATCH] libatomic: Do not enforce march on aarch64
...@@ -17,7 +17,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> ...@@ -17,7 +17,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 2 deletions(-) 2 files changed, 2 deletions(-)
diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am
index 0f3cd6f7121..c8124c1d5aa 100644 index d88515e4a03..e0e2f8b442a 100644
--- a/libatomic/Makefile.am --- a/libatomic/Makefile.am
+++ b/libatomic/Makefile.am +++ b/libatomic/Makefile.am
@@ -125,7 +125,6 @@ libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix _$(s)_.lo,$(SIZEOBJS))) @@ -125,7 +125,6 @@ libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix _$(s)_.lo,$(SIZEOBJS)))
...@@ -29,14 +29,14 @@ index 0f3cd6f7121..c8124c1d5aa 100644 ...@@ -29,14 +29,14 @@ index 0f3cd6f7121..c8124c1d5aa 100644
endif endif
if ARCH_ARM_LINUX if ARCH_ARM_LINUX
diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in
index 0a51bd55f01..6d5b1581706 100644 index 80d25653dc7..7377689ab34 100644
--- a/libatomic/Makefile.in --- a/libatomic/Makefile.in
+++ b/libatomic/Makefile.in +++ b/libatomic/Makefile.in
@@ -432,7 +432,6 @@ M_SRC = $(firstword $(filter %/$(M_FILE), $(all_c_files))) @@ -434,7 +434,6 @@ M_SRC = $(firstword $(filter %/$(M_FILE), $(all_c_files)))
libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix \ libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix \
_$(s)_.lo,$(SIZEOBJS))) $(am__append_1) $(am__append_2) \ _$(s)_.lo,$(SIZEOBJS))) $(am__append_1) $(am__append_2) \
$(am__append_3) $(am__append_4) $(am__append_3) $(am__append_4)
-@ARCH_AARCH64_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv8-a+lse -@ARCH_AARCH64_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv8-a+lse
@ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv7-a+fp -DHAVE_KERNEL64 @ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv7-a+fp -DHAVE_KERNEL64
@ARCH_I386_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=i586 @ARCH_I386_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=i586
@ARCH_X86_64_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -mcx16 @ARCH_X86_64_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -mcx16 -mcx16
From 58211c7ceb0510b2a11a7f1da3c7fa968c658749 Mon Sep 17 00:00:00 2001 From 3e67c9c77e46132c252911bf1e5e4222dfd3aa34 Mon Sep 17 00:00:00 2001
From: Andrei Gherzan <andrei.gherzan@huawei.com> From: Andrei Gherzan <andrei.gherzan@huawei.com>
Date: Wed, 22 Dec 2021 12:49:25 +0100 Date: Wed, 22 Dec 2021 12:49:25 +0100
Subject: [PATCH] Fix install path of linux64.h Subject: [PATCH] Fix install path of linux64.h
...@@ -11,15 +11,16 @@ adapts the install path of linux64.h to match the include in tm.h. ...@@ -11,15 +11,16 @@ adapts the install path of linux64.h to match the include in tm.h.
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Upstream-Status: Inappropriate [configuration] Upstream-Status: Inappropriate [configuration]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- ---
gcc/Makefile.in | 2 ++ gcc/Makefile.in | 2 ++
1 file changed, 2 insertions(+) 1 file changed, 2 insertions(+)
diff --git a/gcc/Makefile.in b/gcc/Makefile.in diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 9b17d120a..d175ec4e3 100644 index 07fa63b6640..0def7394454 100644
--- a/gcc/Makefile.in --- a/gcc/Makefile.in
+++ b/gcc/Makefile.in +++ b/gcc/Makefile.in
@@ -3693,6 +3693,8 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype @@ -3706,6 +3706,8 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
"$(srcdir)"/config/* | "$(srcdir)"/common/config/* \ "$(srcdir)"/config/* | "$(srcdir)"/common/config/* \
| "$(srcdir)"/c-family/* | "$(srcdir)"/*.def ) \ | "$(srcdir)"/c-family/* | "$(srcdir)"/*.def ) \
base=`echo "$$path" | sed -e "s|$$srcdirstrip/||"`;; \ base=`echo "$$path" | sed -e "s|$$srcdirstrip/||"`;; \
...@@ -28,6 +29,3 @@ index 9b17d120a..d175ec4e3 100644 ...@@ -28,6 +29,3 @@ index 9b17d120a..d175ec4e3 100644
*) base=`basename $$path` ;; \ *) base=`basename $$path` ;; \
esac; \ esac; \
dest=$(plugin_includedir)/$$base; \ dest=$(plugin_includedir)/$$base; \
--
2.25.1
From 7422adfb471f4b4f2ec870124064632d55f72e50 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 11 Apr 2022 15:46:18 -0700
Subject: [PATCH] Move sched.h include ahead of user headers
Fix attempt to use poisoned calloc error, this moves the sched.h before
using system.h from gcc headers which includes #pragma GCC poison calloc
Fixes
In file included from /mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/gcc/12.0.1-r0/recipe-sysroot/usr/include/pthread.h:30,
from /mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/gcc/12.0.1-r0/recipe-sysroot/usr/include/c++/12.0.1/aarch64-yoe-linux-musl/bits/gthr-default.h:35,
from /mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/gcc/12.0.1-r0/recipe-sysroot/usr/include/c++/12.0.1/aarch64-yoe-linux-musl/bits/gthr.h:148,
from /mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/gcc/12.0.1-r0/recipe-sysroot/usr/include/c++/12.0.1/ext/atomicity.h:35,
from /mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/gcc/12.0.1-r0/recipe-sysroot/usr/include/c++/12.0.1/bits/shared_ptr_base.h:61,
from /mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/gcc/12.0.1-r0/recipe-sysroot/usr/include/c++/12.0.1/bits/shared_ptr.h:53,
from /mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/gcc/12.0.1-r0/recipe-sysroot/usr/include/c++/12.0.1/memory:77,
from ../../../../../../../work-shared/gcc-12.0.1-r0/gcc-12-20220410/libcc1/deleter.hh:23,
from ../../../../../../../work-shared/gcc-12.0.1-r0/gcc-12-20220410/libcc1/rpc.hh:25,
from ../../../../../../../work-shared/gcc-12.0.1-r0/gcc-12-20220410/libcc1/libcc1plugin.cc:67:
/mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/gcc/12.0.1-r0/recipe-sysroot/usr/include/sched.h:84:7: error: attempt to use poisoned "calloc"
84 | void *calloc(size_t, size_t);
| ^
/mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/gcc/12.0.1-r0/recipe-sysroot/usr/include/sched.h:124:36: error: attempt to use poisoned "calloc"
124 | #define CPU_ALLOC(n) ((cpu_set_t *)calloc(1,CPU_ALLOC_SIZE(n)))
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
libcc1/libcc1plugin.cc | 1 +
libcc1/libcp1plugin.cc | 1 +
2 files changed, 2 insertions(+)
diff --git a/libcc1/libcc1plugin.cc b/libcc1/libcc1plugin.cc
index 12ab5a57c8d..fff9bfab18b 100644
--- a/libcc1/libcc1plugin.cc
+++ b/libcc1/libcc1plugin.cc
@@ -17,6 +17,7 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#include <sched.h>
#include <cc1plugin-config.h>
#undef PACKAGE_NAME
diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc
index 83dab7f58b1..0b83ce7a09d 100644
--- a/libcc1/libcp1plugin.cc
+++ b/libcc1/libcp1plugin.cc
@@ -18,6 +18,7 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#include <sched.h>
#include <cc1plugin-config.h>
#undef PACKAGE_NAME
From 9234cdca6ee88badfc00297e72f13dac4e540c79 Mon Sep 17 00:00:00 2001
From: Nick Clifton <nickc@redhat.com>
Date: Fri, 1 Jul 2022 15:58:52 +0100
Subject: [PATCH] Add a recursion limit to the demangle_const function in the
Rust demangler.
libiberty/
PR demangler/105039
* rust-demangle.c (demangle_const): Add recursion limit.
Upstream-Status: Backport [https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=9234cdca6ee88badfc00297e72f13dac4e540c79]
---
libiberty/rust-demangle.c | 29 ++++++++++++++++++++---------
1 file changed, 20 insertions(+), 9 deletions(-)
diff --git a/libiberty/rust-demangle.c b/libiberty/rust-demangle.c
index bb58d900e27..36afcfae278 100644
--- a/libiberty/rust-demangle.c
+++ b/libiberty/rust-demangle.c
@@ -126,7 +126,7 @@ parse_integer_62 (struct rust_demangler *rdm)
return 0;
x = 0;
- while (!eat (rdm, '_'))
+ while (!eat (rdm, '_') && !rdm->errored)
{
c = next (rdm);
x *= 62;
@@ -1148,6 +1148,15 @@ demangle_const (struct rust_demangler *rdm)
if (rdm->errored)
return;
+ if (rdm->recursion != RUST_NO_RECURSION_LIMIT)
+ {
+ ++ rdm->recursion;
+ if (rdm->recursion > RUST_MAX_RECURSION_COUNT)
+ /* FIXME: There ought to be a way to report
+ that the recursion limit has been reached. */
+ goto fail_return;
+ }
+
if (eat (rdm, 'B'))
{
backref = parse_integer_62 (rdm);
@@ -1158,7 +1167,7 @@ demangle_const (struct rust_demangler *rdm)
demangle_const (rdm);
rdm->next = old_next;
}
- return;
+ goto pass_return;
}
ty_tag = next (rdm);
@@ -1167,7 +1176,7 @@ demangle_const (struct rust_demangler *rdm)
/* Placeholder. */
case 'p':
PRINT ("_");
- return;
+ goto pass_return;
/* Unsigned integer types. */
case 'h':
@@ -1200,18 +1209,20 @@ demangle_const (struct rust_demangler *rdm)
break;
default:
- rdm->errored = 1;
- return;
+ goto fail_return;
}
- if (rdm->errored)
- return;
-
- if (rdm->verbose)
+ if (!rdm->errored && rdm->verbose)
{
PRINT (": ");
PRINT (basic_type (ty_tag));
}
+
+ fail_return:
+ rdm->errored = 1;
+ pass_return:
+ if (rdm->recursion != RUST_NO_RECURSION_LIMIT)
+ -- rdm->recursion;
}
static void
--
2.31.1
Avoid encoding build paths into sources used for floating point on powerpc.
(MACHINE=qemuppc bitbake libgcc).
Upstream-Status: Submitted [https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599882.html]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Index: gcc-12.1.0/libgcc/config/rs6000/t-float128
===================================================================
--- gcc-12.1.0.orig/libgcc/config/rs6000/t-float128
+++ gcc-12.1.0/libgcc/config/rs6000/t-float128
@@ -103,7 +103,7 @@ $(ibm128_dec_objs) : INTERNAL_CFLAGS +=
$(fp128_softfp_src) : $(srcdir)/soft-fp/$(subst -sw,,$(subst kf,tf,$@)) $(fp128_dep)
@src="$(srcdir)/soft-fp/$(subst -sw,,$(subst kf,tf,$@))"; \
echo "Create $@"; \
- (echo "/* file created from $$src */"; \
+ (echo "/* file created from `basename $$src` */"; \
echo; \
sed -f $(fp128_sed) < $$src) > $@
Relative paths don't work with -fdebug-prefix-map and friends. This
can lead to paths which the user wanted to be remapped being missed.
Setting -fdebug-prefix-map to work with a relative path isn't practical
either.
Instead, call gcc's realpath function on the incomming path name before
comparing it with the remapping. This means other issues like symlinks
are also accounted for and leads to a more consistent remapping experience.
Upstream-Status: Submitted [https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599885.html]
[Also https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599884.html]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Index: gcc-12.1.0/gcc/file-prefix-map.cc
===================================================================
--- gcc-12.1.0.orig/gcc/file-prefix-map.cc
+++ gcc-12.1.0/gcc/file-prefix-map.cc
@@ -70,19 +70,28 @@ remap_filename (file_prefix_map *maps, c
file_prefix_map *map;
char *s;
const char *name;
+ char *realname;
size_t name_len;
+ if (lbasename (filename) == filename)
+ return filename;
+
+ realname = lrealpath (filename);
+
for (map = maps; map; map = map->next)
- if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
+ if (filename_ncmp (realname, map->old_prefix, map->old_len) == 0)
break;
- if (!map)
+ if (!map) {
+ free (realname);
return filename;
- name = filename + map->old_len;
+ }
+ name = realname + map->old_len;
name_len = strlen (name) + 1;
s = (char *) ggc_alloc_atomic (name_len + map->new_len);
memcpy (s, map->new_prefix, map->new_len);
memcpy (s + map->new_len, name, name_len);
+ free (realname);
return s;
}
Index: gcc-12.1.0/libcpp/macro.cc
===================================================================
--- gcc-12.1.0.orig/libcpp/macro.cc
+++ gcc-12.1.0/libcpp/macro.cc
@@ -563,7 +563,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi
if (!name)
abort ();
}
- if (pfile->cb.remap_filename)
+ if (pfile->cb.remap_filename && !pfile->state.in_directive)
name = pfile->cb.remap_filename (name);
len = strlen (name);
buf = _cpp_unaligned_alloc (pfile, len * 2 + 3);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment