aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorStafford Horne <shorne@gmail.com>2021-04-21 05:33:15 +0900
committerStafford Horne <shorne@gmail.com>2021-08-15 07:23:12 +0900
commitda8a9d695b3c4b9397b5d9a27660bfa48af8d707 (patch)
tree0370bda04efdaa76a75d853eb796b9985e4a6dd6 /libgcc
parenteff8110674ef193481d3657456a262beeb9951ff (diff)
downloadgcc-da8a9d695b3c4b9397b5d9a27660bfa48af8d707.zip
gcc-da8a9d695b3c4b9397b5d9a27660bfa48af8d707.tar.gz
gcc-da8a9d695b3c4b9397b5d9a27660bfa48af8d707.tar.bz2
or1k: Use cmodel=large when building crtstuff
When linking gcc runtime objects into large binaries the link may fail with the below errors. This will happen even if we are building with -mcmodel=large. /home/shorne/work/openrisc/output/host/lib/gcc/or1k-buildroot-linux-uclibc/10.3.0/crtbeginS.o: in function `deregister_tm_clones': crtstuff.c:(.text+0x3c): relocation truncated to fit: R_OR1K_GOT16 against undefined symbol `_ITM_deregisterTMCloneTable' /home/shorne/work/openrisc/output/host/lib/gcc/or1k-buildroot-linux-uclibc/10.3.0/crtbeginS.o: in function `register_tm_clones': crtstuff.c:(.text+0xc0): relocation truncated to fit: R_OR1K_GOT16 against undefined symbol `_ITM_registerTMCloneTable' This patch builds the gcc crtstuff binaries always with the -mcmodel=large option to ensure they can be linked into large binaries. libgcc/ChangeLog: PR target/99783 * config.host (or1k-*, tmake_file): Add or1k/t-crtstuff. * config/or1k/t-crtstuff: New file.
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/config.host4
-rw-r--r--libgcc/config/or1k/t-crtstuff2
2 files changed, 4 insertions, 2 deletions
diff --git a/libgcc/config.host b/libgcc/config.host
index 50f0006..8ca7a00 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -1119,12 +1119,12 @@ nios2-*-*)
extra_parts="$extra_parts crti.o crtn.o"
;;
or1k-*-linux*)
- tmake_file="$tmake_file or1k/t-or1k"
+ tmake_file="$tmake_file or1k/t-or1k or1k/t-crtstuff"
tmake_file="$tmake_file t-softfp-sfdf t-softfp"
md_unwind_header=or1k/linux-unwind.h
;;
or1k-*-*)
- tmake_file="$tmake_file or1k/t-or1k"
+ tmake_file="$tmake_file or1k/t-or1k or1k/t-crtstuff"
tmake_file="$tmake_file t-softfp-sfdf t-softfp"
;;
pdp11-*-*)
diff --git a/libgcc/config/or1k/t-crtstuff b/libgcc/config/or1k/t-crtstuff
new file mode 100644
index 0000000..dcae7f3
--- /dev/null
+++ b/libgcc/config/or1k/t-crtstuff
@@ -0,0 +1,2 @@
+# Compile crtbeginS.o and crtendS.o with -mcmodel=large
+CRTSTUFF_T_CFLAGS_S += -mcmodel=large