diff options
author | Alan Modra <amodra@gmail.com> | 2020-09-28 16:23:01 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-10-01 10:34:48 +0930 |
commit | c6be439b37702f6ac4c2fc447c6f3ed1042b80a3 (patch) | |
tree | 5f9cec57d320243058ebfe2b6b5e13b51555743c /libgcc | |
parent | cf7dae01734eea0dfb4c387e4cd40e1f9a682f56 (diff) | |
download | gcc-c6be439b37702f6ac4c2fc447c6f3ed1042b80a3.zip gcc-c6be439b37702f6ac4c2fc447c6f3ed1042b80a3.tar.gz gcc-c6be439b37702f6ac4c2fc447c6f3ed1042b80a3.tar.bz2 |
[RS6000] -mno-minimal-toc vs. power10 pcrelative
We've had this hack in the libgcc config to build libgcc with
-mcmodel=small for powerpc64 for a long time. It wouldn't be a bad
thing if someone who knows the multilib machinery well could arrange
for -mcmodel=small to be passed just for ppc64 when building for
earlier than power10. But for now, make -mno-minimal-toc do nothing
when pcrel. Which will do the right thing for any project that has
copied libgcc's trick.
We want this if configuring using --with-cpu=power10 to build a
power10 pcrel libgcc. --mcmodel=small turns off pcrel.
gcc/
* config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Don't
set -mcmodel=small for -mno-minimal-toc when pcrel.
libgcc/
* config/rs6000/t-linux: Document purpose of -mno-minimal-toc.
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/config/rs6000/t-linux | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libgcc/config/rs6000/t-linux b/libgcc/config/rs6000/t-linux index 4f6d4c4..ed82194 100644 --- a/libgcc/config/rs6000/t-linux +++ b/libgcc/config/rs6000/t-linux @@ -1,3 +1,8 @@ SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-glibc.ver -HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-minimal-toc +HOST_LIBGCC2_CFLAGS += -mlong-double-128 + +# This is a way of selecting -mcmodel=small for ppc64, which gives +# smaller and faster libgcc code. Directly specifying -mcmodel=small +# would need to take into account targets for which -mcmodel is invalid. +HOST_LIBGCC2_CFLAGS += -mno-minimal-toc |