commit:     fa3ae9ee24dd410992d3ba3d412aa315356f9e41
Author:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 16 02:05:04 2025 +0000
Commit:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Tue Dec 16 02:10:29 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa3ae9ee

sci-libs/openblas: backport fix for building on arm

```
make -j40 -l90 -O shared
cpuid.S: Assembler messages:
cpuid.S:69: Error: junk at end of line, first unrecognized character is `,'
make[1]: *** [Makefile.prebuild:100: getarch] Error 1
make[1]: Entering directory 
'/var/tmp/portage/sci-libs/openblas-0.3.30-r4/work/OpenBLAS-0.3.30/interface'
armv7a-unknown-linux-gnueabihf-gcc -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 
-mfloat-abi=hard  [...]  -c axpy.c -o saxpy.o
In file included from axpy.c:40:
../common.h:62:10: fatal error: config.h: No such file or directory
   62 | #include "config.h"
      |          ^~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:825: saxpy.o] Error 1
```

Bug: https://github.com/OpenMathLib/OpenBLAS/pull/5360
Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>

 .../files/openblas-0.3.30-arm-assembly.patch       | 28 ++++++++++++++++++++++
 sci-libs/openblas/openblas-0.3.30-r4.ebuild        |  2 ++
 2 files changed, 30 insertions(+)

diff --git a/sci-libs/openblas/files/openblas-0.3.30-arm-assembly.patch 
b/sci-libs/openblas/files/openblas-0.3.30-arm-assembly.patch
new file mode 100644
index 000000000000..b09db04fb4f6
--- /dev/null
+++ b/sci-libs/openblas/files/openblas-0.3.30-arm-assembly.patch
@@ -0,0 +1,28 @@
+From 8d11e4630c1e92437636d016f35ad48395b62b4f Mon Sep 17 00:00:00 2001
+From: Sertonix <[email protected]>
+Date: Sun, 6 Jul 2025 23:48:10 +0200
+Subject: [PATCH] Fix cpuid.S on arm
+
+The ARM assembly syntax differs a bit
+
+Fixes 61b9339d3a1f getarch/cpuid.S: Fix warning about executable stack
+
+Signed-off-by: Sertonix <[email protected]>
+---
+ cpuid.S | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/cpuid.S b/cpuid.S
+index 295917bdbe..a8f5f8b573 100644
+--- a/cpuid.S
++++ b/cpuid.S
+@@ -66,5 +66,9 @@ _cpuid:
+ 
+ #endif
+ #if defined(__ELF__) && defined(__linux__)
++#if defined(__arm__)
++        .section        .note.GNU-stack,"",%progbits
++#else
+         .section        .note.GNU-stack,"",@progbits
+ #endif
++#endif

diff --git a/sci-libs/openblas/openblas-0.3.30-r4.ebuild 
b/sci-libs/openblas/openblas-0.3.30-r4.ebuild
index 123e1422eae0..c6c72fa54cb9 100644
--- a/sci-libs/openblas/openblas-0.3.30-r4.ebuild
+++ b/sci-libs/openblas/openblas-0.3.30-r4.ebuild
@@ -34,6 +34,8 @@ PATCHES=(
        "${FILESDIR}/${P}-cmake_libdir.patch"
        # https://github.com/OpenMathLib/OpenBLAS/pull/5378
        "${FILESDIR}/${P}-lunar-lake.patch"
+       # https://github.com/OpenMathLib/OpenBLAS/pull/5360
+       "${FILESDIR}/${P}-arm-assembly.patch"
 )
 
 pkg_pretend() {

Reply via email to