diff options
author | Daniel Jacobowitz <dan@codesourcery.com> | 2008-08-17 10:48:46 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2008-08-17 10:48:46 +0000 |
commit | e21d5757ecfd70f55f87bad7c5db48b0e28bd466 (patch) | |
tree | 767a35a420e130538e9c5f9e1d7aa7a06d475905 /gcc/config.gcc | |
parent | 4817c43b1740e11de6ad2e6074cf2a9c4c1d431c (diff) | |
download | gcc-e21d5757ecfd70f55f87bad7c5db48b0e28bd466.zip gcc-e21d5757ecfd70f55f87bad7c5db48b0e28bd466.tar.gz gcc-e21d5757ecfd70f55f87bad7c5db48b0e28bd466.tar.bz2 |
install.texi (--with-mips-plt): Document.
gcc/
2008-08-17 Daniel Jacobowitz <dan@codesourcery.com>
Richard Sandiford <rdsandiford@googlemail.com>
* doc/install.texi (--with-mips-plt): Document.
* doc/invoke.texi (-mplt, -mno-plt): Document.
* config.gcc (mips*-*-*): Add mips-plt to supported_defaults
and handle ${with_mips_plt}.
* config/mips/mips.opt (mplt): New option.
* config/mips/mips.h (TARGET_ABICALLS_PIC0): New macro.
(TARGET_ABICALLS_PIC2): Likewise.
(TARGET_GPWORD): Return false for TARGET_ABSOLUTE_ABICALLS.
(OPTION_DEFAULT_SPECS): Add a mips-plt entry.
(ASM_SPEC): Use !mabi=* instead of !mabi*.
(MIPS_CALL): Use TARGET_ABICALLS_PIC2 instead of TARGET_ABICALLS
to decide whether to output ".option picX" directives.
* config/mips/linux.h (SUBTARGET_ASM_SPEC): Remove -mabi=64 handling.
Pass -call_nonpic rather than -KPIC for -mplt.
(BASE_DRIVER_SELF_SPECS): Remove -mplt if -mno-shared is not present
on the command line. Also remove it when -mabi=64 is used without
-msym32.
* config/mips/linux64.h (SUBTARGET_ASM_SPEC): Delete.
* config/mips/mips.c (mips_use_pic_fn_addr_reg_p): Handle
TARGET_ABICALLS_PIC0.
(mips_classify_symbol): Use TARGET_ABICALLS_PIC2 instead of
TARGET_ABICALLS.
(mips16_build_function_stub): Only output ".option pic" directives
and PIC stubs if TARGET_ABICALLS_PIC2. Call through $25 instead of $1.
(mips16_build_call_stub): Fix comment and remove redundant
".set at"/"set .noat" directives.
(mips_function_rodata_section): Use the default behaviour for
TARGET_ABSOLUTE_ABICALLS.
(mips_file_start): Emit ".option pic0" for TARGET_ABICALLS_PIC0.
(mips_global_pointer): Handle TARGET_ABICALLS_PIC0.
(mips_restore_gp): Do nothing if the current function doesn't use
a global pointer.
(mips_expand_prologue): Only save $gp if the current function uses it.
Use a normal move for TARGET_ABICALLS_PIC0.
(mips_override_options): Only set flag_pic if TARGET_ABICALLS_PIC2.
Co-Authored-By: Richard Sandiford <rdsandiford@googlemail.com>
From-SVN: r139170
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r-- | gcc/config.gcc | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc index 30339e2..7078b0b 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -2779,7 +2779,7 @@ case "${target}" in ;; mips*-*-*) - supported_defaults="abi arch float tune divide llsc" + supported_defaults="abi arch float tune divide llsc mips-plt" case ${with_float} in "" | soft | hard) @@ -2826,6 +2826,21 @@ case "${target}" in exit 1 ;; esac + + case ${with_mips_plt} in + yes) + with_mips_plt=plt + ;; + no) + with_mips_plt=no-plt + ;; + "") + ;; + *) + echo "Unknown --with-mips-plt argument: $with_mips_plt" 1>&2 + exit 1 + ;; + esac ;; powerpc*-*-* | rs6000-*-*) @@ -3078,10 +3093,10 @@ case ${target} in esac t= -all_defaults="abi cpu cpu_32 cpu_64 arch arch_32 arch_64 tune tune_32 tune_64 schedule float mode fpu divide llsc" +all_defaults="abi cpu cpu_32 cpu_64 arch arch_32 arch_64 tune tune_32 tune_64 schedule float mode fpu divide llsc mips-plt" for option in $all_defaults do - eval "val=\$with_$option" + eval "val=\$with_"`echo $option | sed s/-/_/g` if test -n "$val"; then case " $supported_defaults " in *" $option "*) |