[1/3] package/openblas: fix build on mips64 n32

Message ID 20260730200118.3547779-2-dario.binacchi@amarulasolutions.com
State New
Headers show
Series
  • package/armadillo: bump to 15.4.2 and fix build failures
Related show

Commit Message

Dario Binacchi July 30, 2026, 8:01 p.m. UTC
BR2_ARCH_IS_64 is set for mips64/mips64el even when the n32 ABI is
used, so openblas was built with BINARY=64. Its build system then
passes -mabi=64, which conflicts with the n32 sysroot:

  gnu/stubs.h:35:11: fatal error: gnu/stubs-n64_hard.h: No such file
  or directory

For openblas, BINARY refers to the pointer size rather than to the
architecture, and n32 uses 32-bit pointers, so BINARY=32 is correct
there.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 package/openblas/openblas.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

'Julien Olivain' via Amarula Linux Aug. 1, 2026, 11:12 a.m. UTC | #1
On 30/07/2026 22:01, Dario Binacchi wrote:
> BR2_ARCH_IS_64 is set for mips64/mips64el even when the n32 ABI is
> used, so openblas was built with BINARY=64. Its build system then
> passes -mabi=64, which conflicts with the n32 sysroot:
> 
>   gnu/stubs.h:35:11: fatal error: gnu/stubs-n64_hard.h: No such file
>   or directory
> 
> For openblas, BINARY refers to the pointer size rather than to the
> architecture, and n32 uses 32-bit pointers, so BINARY=32 is correct
> there.
> 
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

Series applied to master, thanks.

To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.

Patch

diff --git a/package/openblas/openblas.mk b/package/openblas/openblas.mk
index 9a3bb42496ab..a5bf68f69913 100644
--- a/package/openblas/openblas.mk
+++ b/package/openblas/openblas.mk
@@ -49,7 +49,9 @@  ifeq ($(BR2_STATIC_LIBS),y)
 OPENBLAS_MAKE_OPTS += NO_SHARED=1
 endif
 
-ifeq ($(BR2_ARCH_IS_64),y)
+# mips64 n32 is a 64-bit architecture, but with 32-bit pointers, so
+# openblas must be built with BINARY=32
+ifeq ($(BR2_ARCH_IS_64)$(BR2_MIPS_NABI32),y)
 OPENBLAS_MAKE_OPTS += BINARY=64
 else
 OPENBLAS_MAKE_OPTS += BINARY=32