From: Iain Sandoe Date: Sat, 3 Aug 2019 19:44:13 +0000 (+0000) Subject: Darwin, ppc, backport wrong code fix. X-Git-Tag: releases/gcc-9.2.0~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9964a11fd3baedc0eedf6948fd39a1e0db7537f8;p=thirdparty%2Fgcc.git Darwin, ppc, backport wrong code fix. We should never have been using longcalls by default in 64b code. 2019-08-03 Iain Sandoe Backport from mainline 2019-06-27 Iain Sandoe * config/rs6000/rs6000.c (darwin_rs6000_override_options): Do not use longcall for 64b code. From-SVN: r274044 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c82acd9b666a..6bf6118c514c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2019-08-03 Iain Sandoe + + Backport from mainline + 2019-06-27 Iain Sandoe + + * config/rs6000/rs6000.c (darwin_rs6000_override_options): Do not + use longcall for 64b code. + 2019-08-03 Iain Sandoe Backport from mainline diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 085b80fa6531..68322bb2216c 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -3639,6 +3639,15 @@ darwin_rs6000_override_options (void) rs6000_isa_flags |= OPTION_MASK_POWERPC64; warning (0, "%qs requires PowerPC64 architecture, enabling", "-m64"); } + + /* The linkers [ld64] that support 64Bit do not need the JBSR longcall + optimisation, and will not work with the most generic case (where the + symbol is undefined external, but there is no symbl stub). */ + if (TARGET_64BIT) + rs6000_default_long_calls = 0; + + /* ld_classic is (so far) still used for kernel (static) code, and supports + the JBSR longcall / branch islands. */ if (flag_mkernel) { rs6000_default_long_calls = 1;