[MIPS][LS2][5/5] Support for native MIPS GCC

Maxim Kuvyrkov maxim@codesourcery.com
Thu Jul 10 05:16:00 GMT 2008


Eric Fisher wrote:
> I got an error when build the cross tools, using the updated patches.

...

> Reading specs from /home/xmj/loongson2e-tools/build-cs-gcc-4.3.0/./gcc/specs
> xgcc: braced spec body '%<march=native %:local_cpu_detect(arch)
> %{mtune=native:%<mtune=native %:local_cpu_detect(tune)} %{!EB:
> %{!EL:%(endian_spec)}} %{!mabi=*: -mabi=n32}' is invalid

The brace after " %{march=native:%<march=native 
%:local_cpu_detect(arch)" is missing.  Before committing the patch I 
retested it and fixed this typo.  So, the relevant piece of the patch 
should be
+# define MARCH_MTUNE_NATIVE_SPECS				\
+  " %{march=native:%<march=native %:local_cpu_detect(arch)}"	\
+  " %{mtune=native:%<mtune=native %:local_cpu_detect(tune)}"

This is the only difference between the patch posted in thread and patch 
committed in revision 136888.


--
Maxim

> configure:2374: $? = 1
> configure:2376:
> /home/xmj/loongson2e-tools/build-cs-gcc-4.3.0/./gcc/xgcc
> -B/home/xmj/loongson2e-tools/build-cs-gcc-4.3.0/./gcc
> / -B/home/xmj/install/cs-gcc-4.3.0/mips64el-linux/bin/
> -B/home/xmj/install/cs-gcc-4.3.0/mips64el-linux/lib/ -isystem
> /home/xmj
> /install/cs-gcc-4.3.0/mips64el-linux/include -isystem
> /home/xmj/install/cs-gcc-4.3.0/mips64el-linux/sys-include -V
> </dev/null
>> &5
> xgcc: '-V' must come at the start of the command line
> configure:2379: $? = 1
> configure:2398:
> /home/xmj/loongson2e-tools/build-cs-gcc-4.3.0/./gcc/xgcc
> -B/home/xmj/loongson2e-tools/build-cs-gcc-4.3.0/./gcc
> / -B/home/xmj/install/cs-gcc-4.3.0/mips64el-linux/bin/
> -B/home/xmj/install/cs-gcc-4.3.0/mips64el-linux/lib/ -isystem
> /home/xmj
> /install/cs-gcc-4.3.0/mips64el-linux/include -isystem
> /home/xmj/install/cs-gcc-4.3.0/mips64el-linux/sys-include -o conftest
> -O
> 2 -g -g -O2     conftest.c  >&5
> xgcc: braced spec body '%<march=native %:local_cpu_detect(arch)
> %{mtune=native:%<mtune=native %:local_cpu_detect(tune)} %{!EB:
> %{!EL:%(endian_spec)}} %{!mabi=*: -mabi=n32}' is invalid
> configure:2401: $? = 1
> configure:2567: checking for suffix of object files
> configure:2588:
> /home/xmj/loongson2e-tools/build-cs-gcc-4.3.0/./gcc/xgcc
> -B/home/xmj/loongson2e-tools/build-cs-gcc-4.3.0/./gcc
> / -B/home/xmj/install/cs-gcc-4.3.0/mips64el-linux/bin/
> -B/home/xmj/install/cs-gcc-4.3.0/mips64el-linux/lib/ -isystem
> /home/xmj
> /install/cs-gcc-4.3.0/mips64el-linux/include -isystem
> /home/xmj/install/cs-gcc-4.3.0/mips64el-linux/sys-include -c -O2 -g -g
> -
> O2    conftest.c >&5
> xgcc: braced spec body '%<march=native %:local_cpu_detect(arch)
> %{mtune=native:%<mtune=native %:local_cpu_detect(tune)} %{!EB:
> %{!EL:%(endian_spec)}} %{!mabi=*: -mabi=n32}' is invalid
> configure:2591: $? = 1
> 
> 
> 
> 
> 2008/7/10 Maxim Kuvyrkov <maxim@codesourcery.com>:
>> David Daney wrote:
>>> Maxim Kuvyrkov wrote:
>>>> Richard Sandiford wrote:
>>>>> Maxim Kuvyrkov <maxim@codesourcery.com> writes:
>>>>>> 2008-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
>>>>>>        Kazu Hirata  <kazu@codesourcery.com>
>>>>>>        Maxim Kuvyrkov  <maxim@codesourcery.com
>>>>>>
>>>>>>    * config.gcc (mips64el-st-linux-gnu): Use mips/st.h and mips/t-st.
>>>>>>    * config.host: Use driver-native.o and mips/x-native for
>>>>>> mips*-linux*.
>>>>>>    * config/mips/linux.h (host_detect_local_cpu): Declare, add to
>>>>>>    EXTRA_SPEC_FUNCTIONS.
>>>>>>    (MARCH_MTUNE_NATIVE_SPECS): New macro.
>>>>>>    (DRIVER_SELF_SPECS): Adjust.
>>>>>>    * config/mips/linux64.h (DRIVER_SELF_SPECS): Update.
>>>>>>    * config/mips/st.h, config/mips/t-st: New.
>>>>>>    * config/mips/driver-native.c, config/mips/x-native: New.
>>>>> OK with the changes below.
>>>> The patch is fixed as per your changes.
>>>>
>>> How was this tested?  I cannot bootstrap due to the following in stage2:
>> Sorry for breaking the bootstrap.  The patch was cross-tested on
>> mips64el-st-linux-gnu.  I remember testing the bootstrap, but, probably,
>> that was for the original version of the patch.
>>
>> FWIW, I think the fix you posted in the other thread is the proper one.
>>
>>
>> Thanks,
>>
>> Maxim
>>



More information about the Gcc-patches mailing list