* [Patch] MIPS configuration patch
@ 2014-10-23 21:08 Steve Ellcey
2014-10-30 14:55 ` Moore, Catherine
0 siblings, 1 reply; 2+ messages in thread
From: Steve Ellcey @ 2014-10-23 21:08 UTC (permalink / raw)
To: matthew.fortune, clm, gcc-patches
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"
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [Patch] MIPS configuration patch
2014-10-23 21:08 [Patch] MIPS configuration patch Steve Ellcey
@ 2014-10-30 14:55 ` Moore, Catherine
0 siblings, 0 replies; 2+ messages in thread
From: Moore, Catherine @ 2014-10-30 14:55 UTC (permalink / raw)
To: Steve Ellcey , matthew.fortune, gcc-patches
> -----Original Message-----
> From: Steve Ellcey [mailto:sellcey@imgtec.com]
> Sent: Thursday, October 23, 2014 4:37 PM
> To: matthew.fortune@imgtec.com; Moore, Catherine; gcc-
> patches@gcc.gnu.org
> Subject: [Patch] MIPS configuration patch
>
> 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.
>
Hi Steve,
The gnu_ld and gas settings can be removed altogether. They are set earlier for all linux-targets:
*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
extra_options="$extra_options gnu-user.opt"
gas=yes
gnu_ld=yes
case ${enable_threads} in
"" | yes | posix) thread_file='posix' ;;
Esac
This patch is OK, with that change.
Thanks,
Catherine
>
>
> 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"
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-30 14:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-23 21:08 [Patch] MIPS configuration patch Steve Ellcey
2014-10-30 14:55 ` Moore, Catherine
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).