diff mbox series

configure: Use -mlittle-endian instead of -mlittle for ppc64

Message ID 20220119095641.6729-1-mrezanin@redhat.com (mailing list archive)
State New, archived
Headers show
Series configure: Use -mlittle-endian instead of -mlittle for ppc64 | expand

Commit Message

Miroslav Rezanina Jan. 19, 2022, 9:56 a.m. UTC
From: Miroslav Rezanina <mrezanin@redhat.com>

GCC options -mlittle and -mlittle-endian are equivalent on ppc64
architecture. However, clang supports only -mlittle-endian option.

Use longer form in configure to properly support both GCC and clang
compiler.

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paolo Bonzini Jan. 19, 2022, 11:13 a.m. UTC | #1
On 1/19/22 10:56, mrezanin@redhat.com wrote:
> From: Miroslav Rezanina <mrezanin@redhat.com>
> 
> GCC options -mlittle and -mlittle-endian are equivalent on ppc64
> architecture. However, clang supports only -mlittle-endian option.
> 
> Use longer form in configure to properly support both GCC and clang
> compiler.
> 
> Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
> ---
>   configure | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index e1a31fb332..e63c78ca67 100755
> --- a/configure
> +++ b/configure
> @@ -658,7 +658,7 @@ case "$cpu" in
>       CPU_CFLAGS="-m64 -mbig" ;;
>     ppc64le)
>       cpu="ppc64"
> -    CPU_CFLAGS="-m64 -mlittle" ;;
> +    CPU_CFLAGS="-m64 -mlittle-endian" ;;
>   
>     s390)
>       CPU_CFLAGS="-m31" ;;

Does -mbig need the same one line above?

Paolo
Philippe Mathieu-Daudé Jan. 19, 2022, 5:28 p.m. UTC | #2
On 1/19/22 12:13, Paolo Bonzini wrote:
> On 1/19/22 10:56, mrezanin@redhat.com wrote:
>> From: Miroslav Rezanina <mrezanin@redhat.com>
>>
>> GCC options -mlittle and -mlittle-endian are equivalent on ppc64
>> architecture. However, clang supports only -mlittle-endian option.
>>
>> Use longer form in configure to properly support both GCC and clang
>> compiler.
>>
>> Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
>> ---
>>   configure | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/configure b/configure
>> index e1a31fb332..e63c78ca67 100755
>> --- a/configure
>> +++ b/configure
>> @@ -658,7 +658,7 @@ case "$cpu" in
>>       CPU_CFLAGS="-m64 -mbig" ;;
>>     ppc64le)
>>       cpu="ppc64"
>> -    CPU_CFLAGS="-m64 -mlittle" ;;
>> +    CPU_CFLAGS="-m64 -mlittle-endian" ;;
>>       s390)
>>       CPU_CFLAGS="-m31" ;;
> 
> Does -mbig need the same one line above?

Yes, and tests/tcg/configure.sh needs that change too.
diff mbox series

Patch

diff --git a/configure b/configure
index e1a31fb332..e63c78ca67 100755
--- a/configure
+++ b/configure
@@ -658,7 +658,7 @@  case "$cpu" in
     CPU_CFLAGS="-m64 -mbig" ;;
   ppc64le)
     cpu="ppc64"
-    CPU_CFLAGS="-m64 -mlittle" ;;
+    CPU_CFLAGS="-m64 -mlittle-endian" ;;
 
   s390)
     CPU_CFLAGS="-m31" ;;