This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch] MIPS configuration patch
- From: "Steve Ellcey " <sellcey at imgtec dot com>
- To: <matthew dot fortune at imgtec dot com>, <clm at codesourcery dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 23 Oct 2014 13:37:24 -0700
- Subject: [Patch] MIPS configuration patch
- Authentication-results: sourceware.org; auth=none
Here is another patch to reduce the differences between the 32 bit MIPS
and 64 bit MIPS configuration. This patch combines the two case entries
in config.gcc into one entry so the header file list and other settings
don't have to be handled twice.
This patch should not change the build for any MIPS target except that,
before this patch, the gnu_ld and gas variables were explicitly set to yes
for MIPS64 targets but not for MIPS32 targets. I don't know why this
difference exists but it shouldn't matter for builds that are on linux
because the variables were getting set to 'yes' anyway when using the GNU
linker and assembler. I don't think anyone builds a linux target that does
not use these. I chose to put the settings in (matching MIPS64) but I don't
think removing them would cause any problems if we want to do that.
Steve Ellcey
sellcey@imgtec.com
2014-10-23 Steve Ellcey <sellcey@imgtec.com>
* config.gcc (mips*-*-linux*): Combine 32 and 64 bit cases.
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 6bbbb26..8bc59bf 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1945,41 +1945,46 @@ mips*-mti-linux*)
gnu_ld=yes
gas=yes
;;
-mips64*-*-linux* | mipsisa64*-*-linux*)
+mips*-*-linux*) # Linux MIPS, either endian.
tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h"
extra_options="${extra_options} linux-android.opt"
- tmake_file="${tmake_file} mips/t-linux64"
- tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
case ${target} in
+ mipsisa32r2*)
+ tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33"
+ ;;
+ mipsisa32*)
+ tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
+ ;;
mips64el-st-linux-gnu)
+ tm_defines="${tm_defines} MIPS_ABI_DEFAULT=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"
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"
+ enable_mips_multilibs="yes"
+ ;;
+ mips64*-*-linux* | mipsisa64*-*-linux*)
+ tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
+ enable_mips_multilibs="yes"
;;
esac
- gnu_ld=yes
- gas=yes
- ;;
-mips*-*-linux*) # Linux MIPS, either endian.
- tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h"
- extra_options="${extra_options} linux-android.opt"
if test x$enable_targets = xall; then
+ enable_mips_multilibs="yes"
+ fi
+ if test x$enable_mips_multilibs = xyes; then
tmake_file="${tmake_file} mips/t-linux64"
fi
- tm_file="${tm_file} mips/linux-common.h"
- case ${target} in
- mipsisa32r2*)
- tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33"
- ;;
- mipsisa32*)
- tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
- esac
+ gnu_ld=yes
+ gas=yes
;;
mips*-mti-elf*)
tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h mips/mti-elf.h"