aboutsummaryrefslogtreecommitdiff
path: root/10.1.0
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-07-14 08:12:22 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2020-07-14 08:12:22 +0100
commit6c5ced06c025ddc8b34d02c7597d0f0f0932393f (patch)
tree4e74f1d72e06049b5bbc5661f6e0d8b09de24dab /10.1.0
parent10.1.0: fix Bug tag in -fno-delayed-branch not to contain trailing stop (diff)
downloadgcc-patches-6c5ced06c025ddc8b34d02c7597d0f0f0932393f.tar.gz
gcc-patches-6c5ced06c025ddc8b34d02c7597d0f0f0932393f.tar.bz2
gcc-patches-6c5ced06c025ddc8b34d02c7597d0f0f0932393f.zip
10.1.0: use crtendS.o on sparc-linux-pie
This should fix TEXTREL warning when linking most binaries on sparc. Bug: https://gcc.gnu.org/PR96190 Bug: https://bugs.gentoo.org/619706 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to '10.1.0')
-rw-r--r--10.1.0/gentoo/37_all_sparc_pie_TEXTREL.patch49
-rw-r--r--10.1.0/gentoo/README.history3
2 files changed, 52 insertions, 0 deletions
diff --git a/10.1.0/gentoo/37_all_sparc_pie_TEXTREL.patch b/10.1.0/gentoo/37_all_sparc_pie_TEXTREL.patch
new file mode 100644
index 0000000..059f744
--- /dev/null
+++ b/10.1.0/gentoo/37_all_sparc_pie_TEXTREL.patch
@@ -0,0 +1,49 @@
+https://gcc.gnu.org/PR96190
+https://bugs.gentoo.org/619706
+
+From 6acaa3c1c1e6202af9871aa304ed772939d51311 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <siarheit@google.com>
+Date: Tue, 14 Jul 2020 07:48:42 +0100
+Subject: [PATCH] sparc/sparc64: use PIE_SPEC to select crtendS.o [PR96190]
+
+In --enable-default-pie mode compiler should switch from
+using crtend.o to crtendS.o. On sparc it is especially visible
+because crtend.o contains PIC-unfriendly code.
+
+gcc:
+
+2020-07-14 Sergei Trofimovich <siarheit@google.com>
+
+ PR driver/96190
+ * config/sparc/linux.h: Use PIE_SPEC to select crtendS.o.
+ * config/sparc/linux64.h: ditto
+---
+ gcc/config/sparc/linux.h | 2 +-
+ gcc/config/sparc/linux64.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/gcc/config/sparc/linux.h
++++ b/gcc/config/sparc/linux.h
+@@ -35,7 +35,7 @@ along with GCC; see the file COPYING3. If not see
+
+ #undef ENDFILE_SPEC
+ #define ENDFILE_SPEC \
+- "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s\
++ "%{shared|" PIE_SPEC ":crtendS.o%s;:crtend.o%s} crtn.o%s\
+ %{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s}"
+
+ /* -mcpu=native handling only makes sense with compiler running on
+--- a/gcc/config/sparc/linux64.h
++++ b/gcc/config/sparc/linux64.h
+@@ -52,7 +52,7 @@ along with GCC; see the file COPYING3. If not see
+
+ #undef ENDFILE_SPEC
+ #define ENDFILE_SPEC \
+- "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s\
++ "%{shared|" PIE_SPEC ":crtendS.o%s;:crtend.o%s} crtn.o%s\
+ %{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s}"
+
+ /* The default code model. */
+--
+2.27.0
+
diff --git a/10.1.0/gentoo/README.history b/10.1.0/gentoo/README.history
index 6fab577..f081231 100644
--- a/10.1.0/gentoo/README.history
+++ b/10.1.0/gentoo/README.history
@@ -1,3 +1,6 @@
+4 TODO
+ + 37_all_sparc_pie_TEXTREL.patch
+
3 04 July 2020
+ 33_all_avx512-scalar-PR95528.patch
+ 34_all_cet-cross-x86.patch