All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] configure: Fix building on a ppc64 host with Clang
@ 2022-03-01 13:27 Thomas Huth
  2022-03-01 14:59 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Huth @ 2022-03-01 13:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Daniel Henrique Barboza, qemu-ppc, Cédric Le Goater

Clang only supports the -mlittle-endian and -mbig-endian switches,
and not -mlittle / -mbig. Since GCC supports both, let's use the
long versions that are supported by both instead.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index c56ed53ee3..81618708e4 100755
--- a/configure
+++ b/configure
@@ -630,10 +630,10 @@ case "$cpu" in
   ppc)
     CPU_CFLAGS="-m32" ;;
   ppc64)
-    CPU_CFLAGS="-m64 -mbig" ;;
+    CPU_CFLAGS="-m64 -mbig-endian" ;;
   ppc64le)
     cpu="ppc64"
-    CPU_CFLAGS="-m64 -mlittle" ;;
+    CPU_CFLAGS="-m64 -mlittle-endian" ;;
 
   s390)
     CPU_CFLAGS="-m31" ;;
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] configure: Fix building on a ppc64 host with Clang
  2022-03-01 13:27 [PATCH] configure: Fix building on a ppc64 host with Clang Thomas Huth
@ 2022-03-01 14:59 ` Philippe Mathieu-Daudé
  2022-03-01 17:22   ` Cédric Le Goater
  0 siblings, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-03-01 14:59 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel
  Cc: qemu-trivial, Daniel Henrique Barboza, qemu-ppc,
	Cédric Le Goater, Miroslav Rezanina, matheus.ferst

On 1/3/22 14:27, Thomas Huth wrote:
> Clang only supports the -mlittle-endian and -mbig-endian switches,
> and not -mlittle / -mbig. Since GCC supports both, let's use the
> long versions that are supported by both instead.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>   configure | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/configure b/configure
> index c56ed53ee3..81618708e4 100755
> --- a/configure
> +++ b/configure
> @@ -630,10 +630,10 @@ case "$cpu" in
>     ppc)
>       CPU_CFLAGS="-m32" ;;
>     ppc64)
> -    CPU_CFLAGS="-m64 -mbig" ;;
> +    CPU_CFLAGS="-m64 -mbig-endian" ;;
>     ppc64le)
>       cpu="ppc64"
> -    CPU_CFLAGS="-m64 -mlittle" ;;
> +    CPU_CFLAGS="-m64 -mlittle-endian" ;;
>   
>     s390)
>       CPU_CFLAGS="-m31" ;;

Mirek sent a similar fix, but it was pending Matheus TCG fixes:

https://lore.kernel.org/qemu-devel/20220131091714.4825-1-mrezanin@redhat.com/
https://lists.gnu.org/archive/html/qemu-ppc/2022-02/msg00116.html


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] configure: Fix building on a ppc64 host with Clang
  2022-03-01 14:59 ` Philippe Mathieu-Daudé
@ 2022-03-01 17:22   ` Cédric Le Goater
  2022-03-01 17:25     ` Thomas Huth
  0 siblings, 1 reply; 5+ messages in thread
From: Cédric Le Goater @ 2022-03-01 17:22 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Thomas Huth, qemu-devel
  Cc: qemu-trivial, matheus.ferst, Miroslav Rezanina,
	Daniel Henrique Barboza, qemu-ppc

On 3/1/22 15:59, Philippe Mathieu-Daudé wrote:
> On 1/3/22 14:27, Thomas Huth wrote:
>> Clang only supports the -mlittle-endian and -mbig-endian switches,
>> and not -mlittle / -mbig. Since GCC supports both, let's use the
>> long versions that are supported by both instead.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>   configure | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/configure b/configure
>> index c56ed53ee3..81618708e4 100755
>> --- a/configure
>> +++ b/configure
>> @@ -630,10 +630,10 @@ case "$cpu" in
>>     ppc)
>>       CPU_CFLAGS="-m32" ;;
>>     ppc64)
>> -    CPU_CFLAGS="-m64 -mbig" ;;
>> +    CPU_CFLAGS="-m64 -mbig-endian" ;;
>>     ppc64le)
>>       cpu="ppc64"
>> -    CPU_CFLAGS="-m64 -mlittle" ;;
>> +    CPU_CFLAGS="-m64 -mlittle-endian" ;;
>>     s390)
>>       CPU_CFLAGS="-m31" ;;
> 
> Mirek sent a similar fix, but it was pending Matheus TCG fixes:
> 
> https://lore.kernel.org/qemu-devel/20220131091714.4825-1-mrezanin@redhat.com/
> https://lists.gnu.org/archive/html/qemu-ppc/2022-02/msg00116.html

Yes.

I kept it for later because I understood there were still problems
with clang. May be I am wrong. Matheus ?

Thanks,

C.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] configure: Fix building on a ppc64 host with Clang
  2022-03-01 17:22   ` Cédric Le Goater
@ 2022-03-01 17:25     ` Thomas Huth
  2022-03-01 17:41       ` Cédric Le Goater
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Huth @ 2022-03-01 17:25 UTC (permalink / raw)
  To: Cédric Le Goater, Philippe Mathieu-Daudé, qemu-devel
  Cc: qemu-trivial, matheus.ferst, Miroslav Rezanina,
	Daniel Henrique Barboza, qemu-ppc

On 01/03/2022 18.22, Cédric Le Goater wrote:
> On 3/1/22 15:59, Philippe Mathieu-Daudé wrote:
>> On 1/3/22 14:27, Thomas Huth wrote:
>>> Clang only supports the -mlittle-endian and -mbig-endian switches,
>>> and not -mlittle / -mbig. Since GCC supports both, let's use the
>>> long versions that are supported by both instead.
>>>
>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>> ---
>>>   configure | 4 ++--
>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/configure b/configure
>>> index c56ed53ee3..81618708e4 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -630,10 +630,10 @@ case "$cpu" in
>>>     ppc)
>>>       CPU_CFLAGS="-m32" ;;
>>>     ppc64)
>>> -    CPU_CFLAGS="-m64 -mbig" ;;
>>> +    CPU_CFLAGS="-m64 -mbig-endian" ;;
>>>     ppc64le)
>>>       cpu="ppc64"
>>> -    CPU_CFLAGS="-m64 -mlittle" ;;
>>> +    CPU_CFLAGS="-m64 -mlittle-endian" ;;
>>>     s390)
>>>       CPU_CFLAGS="-m31" ;;
>>
>> Mirek sent a similar fix, but it was pending Matheus TCG fixes:
>>
>> https://lore.kernel.org/qemu-devel/20220131091714.4825-1-mrezanin@redhat.com/
>> https://lists.gnu.org/archive/html/qemu-ppc/2022-02/msg00116.html
> 
> Yes.
> 
> I kept it for later because I understood there were still problems
> with clang. May be I am wrong. Matheus ?

As far as I can see, there are some additional problems with the TCG tests, 
but the patch to the configure script is already required if the user only 
want to compile the main QEMU binaries. So I'd recommend to go ahead and 
queue Miroslav's patch already, the TCG tests can still be fixed on top later.

  Thomas



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] configure: Fix building on a ppc64 host with Clang
  2022-03-01 17:25     ` Thomas Huth
@ 2022-03-01 17:41       ` Cédric Le Goater
  0 siblings, 0 replies; 5+ messages in thread
From: Cédric Le Goater @ 2022-03-01 17:41 UTC (permalink / raw)
  To: Thomas Huth, Philippe Mathieu-Daudé, qemu-devel
  Cc: qemu-trivial, matheus.ferst, Miroslav Rezanina,
	Daniel Henrique Barboza, qemu-ppc

On 3/1/22 18:25, Thomas Huth wrote:
> On 01/03/2022 18.22, Cédric Le Goater wrote:
>> On 3/1/22 15:59, Philippe Mathieu-Daudé wrote:
>>> On 1/3/22 14:27, Thomas Huth wrote:
>>>> Clang only supports the -mlittle-endian and -mbig-endian switches,
>>>> and not -mlittle / -mbig. Since GCC supports both, let's use the
>>>> long versions that are supported by both instead.
>>>>
>>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>>> ---
>>>>   configure | 4 ++--
>>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/configure b/configure
>>>> index c56ed53ee3..81618708e4 100755
>>>> --- a/configure
>>>> +++ b/configure
>>>> @@ -630,10 +630,10 @@ case "$cpu" in
>>>>     ppc)
>>>>       CPU_CFLAGS="-m32" ;;
>>>>     ppc64)
>>>> -    CPU_CFLAGS="-m64 -mbig" ;;
>>>> +    CPU_CFLAGS="-m64 -mbig-endian" ;;
>>>>     ppc64le)
>>>>       cpu="ppc64"
>>>> -    CPU_CFLAGS="-m64 -mlittle" ;;
>>>> +    CPU_CFLAGS="-m64 -mlittle-endian" ;;
>>>>     s390)
>>>>       CPU_CFLAGS="-m31" ;;
>>>
>>> Mirek sent a similar fix, but it was pending Matheus TCG fixes:
>>>
>>> https://lore.kernel.org/qemu-devel/20220131091714.4825-1-mrezanin@redhat.com/
>>> https://lists.gnu.org/archive/html/qemu-ppc/2022-02/msg00116.html
>>
>> Yes.
>>
>> I kept it for later because I understood there were still problems
>> with clang. May be I am wrong. Matheus ?
> 
> As far as I can see, there are some additional problems with the TCG tests, but the patch to the configure script is already required if the user only want to compile the main QEMU binaries. So I'd recommend to go ahead and queue Miroslav's patch already, the TCG tests can still be fixed on top later.


OK. I will add it to the ppc queue.

Thanks,

C.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-03-01 17:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-01 13:27 [PATCH] configure: Fix building on a ppc64 host with Clang Thomas Huth
2022-03-01 14:59 ` Philippe Mathieu-Daudé
2022-03-01 17:22   ` Cédric Le Goater
2022-03-01 17:25     ` Thomas Huth
2022-03-01 17:41       ` Cédric Le Goater

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.