This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: A few small fixes for gcc 2.96 for MIPS/Linux
- To: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
- Subject: Re: A few small fixes for gcc 2.96 for MIPS/Linux
- From: Andreas Jaeger <aj at suse dot de>
- Date: 02 Jun 2000 19:40:56 +0200
- Cc: gcc-bugs at gcc dot gnu dot org, Gavin Koch <gavin at cygnus dot com>, gcc-patches at gcc dot gnu dot org
- References: <Pine.GSO.3.96.1000602152506.27984C-100000@delta.ds2.pg.gda.pl>
- Reply-To: gcc-patches at gcc dot gnu dot org
>>>>> Maciej W Rozycki writes:
Hi Maciej,
Please note that the right address for gcc-patches is
gcc-patches@gcc.gnu.org - not gcc-bugs. I'm setting CC and reply-to
to gcc-patches.
> Hello,
> There are a few small problems with gcc 2.96 for MIPS/Linux. I have
> prepared a patch that addresses these. Beside some spacing adjustments it
> contains the following changes:
> - TARGET_VERSION definitions (obvious, I think),
Ok with me.
> - default cpp's _MIPS_ISA definition (should be mips1, shouldn't it?),
Yes, that's right - otherwise we would need to define MIPS_ISA_DEFAULT
to 3.
> - LINKER_ENDIAN_SPEC for BE targets (the linker might be configured to
> default to LE),
That's fixed already.
> - mipsel to mips*el fix (obvious),
Is this needed? Ok, other platforms do it also, let's be consistent.
> - tmake_file definition is missing for mips*-*-linux*.
Ok with me.
> I hope these are OK to apply.
IMO yes. Gavin, what do you think? I can check in those changes
later after I did a full bootstrap and run of the testsuite on
mipsel-linux.
Thanks Maciej,
Andreas
> Maciej
> --
> + Maciej W. Rozycki, Technical University of Gdansk, Poland +
> +--------------------------------------------------------------+
> + e-mail: macro@ds2.pg.gda.pl, PGP key available +
>
> diff -u --recursive --new-file egcs-20000501.macro/gcc/config/mips/linux.h egcs-20000501/gcc/config/mips/linux.h
> --- egcs-20000501.macro/gcc/config/mips/linux.h Wed Apr 26 07:18:26 2000
> +++ egcs-20000501/gcc/config/mips/linux.h Mon May 29 21:55:54 2000
> @@ -20,9 +20,9 @@
>
> #undef TARGET_VERSION
> #if TARGET_ENDIAN_DEFAULT == 0
> -#define TARGET_VERSION fprintf (stderr, " (MIPSel GNU/ELF)");
> +#define TARGET_VERSION fprintf (stderr, " (MIPSel GNU/Linux with ELF)");
> #else
> -#define TARGET_VERSION fprintf (stderr, " (MIPS GNU/ELF)");
> +#define TARGET_VERSION fprintf (stderr, " (MIPS GNU/Linux with ELF)");
> #endif
>
> #undef MD_EXEC_PREFIX
> @@ -39,7 +39,7 @@
>
>
> /* Required to keep collect2.c happy */
> -#undef OBJECT_FORMAT_COFF
> +#undef OBJECT_FORMAT_COFF
>
> /* If we don't set MASK_ABICALLS, we can't default to PIC. */
> #undef TARGET_DEFAULT
> @@ -95,7 +95,7 @@
> %{mips2: -D_MIPS_ISA=_MIPS_ISA_MIPS2} \
> %{mips3: -D_MIPS_ISA=_MIPS_ISA_MIPS3} \
> %{mips4: -D_MIPS_ISA=_MIPS_ISA_MIPS4} \
> -%{!mips*: -D_MIPS_ISA=_MIPS_ISA_MIPS3} \
> +%{!mips*: -D_MIPS_ISA=_MIPS_ISA_MIPS1} \
> %{mabi=32: -D_MIPS_SIM=_MIPS_SIM_ABI32} \
> %{mabi=n32: -D_ABIN32=2 -D_MIPS_SIM=_ABIN32} \
> %{mabi=64: -D_ABI64=3 -D_MIPS_SIM=_ABI64} \
> diff -u --recursive --new-file egcs-20000501.macro/gcc/config/mips/mips.h egcs-20000501/gcc/config/mips/mips.h
> --- egcs-20000501.macro/gcc/config/mips/mips.h Wed Apr 19 15:39:16 2000
> +++ egcs-20000501/gcc/config/mips/mips.h Mon May 29 21:58:25 2000
> @@ -526,7 +526,7 @@
> #if TARGET_ENDIAN_DEFAULT == 0
> #define LINKER_ENDIAN_SPEC "%{!EB:%{!meb:-EL}}"
> #else
> -#define LINKER_ENDIAN_SPEC ""
> +#define LINKER_ENDIAN_SPEC "%{!EL:%{!mel:-EB}}"
> #endif
> #endif
>
> diff -u --recursive --new-file egcs-20000501.macro/gcc/configure.in egcs-20000501/gcc/configure.in
> --- egcs-20000501.macro/gcc/configure.in Sun Apr 30 11:17:13 2000
> +++ egcs-20000501/gcc/configure.in Mon May 29 22:16:31 2000
> @@ -2639,18 +2639,23 @@
> # On NetBSD, the headers are already okay, except for math.h.
> tmake_file=t-netbsd
> ;;
> - mips*-*-linux*) # Linux MIPS, either endian.
> + mips*-*-linux*) # Linux MIPS, either endian.
> xmake_file=x-linux
> - case $machine in
> - mipsel-*) tm_file="mips/elfl.h mips/linux.h" ;;
> - *) tm_file="mips/elf.h mips/linux.h" ;;
> - esac
> + case $machine in
> + mips*el-*)
> + tm_file="mips/elfl.h mips/linux.h"
> + ;;
> + *)
> + tm_file="mips/elf.h mips/linux.h"
> + ;;
> + esac
> + tmake_file=t-linux
> extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
> gnu_ld=yes
> gas=yes
> - if test x$enable_threads = xyes; then
> - thread_file='posix'
> - fi
> + if test x$enable_threads = xyes; then
> + thread_file='posix'
> + fi
> ;;
> mips*el-*-openbsd*) # mips little endian
> target_cpu_default="MASK_GAS|MASK_ABICALLS"
>
>
>
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de