diff options
author | Jim Wilson <jimw@sifive.com> | 2019-09-07 00:09:21 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 2019-09-06 17:09:21 -0700 |
commit | 2f4d895197e7b137f50624bef58c9b614bf081e5 (patch) | |
tree | f9961e7deaf647350496eb92790b1f96521aee4f /gcc | |
parent | e83573abb388801561768ed373c8e43a0f005110 (diff) | |
download | gcc-2f4d895197e7b137f50624bef58c9b614bf081e5.zip gcc-2f4d895197e7b137f50624bef58c9b614bf081e5.tar.gz gcc-2f4d895197e7b137f50624bef58c9b614bf081e5.tar.bz2 |
RISC-V: Re-enable -msave-restore for shared libraries.
This re-enables -msave-restore for shared libraries, and uses the
t-slibgcc-libgcc file to get the save-restore routines included directly
in shared libraries so that we don't need to indirect through the PLT
to reach them, which doesn't work.
gcc/
* config/riscv/riscv.c (riscv_option_override): Revert 2019-08-30
change.
libgcc/
* config.host (riscv*-*-linux*): Add t-slibgcc-libgcc to tmake_file.
(riscv*-*-freebsd*): Likewise.
From-SVN: r275478
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/riscv/riscv.c | 10 |
2 files changed, 5 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 91069bf..46c1b50 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-09-06 Jim Wilson <jimw@sifive.com> + + * config/riscv/riscv.c (riscv_option_override): Revert 2019-08-30 + change. + 2019-09-06 Segher Boessenkool <segher@kernel.crashing.org> * config/rs6000/rs6000.md (unspec): Delete UNSPEC_MV_CR_OV. diff --git a/gcc/config/riscv/riscv.c b/gcc/config/riscv/riscv.c index 1e7528f..9b16a1e 100644 --- a/gcc/config/riscv/riscv.c +++ b/gcc/config/riscv/riscv.c @@ -4636,16 +4636,6 @@ riscv_option_override (void) error ("%<-mriscv-attribute%> RISC-V ELF attribute requires GNU as 2.32" " [%<-mriscv-attribute%>]"); #endif - - /* The save-restore routines use t0 which is clobbered by the plt header, - so we can't use them when building shared libraries. */ - if (TARGET_SAVE_RESTORE && flag_pic && TARGET_PLT) - { - target_flags &= ~MASK_SAVE_RESTORE; - if (target_flags_explicit & MASK_SAVE_RESTORE) - warning (0, "%<-msave-restore%> disabled; not supported with PLT " - "based shared libraries"); - } } /* Implement TARGET_CONDITIONAL_REGISTER_USAGE. */ |