qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v1 19/24] tests/tcg: move MIPS specific tests in


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH v1 19/24] tests/tcg: move MIPS specific tests into subdir
Date: Mon, 16 Apr 2018 07:21:35 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 04/16/2018 05:56 AM, Alex Bennée wrote:
> 
> Philippe Mathieu-Daudé <address@hidden> writes:
> 
>> On 04/10/2018 04:39 PM, Alex Bennée wrote:
>>> These only need to be built for MIPS guests.
>>>
>>> Signed-off-by: Alex Bennée <address@hidden>
>>> ---
>>>  tests/tcg/README                  | 11 -----------
>>>  tests/tcg/mips/README             |  7 +++++++
>>>  tests/tcg/{ => mips}/hello-mips.c |  0
>>>  3 files changed, 7 insertions(+), 11 deletions(-)
>>>  create mode 100644 tests/tcg/mips/README
>>>  rename tests/tcg/{ => mips}/hello-mips.c (100%)
>>>
>>> diff --git a/tests/tcg/README b/tests/tcg/README
>>> index 625f2326e6..a5643d33e7 100644
>>> --- a/tests/tcg/README
>>> +++ b/tests/tcg/README
>>> @@ -3,17 +3,6 @@ regression testing. Tests are either multi-arch, meaning 
>>> they can be
>>>  built for all guest architectures that support linux-user executable,
>>>  or they are architecture specific.
>>>  
>>> -
>>> -
>>> -MIPS
>>> -====
>>> -
>>> -hello-mips
>>> -----------
>>> -
>>> -hello-mipsel
>>> -------------
>>> -
>>>  CRIS
>>>  ====
>>>  The testsuite for CRIS is in tests/tcg/cris.  You can run it
>>> diff --git a/tests/tcg/mips/README b/tests/tcg/mips/README
>>> new file mode 100644
>>> index 0000000000..e5bbc58ec5
>>> --- /dev/null
>>> +++ b/tests/tcg/mips/README
>>> @@ -0,0 +1,7 @@
>>> +MIPS
>>> +====
>>> +
>>> +hello-mips
>>> +----------
>>> +
>>> +A very simple inline assembly, write syscall based hello world
>>> diff --git a/tests/tcg/hello-mips.c b/tests/tcg/mips/hello-mips.c
>>> similarity index 100%
>>> rename from tests/tcg/hello-mips.c
>>> rename to tests/tcg/mips/hello-mips.c
>>
>> tested with:
>>
>> -- >8 --
>> diff --git a/configure b/configure
>> index c98eb01c39..aebe928b3c 100755
>> --- a/configure
>> +++ b/configure
>> @@ -455,6 +455,7 @@ docker="no"
>>  # cross compilers defaults, can be overridden with --cross-cc-ARCH
>>  cross_cc_aarch64="aarch64-linux-gnu-gcc"
>>  cross_cc_arm="arm-linux-gnueabihf-gcc"
>> +cross_cc_mips="mipsel-linux-gnu-gcc"
>>  cross_cc_powerpc="powerpc-linux-gnu-gcc"
>>  cross_cc_i386="i386-pc-linux-gnu-gcc"
>>  cross_cc_i386_cflags=""
>> @@ -6860,6 +6861,7 @@ case "$target_name" in
>>    mips|mipsel)
>>      TARGET_ARCH=mips
>>      echo "TARGET_ABI_MIPSO32=y" >> $config_target_mak
>> +    target_compiler=$cross_cc_mips
>>    ;;
>>    mipsn32|mipsn32el)
>>      TARGET_ARCH=mips64
>> diff --git a/tests/tcg/mips/Makefile.target b/tests/tcg/mips/Makefile.target
>> new file mode 100644
>> index 0000000000..427aafc9e5
>> --- /dev/null
>> +++ b/tests/tcg/mips/Makefile.target
>> @@ -0,0 +1,6 @@
>> +# -*- Mode: makefile -*-
>> +#
>> +# MIPS specific tweaks
>> +
>> +hello-mips: CFLAGS+=-ffreestanding
>> +hello-mips: LDFLAGS+=-nostdlib
> 
> I've jiggled things around a bit for v2 to include:
> 
>   # The order we include is important. We include multiarch, base arch and 
> finally arch
>   -include $(SRC_PATH)/tests/tcg/multiarch/Makefile.target
>   -include $(SRC_PATH)/tests/tcg/$(TARGET_BASE_ARCH)/Makefile.target
>   -include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.target
>  
> So hopefully I don't have to split up the current MIPS dir and the
> tcg/MIPS/Makefile.target will deal with all the variations.

Excellent, thanks :)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]