All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/assimp: workaround m68k build issues
@ 2020-08-25 21:01 Thomas Petazzoni
  2020-08-25 21:01 ` [Buildroot] [PATCH 2/2] package/assimp: also build with -mxgot on mips64(el) Thomas Petazzoni
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2020-08-25 21:01 UTC (permalink / raw)
  To: buildroot

On m68k coldfire, we already pass -mxgot, but since the bump to assimp
5.0.1, this is no longer sufficient, and we have failures such as:

/tmp/ccqmJLil.s: Assembler messages:
/tmp/ccqmJLil.s:307948: Error: value -43420 out of range
/tmp/ccqmJLil.s:307985: Error: value -38606 out of range
/tmp/ccqmJLil.s:308010: Error: value -38626 out of range
/tmp/ccqmJLil.s:308056: Error: value -33280 out of range

Since these issues only arise when building with -O2, let's disable
the optimization for this package on m68k. The very relative relevance
of assimp on m68k coldfire makes the research of a better solution not
really useful (for the record, assimp is a "library to import various
well-known 3D model formats in a uniform manner").

Fixes:

  http://autobuild.buildroot.net/results/a7d4fb2653b0f1be4d036ee46a44e72da0ed4376/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/assimp/assimp.mk | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/package/assimp/assimp.mk b/package/assimp/assimp.mk
index 4aeb2963a9..e8620c859a 100644
--- a/package/assimp/assimp.mk
+++ b/package/assimp/assimp.mk
@@ -10,9 +10,11 @@ ASSIMP_LICENSE = BSD-3-Clause
 ASSIMP_LICENSE_FILES = LICENSE
 ASSIMP_INSTALL_STAGING = YES
 
-# relocation truncated to fit: R_68K_GOT16O
+# relocation truncated to fit: R_68K_GOT16O. We also need to disable
+# optimizations to not run into "Error: value -43420 out of range"
+# assembler issues.
 ifeq ($(BR2_m68k),y)
-ASSIMP_CXXFLAGS += -mxgot
+ASSIMP_CXXFLAGS += -mxgot -O0
 endif
 
 # workaround SuperH compiler failure when static linking (i.e -fPIC is
-- 
2.26.2

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

* [Buildroot] [PATCH 2/2] package/assimp: also build with -mxgot on mips64(el)
  2020-08-25 21:01 [Buildroot] [PATCH 1/2] package/assimp: workaround m68k build issues Thomas Petazzoni
@ 2020-08-25 21:01 ` Thomas Petazzoni
  2020-08-28 17:27   ` Peter Korsgaard
  2020-08-25 21:26 ` [Buildroot] [PATCH 1/2] package/assimp: workaround m68k build issues Yann E. MORIN
  2020-08-28 17:27 ` Peter Korsgaard
  2 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2020-08-25 21:01 UTC (permalink / raw)
  To: buildroot

Since the bump of assimp to 5.0.1, we have build failures on mips64el,
due to relocations being truncated. The issue seems to be quite
similar to the one on m68k coldfire, as both m68k and MIPS have this
-mxgot gcc option to switch to using a GOT that has no size limit (but
causes less efficient code to be produced).

Here as well, the overall relevance of assimp on mips64(el) platforms
being probably very limited, the incentive to search for a better
solution is pretty limited.

Fixes:

  http://autobuild.buildroot.net/results/7df487d5117b2ee440a07dbff9cae1b181566748/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/assimp/assimp.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/assimp/assimp.mk b/package/assimp/assimp.mk
index e8620c859a..e1b9a23499 100644
--- a/package/assimp/assimp.mk
+++ b/package/assimp/assimp.mk
@@ -17,6 +17,13 @@ ifeq ($(BR2_m68k),y)
 ASSIMP_CXXFLAGS += -mxgot -O0
 endif
 
+# just like m68k coldfire, mips64 also has some limitations on the GOT
+# size for large libraries, which can be overcome by passing
+# -mxgot. Solves "relocation truncated to fit: R_MIPS_CALL16" issues.
+ifeq ($(BR2_mips64)$(BR2_mips64el),y)
+ASSIMP_CXXFLAGS += -mxgot
+endif
+
 # workaround SuperH compiler failure when static linking (i.e -fPIC is
 # not passed) in gcc versions 5.x or older. The -Os optimization level
 # causes a "unable to find a register to spill in class
-- 
2.26.2

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

* [Buildroot] [PATCH 1/2] package/assimp: workaround m68k build issues
  2020-08-25 21:01 [Buildroot] [PATCH 1/2] package/assimp: workaround m68k build issues Thomas Petazzoni
  2020-08-25 21:01 ` [Buildroot] [PATCH 2/2] package/assimp: also build with -mxgot on mips64(el) Thomas Petazzoni
@ 2020-08-25 21:26 ` Yann E. MORIN
  2020-08-28 17:27 ` Peter Korsgaard
  2 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2020-08-25 21:26 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2020-08-25 23:01 +0200, Thomas Petazzoni spake thusly:
> On m68k coldfire, we already pass -mxgot, but since the bump to assimp
> 5.0.1, this is no longer sufficient, and we have failures such as:
> 
> /tmp/ccqmJLil.s: Assembler messages:
> /tmp/ccqmJLil.s:307948: Error: value -43420 out of range
> /tmp/ccqmJLil.s:307985: Error: value -38606 out of range
> /tmp/ccqmJLil.s:308010: Error: value -38626 out of range
> /tmp/ccqmJLil.s:308056: Error: value -33280 out of range
> 
> Since these issues only arise when building with -O2, let's disable
> the optimization for this package on m68k. The very relative relevance
> of assimp on m68k coldfire makes the research of a better solution not
> really useful (for the record, assimp is a "library to import various
> well-known 3D model formats in a uniform manner").
> 
> Fixes:
> 
>   http://autobuild.buildroot.net/results/a7d4fb2653b0f1be4d036ee46a44e72da0ed4376/
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Both applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  package/assimp/assimp.mk | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/package/assimp/assimp.mk b/package/assimp/assimp.mk
> index 4aeb2963a9..e8620c859a 100644
> --- a/package/assimp/assimp.mk
> +++ b/package/assimp/assimp.mk
> @@ -10,9 +10,11 @@ ASSIMP_LICENSE = BSD-3-Clause
>  ASSIMP_LICENSE_FILES = LICENSE
>  ASSIMP_INSTALL_STAGING = YES
>  
> -# relocation truncated to fit: R_68K_GOT16O
> +# relocation truncated to fit: R_68K_GOT16O. We also need to disable
> +# optimizations to not run into "Error: value -43420 out of range"
> +# assembler issues.
>  ifeq ($(BR2_m68k),y)
> -ASSIMP_CXXFLAGS += -mxgot
> +ASSIMP_CXXFLAGS += -mxgot -O0
>  endif
>  
>  # workaround SuperH compiler failure when static linking (i.e -fPIC is
> -- 
> 2.26.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/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.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 1/2] package/assimp: workaround m68k build issues
  2020-08-25 21:01 [Buildroot] [PATCH 1/2] package/assimp: workaround m68k build issues Thomas Petazzoni
  2020-08-25 21:01 ` [Buildroot] [PATCH 2/2] package/assimp: also build with -mxgot on mips64(el) Thomas Petazzoni
  2020-08-25 21:26 ` [Buildroot] [PATCH 1/2] package/assimp: workaround m68k build issues Yann E. MORIN
@ 2020-08-28 17:27 ` Peter Korsgaard
  2 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2020-08-28 17:27 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:

 > On m68k coldfire, we already pass -mxgot, but since the bump to assimp
 > 5.0.1, this is no longer sufficient, and we have failures such as:

 > /tmp/ccqmJLil.s: Assembler messages:
 > /tmp/ccqmJLil.s:307948: Error: value -43420 out of range
 > /tmp/ccqmJLil.s:307985: Error: value -38606 out of range
 > /tmp/ccqmJLil.s:308010: Error: value -38626 out of range
 > /tmp/ccqmJLil.s:308056: Error: value -33280 out of range

 > Since these issues only arise when building with -O2, let's disable
 > the optimization for this package on m68k. The very relative relevance
 > of assimp on m68k coldfire makes the research of a better solution not
 > really useful (for the record, assimp is a "library to import various
 > well-known 3D model formats in a uniform manner").

 > Fixes:

 >   http://autobuild.buildroot.net/results/a7d4fb2653b0f1be4d036ee46a44e72da0ed4376/

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Committed to 2020.05.x, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 2/2] package/assimp: also build with -mxgot on mips64(el)
  2020-08-25 21:01 ` [Buildroot] [PATCH 2/2] package/assimp: also build with -mxgot on mips64(el) Thomas Petazzoni
@ 2020-08-28 17:27   ` Peter Korsgaard
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2020-08-28 17:27 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:

 > Since the bump of assimp to 5.0.1, we have build failures on mips64el,
 > due to relocations being truncated. The issue seems to be quite
 > similar to the one on m68k coldfire, as both m68k and MIPS have this
 > -mxgot gcc option to switch to using a GOT that has no size limit (but
 > causes less efficient code to be produced).

 > Here as well, the overall relevance of assimp on mips64(el) platforms
 > being probably very limited, the incentive to search for a better
 > solution is pretty limited.

 > Fixes:

 >   http://autobuild.buildroot.net/results/7df487d5117b2ee440a07dbff9cae1b181566748/

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Committed to 2020.05.x, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2020-08-28 17:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-25 21:01 [Buildroot] [PATCH 1/2] package/assimp: workaround m68k build issues Thomas Petazzoni
2020-08-25 21:01 ` [Buildroot] [PATCH 2/2] package/assimp: also build with -mxgot on mips64(el) Thomas Petazzoni
2020-08-28 17:27   ` Peter Korsgaard
2020-08-25 21:26 ` [Buildroot] [PATCH 1/2] package/assimp: workaround m68k build issues Yann E. MORIN
2020-08-28 17:27 ` Peter Korsgaard

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.