From: Steve Ellcey Date: Thu, 6 Nov 2014 22:29:39 +0000 (+0000) Subject: config.gcc (mips*-mti-linux*): Remove gnu_ld and gas assignments. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8cfebf8687df425c54d232f727abef949f3cfd05;p=gcc.git config.gcc (mips*-mti-linux*): Remove gnu_ld and gas assignments. 2014-11-06 Steve Ellcey * config.gcc (mips*-mti-linux*): Remove gnu_ld and gas assignments. Set default_mips_arch and default_mips_abi instead of tm_defines. (mips*-*-linux*): Set default_mips_arch and default_mips_abi instead of tm_defines. (mips*-*-*): Check with_arch and with_abi. Set tm_defines. * config/mips/mips.h (STANDARD_STARTFILE_PREFIX_1): Set default based on MIPS_ABI_DEFAULT. (STANDARD_STARTFILE_PREFIX_2): Ditto. From-SVN: r217203 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 320e0d634e0..3ed47a8c6f8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2014-11-06 Steve Ellcey + + * config.gcc (mips*-mti-linux*): Remove gnu_ld and gas assignments. + Set default_mips_arch and default_mips_abi instead of tm_defines. + (mips*-*-linux*): Set default_mips_arch and default_mips_abi instead + of tm_defines. + (mips*-*-*): Check with_arch and with_abi. Set tm_defines. + * config/mips/mips.h (STANDARD_STARTFILE_PREFIX_1): Set default + based on MIPS_ABI_DEFAULT. + (STANDARD_STARTFILE_PREFIX_2): Ditto. + 2014-11-06 Joseph Myers * doc/invoke.texi (-std=c99, -std=c11): Don't refer to corner diff --git a/gcc/config.gcc b/gcc/config.gcc index 10b0a6ec128..f1bfb656746 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1952,30 +1952,30 @@ mips*-*-linux*) # Linux MIPS, either endian. extra_options="${extra_options} linux-android.opt" case ${target} in mipsisa32r2*) - tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33" + default_mips_arch=mips32r2 ;; mipsisa32*) - tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32" + default_mips_arch=mips32 ;; mips64el-st-linux-gnu) - tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32" + default_mips_abi=n32 tm_file="${tm_file} mips/st.h" tmake_file="${tmake_file} mips/t-st" enable_mips_multilibs="yes" ;; mips64octeon*-*-linux*) - tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32" + default_mips_abi=n32 tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\"" target_cpu_default=MASK_SOFT_FLOAT_ABI enable_mips_multilibs="yes" ;; mipsisa64r2*-*-linux*) - tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32" - tm_defines="${tm_defines} MIPS_ISA_DEFAULT=65" + default_mips_abi=n32 + default_mips_arch=mips64r2 enable_mips_multilibs="yes" ;; mips64*-*-linux* | mipsisa64*-*-linux*) - tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32" + default_mips_abi=n32 enable_mips_multilibs="yes" ;; esac @@ -4120,6 +4120,29 @@ case ${target} in tm_defines="TARGET_ENDIAN_DEFAULT=0 $tm_defines" ;; esac + if test x$with_arch != x; then + default_mips_arch=$with_arch + fi + if test x$with_abi != x; then + default_mips_abi=$with_abi + fi + case ${default_mips_arch} in + mips1) tm_defines="$tm_defines MIPS_ISA_DEFAULT=1" ;; + mips2) tm_defines="$tm_defines MIPS_ISA_DEFAULT=2" ;; + mips3) tm_defines="$tm_defines MIPS_ISA_DEFAULT=3" ;; + mips4) tm_defines="$tm_defines MIPS_ISA_DEFAULT=4" ;; + mips32) tm_defines="$tm_defines MIPS_ISA_DEFAULT=32" ;; + mips32r2) tm_defines="$tm_defines MIPS_ISA_DEFAULT=33" ;; + mips64) tm_defines="$tm_defines MIPS_ISA_DEFAULT=64" ;; + mips64r2) tm_defines="$tm_defines MIPS_ISA_DEFAULT=65" ;; + esac + case ${default_mips_abi} in + 32) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_32" ;; + o64) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_O64" ;; + n32) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_N32" ;; + 64) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_64" ;; + eabi) tm_defines="$tm_defines MIPS_ABI_DEFAULT=ABI_EABI" ;; + esac tmake_file="mips/t-mips $tmake_file" ;; diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 39e6926bd0a..dd67f11fe03 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -3006,3 +3006,13 @@ extern GTY(()) struct target_globals *mips16_globals; with arguments ARGS. */ #define PMODE_INSN(NAME, ARGS) \ (Pmode == SImode ? NAME ## _si ARGS : NAME ## _di ARGS) + +/* If we are *not* using multilibs and the default ABI is not ABI_32 we + need to change these from /lib and /usr/lib. */ +#if MIPS_ABI_DEFAULT == ABI_N32 +#define STANDARD_STARTFILE_PREFIX_1 "/lib32/" +#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib32/" +#elif MIPS_ABI_DEFAULT == ABI_64 +#define STANDARD_STARTFILE_PREFIX_1 "/lib64/" +#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib64/" +#endif