All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/mesa3d: fix build on m68k
@ 2021-09-14 22:10 Giulio Benetti
  2021-09-18 12:47 ` Yann E. MORIN
  0 siblings, 1 reply; 12+ messages in thread
From: Giulio Benetti @ 2021-09-14 22:10 UTC (permalink / raw)
  To: buildroot; +Cc: Bernd Kuhls, Romain Naour, Giulio Benetti

To build mesa3d for m68k we need to pass -mlong-jump-table-offsets CFLAG
since 'switch' blocks are pretty wide and lead to build failure. This way
'switch' blocks will have a 32-bit addressing by default instead of the
standard 16-bit.

Fixes:
http://autobuild.buildroot.net/results/60c4653c2a93125edbdd0beb43cd47301643464a/

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 package/mesa3d/mesa3d.mk | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index 54b50f684f..809a7d8e88 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -259,4 +259,13 @@ else
 MESA3D_CONF_OPTS += -Dzstd=disabled
 endif
 
+MESA3D_CFLAGS = $(TARGET_CFLAGS)
+
+# m68k needs 32-bit offsets in switch tables to build
+ifeq ($(BR2_m68k),y)
+MESA3D_CFLAGS += -mlong-jump-table-offsets
+endif
+
+MESA3D_CONF_OPTS += -DCMAKE_C_FLAGS="$(MESA3D_CFLAGS)"
+
 $(eval $(meson-package))
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/mesa3d: fix build on m68k
  2021-09-14 22:10 [Buildroot] [PATCH] package/mesa3d: fix build on m68k Giulio Benetti
@ 2021-09-18 12:47 ` Yann E. MORIN
  2021-09-19  0:51   ` [Buildroot] [PATCH v2] " Giulio Benetti
                     ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Yann E. MORIN @ 2021-09-18 12:47 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: Bernd Kuhls, Romain Naour, buildroot

Giulio, All,

On 2021-09-15 00:10 +0200, Giulio Benetti spake thusly:
> To build mesa3d for m68k we need to pass -mlong-jump-table-offsets CFLAG
> since 'switch' blocks are pretty wide and lead to build failure. This way
> 'switch' blocks will have a 32-bit addressing by default instead of the
> standard 16-bit.
> 
> Fixes:
> http://autobuild.buildroot.net/results/60c4653c2a93125edbdd0beb43cd47301643464a/
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> ---
>  package/mesa3d/mesa3d.mk | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
> index 54b50f684f..809a7d8e88 100644
> --- a/package/mesa3d/mesa3d.mk
> +++ b/package/mesa3d/mesa3d.mk
> @@ -259,4 +259,13 @@ else
>  MESA3D_CONF_OPTS += -Dzstd=disabled
>  endif
>  
> +MESA3D_CFLAGS = $(TARGET_CFLAGS)
> +
> +# m68k needs 32-bit offsets in switch tables to build
> +ifeq ($(BR2_m68k),y)
> +MESA3D_CFLAGS += -mlong-jump-table-offsets

That option has only been added to gcc-7 [0] [1], which makes gcc >= 7 a
pre-requisite for m68k, while mesa3d currently has no such requirement.
Maybe add something like:

    depends on !BR2_m68k || BR2_TOOLCHAIN_GCC_AT_LEAST_7

Then it should be propagated to the few packages that select mesa3d;

    package/intel-mediadriver/
        -> not needed, already depends on x86_64, so implies !m68k

    package/x11r7/xdriver_xf86-video-imx-viv/
        -> this should not be needed either, because imx is an ARM, but
           xdriver_xf86-video-imx-viv is missing a depends on BR2_arm
           (although the comments do have that dependency). However, it
           depends on other imx related packages, and they depend on
           either arm or aarch64, so that implies !m68k.

So, no need to propagate the new dependency.

[0] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57583#c15
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57583#c16

Regards,
Yann E. MORIN.

> +endif
> +
> +MESA3D_CONF_OPTS += -DCMAKE_C_FLAGS="$(MESA3D_CFLAGS)"
> +
>  $(eval $(meson-package))
> -- 
> 2.25.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@lists.buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v2] package/mesa3d: fix build on m68k
  2021-09-18 12:47 ` Yann E. MORIN
@ 2021-09-19  0:51   ` Giulio Benetti
  2021-09-19  8:11     ` Yann E. MORIN
  2021-10-04 11:46     ` Peter Korsgaard
  2021-09-19  0:53   ` [Buildroot] [PATCH] " Giulio Benetti
  2021-09-19 11:49   ` Arnout Vandecappelle
  2 siblings, 2 replies; 12+ messages in thread
From: Giulio Benetti @ 2021-09-19  0:51 UTC (permalink / raw)
  To: buildroot; +Cc: Bernd Kuhls, Giulio Benetti, Romain Naour, Yann E . MORIN

To build mesa3d for m68k we need to pass -mlong-jump-table-offsets CFLAG
since 'switch' blocks are pretty wide and lead to build failure. This way
'switch' blocks will have a 32-bit addressing by default instead of the
standard 16-bit. This can be done only with m68k gcc version >= 7.x
because gcc flag used to fix this(-mlong-jump-table-offsets) is
available only from that version on.

Fixes:
http://autobuild.buildroot.net/results/60c4653c2a93125edbdd0beb43cd47301643464a/

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
V1->V2:
* add gcc >= 7.x dependency to Config.in as suggested by Yann Morin
* improve commit log according to Config.in change
---
 package/mesa3d/Config.in | 1 +
 package/mesa3d/mesa3d.mk | 9 +++++++++
 2 files changed, 10 insertions(+)

diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index eb7c1eef46..e364f435c7 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -4,6 +4,7 @@ menuconfig BR2_PACKAGE_MESA3D
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_TOOLCHAIN_HAS_SYNC_1
 	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
+	depends on !BR2_m68k || BR2_TOOLCHAIN_GCC_AT_LEAST_7 # m68k needs gcc >= 7.x
 	select BR2_PACKAGE_EXPAT
 	select BR2_PACKAGE_LIBDRM
 	select BR2_PACKAGE_WAYLAND_PROTOCOLS if BR2_PACKAGE_WAYLAND
diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index 1a9e355641..f1862aed69 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -259,4 +259,13 @@ else
 MESA3D_CONF_OPTS += -Dzstd=disabled
 endif
 
+MESA3D_CFLAGS = $(TARGET_CFLAGS)
+
+# m68k needs 32-bit offsets in switch tables to build
+ifeq ($(BR2_m68k),y)
+MESA3D_CFLAGS += -mlong-jump-table-offsets
+endif
+
+MESA3D_CONF_OPTS += -DCMAKE_C_FLAGS="$(MESA3D_CFLAGS)"
+
 $(eval $(meson-package))
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/mesa3d: fix build on m68k
  2021-09-18 12:47 ` Yann E. MORIN
  2021-09-19  0:51   ` [Buildroot] [PATCH v2] " Giulio Benetti
@ 2021-09-19  0:53   ` Giulio Benetti
  2021-09-19 11:49   ` Arnout Vandecappelle
  2 siblings, 0 replies; 12+ messages in thread
From: Giulio Benetti @ 2021-09-19  0:53 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Bernd Kuhls, Romain Naour, buildroot

Hi Yann,

On 9/18/21 2:47 PM, Yann E. MORIN wrote:
> Giulio, All,
> 
> On 2021-09-15 00:10 +0200, Giulio Benetti spake thusly:
>> To build mesa3d for m68k we need to pass -mlong-jump-table-offsets CFLAG
>> since 'switch' blocks are pretty wide and lead to build failure. This way
>> 'switch' blocks will have a 32-bit addressing by default instead of the
>> standard 16-bit.
>>
>> Fixes:
>> http://autobuild.buildroot.net/results/60c4653c2a93125edbdd0beb43cd47301643464a/
>>
>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>> ---
>>   package/mesa3d/mesa3d.mk | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>
>> diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
>> index 54b50f684f..809a7d8e88 100644
>> --- a/package/mesa3d/mesa3d.mk
>> +++ b/package/mesa3d/mesa3d.mk
>> @@ -259,4 +259,13 @@ else
>>   MESA3D_CONF_OPTS += -Dzstd=disabled
>>   endif
>>   
>> +MESA3D_CFLAGS = $(TARGET_CFLAGS)
>> +
>> +# m68k needs 32-bit offsets in switch tables to build
>> +ifeq ($(BR2_m68k),y)
>> +MESA3D_CFLAGS += -mlong-jump-table-offsets
> 
> That option has only been added to gcc-7 [0] [1], which makes gcc >= 7 a
> pre-requisite for m68k, while mesa3d currently has no such requirement.
> Maybe add something like:
> 
>      depends on !BR2_m68k || BR2_TOOLCHAIN_GCC_AT_LEAST_7
> 
> Then it should be propagated to the few packages that select mesa3d;
> 
>      package/intel-mediadriver/
>          -> not needed, already depends on x86_64, so implies !m68k
> 
>      package/x11r7/xdriver_xf86-video-imx-viv/
>          -> this should not be needed either, because imx is an ARM, but
>             xdriver_xf86-video-imx-viv is missing a depends on BR2_arm
>             (although the comments do have that dependency). However, it
>             depends on other imx related packages, and they depend on
>             either arm or aarch64, so that implies !m68k.
> 
> So, no need to propagate the new dependency.
> 
> [0] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57583#c15
> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57583#c16

Thank you for reviewing and pointing me this, I didn't think about CFLAG 
availability through version.

Just submitted v2.

Best regards
-- 
Giulio Benetti
Benetti Engineering sas

> Regards,
> Yann E. MORIN.
> 
>> +endif
>> +
>> +MESA3D_CONF_OPTS += -DCMAKE_C_FLAGS="$(MESA3D_CFLAGS)"
>> +
>>   $(eval $(meson-package))
>> -- 
>> 2.25.1
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot@lists.buildroot.org
>> https://lists.buildroot.org/mailman/listinfo/buildroot
> 

_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2] package/mesa3d: fix build on m68k
  2021-09-19  0:51   ` [Buildroot] [PATCH v2] " Giulio Benetti
@ 2021-09-19  8:11     ` Yann E. MORIN
  2021-10-04 11:46     ` Peter Korsgaard
  1 sibling, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2021-09-19  8:11 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: Bernd Kuhls, Romain Naour, buildroot

Giulio, All,

On 2021-09-19 02:51 +0200, Giulio Benetti spake thusly:
> To build mesa3d for m68k we need to pass -mlong-jump-table-offsets CFLAG
> since 'switch' blocks are pretty wide and lead to build failure. This way
> 'switch' blocks will have a 32-bit addressing by default instead of the
> standard 16-bit. This can be done only with m68k gcc version >= 7.x
> because gcc flag used to fix this(-mlong-jump-table-offsets) is
> available only from that version on.
> 
> Fixes:
> http://autobuild.buildroot.net/results/60c4653c2a93125edbdd0beb43cd47301643464a/
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

I've reworded the commit log (expain problem first, explain how it is
fixed them; add upstream BZ references, and non-propagation notes).

I also added a comment in Config.in about this new dependency.

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
> V1->V2:
> * add gcc >= 7.x dependency to Config.in as suggested by Yann Morin
> * improve commit log according to Config.in change
> ---
>  package/mesa3d/Config.in | 1 +
>  package/mesa3d/mesa3d.mk | 9 +++++++++
>  2 files changed, 10 insertions(+)
> 
> diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
> index eb7c1eef46..e364f435c7 100644
> --- a/package/mesa3d/Config.in
> +++ b/package/mesa3d/Config.in
> @@ -4,6 +4,7 @@ menuconfig BR2_PACKAGE_MESA3D
>  	depends on !BR2_STATIC_LIBS
>  	depends on BR2_TOOLCHAIN_HAS_SYNC_1
>  	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
> +	depends on !BR2_m68k || BR2_TOOLCHAIN_GCC_AT_LEAST_7 # m68k needs gcc >= 7.x
>  	select BR2_PACKAGE_EXPAT
>  	select BR2_PACKAGE_LIBDRM
>  	select BR2_PACKAGE_WAYLAND_PROTOCOLS if BR2_PACKAGE_WAYLAND
> diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
> index 1a9e355641..f1862aed69 100644
> --- a/package/mesa3d/mesa3d.mk
> +++ b/package/mesa3d/mesa3d.mk
> @@ -259,4 +259,13 @@ else
>  MESA3D_CONF_OPTS += -Dzstd=disabled
>  endif
>  
> +MESA3D_CFLAGS = $(TARGET_CFLAGS)
> +
> +# m68k needs 32-bit offsets in switch tables to build
> +ifeq ($(BR2_m68k),y)
> +MESA3D_CFLAGS += -mlong-jump-table-offsets
> +endif
> +
> +MESA3D_CONF_OPTS += -DCMAKE_C_FLAGS="$(MESA3D_CFLAGS)"
> +
>  $(eval $(meson-package))
> -- 
> 2.25.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@lists.buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/mesa3d: fix build on m68k
  2021-09-18 12:47 ` Yann E. MORIN
  2021-09-19  0:51   ` [Buildroot] [PATCH v2] " Giulio Benetti
  2021-09-19  0:53   ` [Buildroot] [PATCH] " Giulio Benetti
@ 2021-09-19 11:49   ` Arnout Vandecappelle
  2021-09-19 15:21     ` Giulio Benetti
  2 siblings, 1 reply; 12+ messages in thread
From: Arnout Vandecappelle @ 2021-09-19 11:49 UTC (permalink / raw)
  To: Yann E. MORIN, Giulio Benetti; +Cc: Bernd Kuhls, Romain Naour, buildroot



On 18/09/2021 14:47, Yann E. MORIN wrote:
> Giulio, All,
> 
> On 2021-09-15 00:10 +0200, Giulio Benetti spake thusly:
>> To build mesa3d for m68k we need to pass -mlong-jump-table-offsets CFLAG
>> since 'switch' blocks are pretty wide and lead to build failure. This way
>> 'switch' blocks will have a 32-bit addressing by default instead of the
>> standard 16-bit.
>>
>> Fixes:
>> http://autobuild.buildroot.net/results/60c4653c2a93125edbdd0beb43cd47301643464a/
>>
>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>> ---
>>   package/mesa3d/mesa3d.mk | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>
>> diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
>> index 54b50f684f..809a7d8e88 100644
>> --- a/package/mesa3d/mesa3d.mk
>> +++ b/package/mesa3d/mesa3d.mk
>> @@ -259,4 +259,13 @@ else
>>   MESA3D_CONF_OPTS += -Dzstd=disabled
>>   endif
>>   
>> +MESA3D_CFLAGS = $(TARGET_CFLAGS)
>> +
>> +# m68k needs 32-bit offsets in switch tables to build
>> +ifeq ($(BR2_m68k),y)
>> +MESA3D_CFLAGS += -mlong-jump-table-offsets
> 
> That option has only been added to gcc-7 [0] [1], which makes gcc >= 7 a
> pre-requisite for m68k, while mesa3d currently has no such requirement.

  It's been merged, so OK for now, but I think this is exactly the reason why we 
decided some time ago to just pass -O0 to work around compiler bugs for niche 
architectures...

  Regards,
  Arnout
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/mesa3d: fix build on m68k
  2021-09-19 11:49   ` Arnout Vandecappelle
@ 2021-09-19 15:21     ` Giulio Benetti
  0 siblings, 0 replies; 12+ messages in thread
From: Giulio Benetti @ 2021-09-19 15:21 UTC (permalink / raw)
  To: Arnout Vandecappelle, Yann E. MORIN; +Cc: Bernd Kuhls, Romain Naour, buildroot

Hi Arnout,

On 9/19/21 1:49 PM, Arnout Vandecappelle wrote:
> 
> 
> On 18/09/2021 14:47, Yann E. MORIN wrote:
>> Giulio, All,
>>
>> On 2021-09-15 00:10 +0200, Giulio Benetti spake thusly:
>>> To build mesa3d for m68k we need to pass -mlong-jump-table-offsets CFLAG
>>> since 'switch' blocks are pretty wide and lead to build failure. This way
>>> 'switch' blocks will have a 32-bit addressing by default instead of the
>>> standard 16-bit.
>>>
>>> Fixes:
>>> http://autobuild.buildroot.net/results/60c4653c2a93125edbdd0beb43cd47301643464a/
>>>
>>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>>> ---
>>>    package/mesa3d/mesa3d.mk | 9 +++++++++
>>>    1 file changed, 9 insertions(+)
>>>
>>> diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
>>> index 54b50f684f..809a7d8e88 100644
>>> --- a/package/mesa3d/mesa3d.mk
>>> +++ b/package/mesa3d/mesa3d.mk
>>> @@ -259,4 +259,13 @@ else
>>>    MESA3D_CONF_OPTS += -Dzstd=disabled
>>>    endif
>>>    
>>> +MESA3D_CFLAGS = $(TARGET_CFLAGS)
>>> +
>>> +# m68k needs 32-bit offsets in switch tables to build
>>> +ifeq ($(BR2_m68k),y)
>>> +MESA3D_CFLAGS += -mlong-jump-table-offsets
>>
>> That option has only been added to gcc-7 [0] [1], which makes gcc >= 7 a
>> pre-requisite for m68k, while mesa3d currently has no such requirement.
> 
>    It's been merged, so OK for now, but I think this is exactly the reason why we
> decided some time ago to just pass -O0 to work around compiler bugs for niche
> architectures...

My bad here. I was sure that -O0 didn't work instead it works while 
another package I was facing had no work-around. So this is only due to
my mistake :-/

-- 
Giulio Benetti
Benetti Engineering sas

>    Regards,
>    Arnout
> _______________________________________________
> buildroot mailing list
> buildroot@lists.buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
> 

_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2] package/mesa3d: fix build on m68k
  2021-09-19  0:51   ` [Buildroot] [PATCH v2] " Giulio Benetti
  2021-09-19  8:11     ` Yann E. MORIN
@ 2021-10-04 11:46     ` Peter Korsgaard
  2021-10-04 15:01       ` Yann E. MORIN
  1 sibling, 1 reply; 12+ messages in thread
From: Peter Korsgaard @ 2021-10-04 11:46 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: Bernd Kuhls, Romain Naour, Yann E . MORIN, buildroot

>>>>> "Giulio" == Giulio Benetti <giulio.benetti@benettiengineering.com> writes:

 > To build mesa3d for m68k we need to pass -mlong-jump-table-offsets CFLAG
 > since 'switch' blocks are pretty wide and lead to build failure. This way
 > 'switch' blocks will have a 32-bit addressing by default instead of the
 > standard 16-bit. This can be done only with m68k gcc version >= 7.x
 > because gcc flag used to fix this(-mlong-jump-table-offsets) is
 > available only from that version on.

 > Fixes:
 > http://autobuild.buildroot.net/results/60c4653c2a93125edbdd0beb43cd47301643464a/

 > Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
 > ---
 > V1-> V2:
 > * add gcc >= 7.x dependency to Config.in as suggested by Yann Morin
 > * improve commit log according to Config.in change

..

 > +# m68k needs 32-bit offsets in switch tables to build
 > +ifeq ($(BR2_m68k),y)
 > +MESA3D_CFLAGS += -mlong-jump-table-offsets
 > +endif
 > +
 > +MESA3D_CONF_OPTS += -DCMAKE_C_FLAGS="$(MESA3D_CFLAGS)"
 > +
 >  $(eval $(meson-package))

Does that really work? mesa3d is using meson, not cmake.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2] package/mesa3d: fix build on m68k
  2021-10-04 11:46     ` Peter Korsgaard
@ 2021-10-04 15:01       ` Yann E. MORIN
  2021-10-04 15:23         ` Giulio Benetti
  0 siblings, 1 reply; 12+ messages in thread
From: Yann E. MORIN @ 2021-10-04 15:01 UTC (permalink / raw)
  To: Peter Korsgaard; +Cc: Bernd Kuhls, Giulio Benetti, Romain Naour, buildroot

Peter, Giulio, All,

On 2021-10-04 13:46 +0200, Peter Korsgaard spake thusly:
> >>>>> "Giulio" == Giulio Benetti <giulio.benetti@benettiengineering.com> writes:
> 
>  > To build mesa3d for m68k we need to pass -mlong-jump-table-offsets CFLAG
>  > since 'switch' blocks are pretty wide and lead to build failure. This way
>  > 'switch' blocks will have a 32-bit addressing by default instead of the
>  > standard 16-bit. This can be done only with m68k gcc version >= 7.x
>  > because gcc flag used to fix this(-mlong-jump-table-offsets) is
>  > available only from that version on.
> 
>  > Fixes:
>  > http://autobuild.buildroot.net/results/60c4653c2a93125edbdd0beb43cd47301643464a/
> 
>  > Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>  > ---
>  > V1-> V2:
>  > * add gcc >= 7.x dependency to Config.in as suggested by Yann Morin
>  > * improve commit log according to Config.in change
> 
> ..
> 
>  > +# m68k needs 32-bit offsets in switch tables to build
>  > +ifeq ($(BR2_m68k),y)
>  > +MESA3D_CFLAGS += -mlong-jump-table-offsets
>  > +endif
>  > +
>  > +MESA3D_CONF_OPTS += -DCMAKE_C_FLAGS="$(MESA3D_CFLAGS)"
>  > +
>  >  $(eval $(meson-package))
> 
> Does that really work? mesa3d is using meson, not cmake.

Apparently, no:
    http://autobuild.buildroot.org/results/26a/26a97e080c49c42c06ed59ec6a9d51d81b0ab882/build-end.log

Damn, not sure how I let this split through... :-/

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2] package/mesa3d: fix build on m68k
  2021-10-04 15:01       ` Yann E. MORIN
@ 2021-10-04 15:23         ` Giulio Benetti
  2021-10-04 20:35           ` Giulio Benetti
  0 siblings, 1 reply; 12+ messages in thread
From: Giulio Benetti @ 2021-10-04 15:23 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Bernd Kuhls, Romain Naour, buildroot

Hi Peter, Yann, All,

> Il giorno 4 ott 2021, alle ore 17:01, Yann E. MORIN <yann.morin.1998@free.fr> ha scritto:
> 
> Peter, Giulio, All,
> 
> On 2021-10-04 13:46 +0200, Peter Korsgaard spake thusly:
>>>>>>> "Giulio" == Giulio Benetti <giulio.benetti@benettiengineering.com> writes:
>> 
>>> To build mesa3d for m68k we need to pass -mlong-jump-table-offsets CFLAG
>>> since 'switch' blocks are pretty wide and lead to build failure. This way
>>> 'switch' blocks will have a 32-bit addressing by default instead of the
>>> standard 16-bit. This can be done only with m68k gcc version >= 7.x
>>> because gcc flag used to fix this(-mlong-jump-table-offsets) is
>>> available only from that version on.
>> 
>>> Fixes:
>>> http://autobuild.buildroot.net/results/60c4653c2a93125edbdd0beb43cd47301643464a/
>> 
>>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>>> ---
>>> V1-> V2:
>>> * add gcc >= 7.x dependency to Config.in as suggested by Yann Morin
>>> * improve commit log according to Config.in change
>> 
>> ..
>> 
>>> +# m68k needs 32-bit offsets in switch tables to build
>>> +ifeq ($(BR2_m68k),y)
>>> +MESA3D_CFLAGS += -mlong-jump-table-offsets
>>> +endif
>>> +
>>> +MESA3D_CONF_OPTS += -DCMAKE_C_FLAGS="$(MESA3D_CFLAGS)"
>>> +
>>> $(eval $(meson-package))
>> 
>> Does that really work? mesa3d is using meson, not cmake.
> 
> Apparently, no:
>    http://autobuild.buildroot.org/results/26a/26a97e080c49c42c06ed59ec6a9d51d81b0ab882/build-end.log

Strange, I’m going to fix it tonight. I don’t know how it could be, because I’m sure the solution works. Sorry

Giulio

> 
> Damn, not sure how I let this split through... :-/
> 
> Regards,
> Yann E. MORIN.
> 
> -- 
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2] package/mesa3d: fix build on m68k
  2021-10-04 15:23         ` Giulio Benetti
@ 2021-10-04 20:35           ` Giulio Benetti
  2021-10-04 20:37             ` Giulio Benetti
  0 siblings, 1 reply; 12+ messages in thread
From: Giulio Benetti @ 2021-10-04 20:35 UTC (permalink / raw)
  To: Yann E. MORIN, Peter Korsgaard; +Cc: Bernd Kuhls, Romain Naour, buildroot

Hi again Peter, Yann, All,

On 10/4/21 5:23 PM, Giulio Benetti wrote:
> Hi Peter, Yann, All,
> 
>> Il giorno 4 ott 2021, alle ore 17:01, Yann E. MORIN <yann.morin.1998@free.fr> ha scritto:
>>
>> Peter, Giulio, All,
>>
>> On 2021-10-04 13:46 +0200, Peter Korsgaard spake thusly:
>>>>>>>> "Giulio" == Giulio Benetti <giulio.benetti@benettiengineering.com> writes:
>>>
>>>> To build mesa3d for m68k we need to pass -mlong-jump-table-offsets CFLAG
>>>> since 'switch' blocks are pretty wide and lead to build failure. This way
>>>> 'switch' blocks will have a 32-bit addressing by default instead of the
>>>> standard 16-bit. This can be done only with m68k gcc version >= 7.x
>>>> because gcc flag used to fix this(-mlong-jump-table-offsets) is
>>>> available only from that version on.
>>>
>>>> Fixes:
>>>> http://autobuild.buildroot.net/results/60c4653c2a93125edbdd0beb43cd47301643464a/
>>>
>>>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>>>> ---
>>>> V1-> V2:
>>>> * add gcc >= 7.x dependency to Config.in as suggested by Yann Morin
>>>> * improve commit log according to Config.in change
>>>
>>> ..
>>>
>>>> +# m68k needs 32-bit offsets in switch tables to build
>>>> +ifeq ($(BR2_m68k),y)
>>>> +MESA3D_CFLAGS += -mlong-jump-table-offsets
>>>> +endif
>>>> +
>>>> +MESA3D_CONF_OPTS += -DCMAKE_C_FLAGS="$(MESA3D_CFLAGS)"
>>>> +
>>>> $(eval $(meson-package))
>>>
>>> Does that really work? mesa3d is using meson, not cmake.

It comes out that it works

>>
>> Apparently, no:
>>     http://autobuild.buildroot.org/results/26a/26a97e080c49c42c06ed59ec6a9d51d81b0ab882/build-end.log

This has not this patch applied, so it's ok it fails.

There is one unnecessary line:
MESA3D_CONF_OPTS += -DCMAKE_C_FLAGS="$(MESA3D_CFLAGS)"

On meson we don't need it, so it's superflous and what really passes the 
additional CFLAGS is itself:
MESA3D_CFLAGS += -mlong-jump-table-offsets
because in pkg-meson.mk:
$(2)_CFLAGS ?= $$(TARGET_CFLAGS)

I've just submitted a patch to remove the unnecessary line.

Best regards
-- 
Giulio Benetti
Benetti Engineering sas

> Strange, I’m going to fix it tonight. I don’t know how it could be, because I’m sure the solution works. Sorry
> 
> Giulio
> 
>>
>> Damn, not sure how I let this split through... :-/
>>
>> Regards,
>> Yann E. MORIN.
>>
>> -- 
>> .-----------------.--------------------.------------------.--------------------.
>> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
>> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
>> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
>> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
>> '------------------------------^-------^------------------^--------------------'
>> _______________________________________________
>> buildroot mailing list
>> buildroot@buildroot.org
>> https://lists.buildroot.org/mailman/listinfo/buildroot
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
> 

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2] package/mesa3d: fix build on m68k
  2021-10-04 20:35           ` Giulio Benetti
@ 2021-10-04 20:37             ` Giulio Benetti
  0 siblings, 0 replies; 12+ messages in thread
From: Giulio Benetti @ 2021-10-04 20:37 UTC (permalink / raw)
  To: Yann E. MORIN, Peter Korsgaard; +Cc: Bernd Kuhls, Romain Naour, buildroot

On 10/4/21 10:35 PM, Giulio Benetti wrote:
> Hi again Peter, Yann, All,
> 
> On 10/4/21 5:23 PM, Giulio Benetti wrote:
>> Hi Peter, Yann, All,
>>
>>> Il giorno 4 ott 2021, alle ore 17:01, Yann E. MORIN <yann.morin.1998@free.fr> ha scritto:
>>>
>>> Peter, Giulio, All,
>>>
>>> On 2021-10-04 13:46 +0200, Peter Korsgaard spake thusly:
>>>>>>>>> "Giulio" == Giulio Benetti <giulio.benetti@benettiengineering.com> writes:
>>>>
>>>>> To build mesa3d for m68k we need to pass -mlong-jump-table-offsets CFLAG
>>>>> since 'switch' blocks are pretty wide and lead to build failure. This way
>>>>> 'switch' blocks will have a 32-bit addressing by default instead of the
>>>>> standard 16-bit. This can be done only with m68k gcc version >= 7.x
>>>>> because gcc flag used to fix this(-mlong-jump-table-offsets) is
>>>>> available only from that version on.
>>>>
>>>>> Fixes:
>>>>> http://autobuild.buildroot.net/results/60c4653c2a93125edbdd0beb43cd47301643464a/
>>>>
>>>>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>>>>> ---
>>>>> V1-> V2:
>>>>> * add gcc >= 7.x dependency to Config.in as suggested by Yann Morin
>>>>> * improve commit log according to Config.in change
>>>>
>>>> ..
>>>>
>>>>> +# m68k needs 32-bit offsets in switch tables to build
>>>>> +ifeq ($(BR2_m68k),y)
>>>>> +MESA3D_CFLAGS += -mlong-jump-table-offsets
>>>>> +endif
>>>>> +
>>>>> +MESA3D_CONF_OPTS += -DCMAKE_C_FLAGS="$(MESA3D_CFLAGS)"
>>>>> +
>>>>> $(eval $(meson-package))
>>>>
>>>> Does that really work? mesa3d is using meson, not cmake.
> 
> It comes out that it works
> 
>>>
>>> Apparently, no:
>>>      http://autobuild.buildroot.org/results/26a/26a97e080c49c42c06ed59ec6a9d51d81b0ab882/build-end.log
> 
> This has not this patch applied, so it's ok it fails.
> 
> There is one unnecessary line:
> MESA3D_CONF_OPTS += -DCMAKE_C_FLAGS="$(MESA3D_CFLAGS)"
> 
> On meson we don't need it, so it's superflous and what really passes the
> additional CFLAGS is itself:
> MESA3D_CFLAGS += -mlong-jump-table-offsets
> because in pkg-meson.mk:
> $(2)_CFLAGS ?= $$(TARGET_CFLAGS)
> 
> I've just submitted a patch to remove the unnecessary line:

https://patchwork.ozlabs.org/project/buildroot/patch/20211004203535.923467-1-giulio.benetti@benettiengineering.com/

I've forgotten to point it, sorry for the noise

Best regards
-- 
Giulio Benetti
Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2021-10-04 20:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-14 22:10 [Buildroot] [PATCH] package/mesa3d: fix build on m68k Giulio Benetti
2021-09-18 12:47 ` Yann E. MORIN
2021-09-19  0:51   ` [Buildroot] [PATCH v2] " Giulio Benetti
2021-09-19  8:11     ` Yann E. MORIN
2021-10-04 11:46     ` Peter Korsgaard
2021-10-04 15:01       ` Yann E. MORIN
2021-10-04 15:23         ` Giulio Benetti
2021-10-04 20:35           ` Giulio Benetti
2021-10-04 20:37             ` Giulio Benetti
2021-09-19  0:53   ` [Buildroot] [PATCH] " Giulio Benetti
2021-09-19 11:49   ` Arnout Vandecappelle
2021-09-19 15:21     ` Giulio Benetti

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.