Skip to contentSkip to conversation

package/mesa3d: fix aarch64_be build

PATCH Applied Bernd Kuhls 2 participants 3 messages Feb 3 – Feb 13

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/mesa3d: fix aarch64_be build

Buildroot commit 1b8d7e7bedb204b6fb1094a57822a4652206b44a bumped the package to version 23.2.1 that contains the upstream commit
https://gitlab.freedesktop.org/mesa/mesa/-/commit/77826e835243291df664ccf2a7b8405287b72387#e65744354fdd7dd38342b138e59e40767cfcdaa9
which causes build errors on aarch64_be.

The build error was first seen by the autobuilders with mesa3d-23.3.3:
https://autobuild.buildroot.net/results/b62/b62eba2155b080ed02fde774994f2fffc8a6ef51/
according to https://autobuild.buildroot.net/?reason=mesa3d%&arch=aarch64_be

A backport to LTS branches should be considered.

Fixes:
https://autobuild.buildroot.net/results/efd/efd07d97df4e0c1ceb07fc26e17898afef5435b9/

---
 ...3_neon.c-only-for-little-endian-arch.patch | 47 +++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 package/mesa3d/0004-blake3-add-blake3_neon.c-only-for-little-endian-arch.patch
package/mesa3d/0004-blake3-add-blake3_neon.c-only-for-little-endian-arch.patch new file +47 -0
new file mode 100644
index 0000000000..5e4c89b714
@@ -0,0 +1,47 @@
+From c4292cc5af3278b294c2baa5464c9985228205fe Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <[email protected]>
+Date: Tue, 3 Feb 2026 20:13:49 +0100
+Subject: [PATCH] blake3: add blake3_neon.c only for little endian archs
+
+Fixes build error on big endian archs:
+
+Build machine cpu family: x86_64
+Build machine cpu: x86_64
+Host machine cpu family: aarch64
+Host machine cpu: cortex-a53
+Target machine cpu family: aarch64
+Target machine cpu: cortex-a53
+[...]
+../src/util/blake3/blake3_neon.c:6:2: error: #error "This implementation only supports little-endian ARM."
+    6 | #error "This implementation only supports little-endian ARM."
+
+as detected by buildroot autobuilders:
+https://autobuild.buildroot.net/results/efd/efd07d97df4e0c1ceb07fc26e17898afef5435b9/build-end.log
+
+For reference:
+$ grep -i endian output/build/mesa3d-25.3.4/buildroot-build/cross-compilation.conf
+endian = 'big'
+
+Upstream: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39681
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ src/util/blake3/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/util/blake3/meson.build b/src/util/blake3/meson.build
+index bd51cfb68c3..767da2c6ec3 100644
+--- a/src/util/blake3/meson.build
++++ b/src/util/blake3/meson.build
+@@ -35,7 +35,7 @@ elif cpu_family == 'x86'
+   # There are no assembly versions for 32-bit x86. Compiling the C versions require a different compilation flag per
+   # file, which is not well supported by Meson. Leave SIMD support out for now.
+   blake3_defs += blake3_x86_no_simd_defs
+-elif cpu_family == 'aarch64'
++elif cpu_family == 'aarch64' and target_machine.endian() == 'little'
+   files_blake3 += ['blake3_neon.c']
+ endif
+ 
+-- 
+2.47.3
+
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hello Bernd, All,

Le 03/02/2026 à 20:39, Bernd Kuhls a écrit :

Quoted 8 lines

Buildroot commit 1b8d7e7bedb204b6fb1094a57822a4652206b44a bumped the package to version 23.2.1 that contains the upstream commit
https://gitlab.freedesktop.org/mesa/mesa/-/commit/77826e835243291df664ccf2a7b8405287b72387#e65744354fdd7dd38342b138e59e40767cfcdaa9
which causes build errors on aarch64_be.

The build error was first seen by the autobuilders with mesa3d-23.3.3:
https://autobuild.buildroot.net/results/b62/b62eba2155b080ed02fde774994f2fffc8a6ef51/
according to https://autobuild.buildroot.net/?reason=mesa3d%&arch=aarch64_be

I just fixup the last link to:
https://autobuild.buildroot.net/?reason=mesa3d-25.3.4&arch=aarch64_be

Otherwise the list is empty.

Quoted 5 lines

A backport to LTS branches should be considered.

Fixes:
https://autobuild.buildroot.net/results/efd/efd07d97df4e0c1ceb07fc26e17898afef5435b9/

Issue reproduced locally, and upstream reviewed already your MR.

Applied to master, thanks.

Best regards,
Romain

Quoted 50 lines
---
 ...3_neon.c-only-for-little-endian-arch.patch | 47 +++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 package/mesa3d/0004-blake3-add-blake3_neon.c-only-for-little-endian-arch.patch
package/mesa3d/0004-blake3-add-blake3_neon.c-only-for-little-endian-arch.patch new file +37 -0
new file mode 100644
index 0000000000..5e4c89b714
@@ -0,0 +1,47 @@
+From c4292cc5af3278b294c2baa5464c9985228205fe Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <[email protected]>
+Date: Tue, 3 Feb 2026 20:13:49 +0100
+Subject: [PATCH] blake3: add blake3_neon.c only for little endian archs
+
+Fixes build error on big endian archs:
+
+Build machine cpu family: x86_64
+Build machine cpu: x86_64
+Host machine cpu family: aarch64
+Host machine cpu: cortex-a53
+Target machine cpu family: aarch64
+Target machine cpu: cortex-a53
+[...]
+../src/util/blake3/blake3_neon.c:6:2: error: #error "This implementation only supports little-endian ARM."
+    6 | #error "This implementation only supports little-endian ARM."
+
+as detected by buildroot autobuilders:
+https://autobuild.buildroot.net/results/efd/efd07d97df4e0c1ceb07fc26e17898afef5435b9/build-end.log
+
+For reference:
+$ grep -i endian output/build/mesa3d-25.3.4/buildroot-build/cross-compilation.conf
+endian = 'big'
+
+Upstream: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39681
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ src/util/blake3/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/util/blake3/meson.build b/src/util/blake3/meson.build
+index bd51cfb68c3..767da2c6ec3 100644
+--- a/src/util/blake3/meson.build
++++ b/src/util/blake3/meson.build
+@@ -35,7 +35,7 @@ elif cpu_family == 'x86'
+   # There are no assembly versions for 32-bit x86. Compiling the C versions require a different compilation flag per

package/mesa3d/0004-blake3-add-blake3_neon.c-only-for-little-endian-arch.patch line 47

Quoted 10 lines
package/mesa3d/0004-blake3-add-blake3_neon.c-only-for-little-endian-arch.patch new file +10 -0
+   # file, which is not well supported by Meson. Leave SIMD support out for now.
+   blake3_defs += blake3_x86_no_simd_defs
+-elif cpu_family == 'aarch64'
++elif cpu_family == 'aarch64' and target_machine.endian() == 'little'
+   files_blake3 += ['blake3_neon.c']
+ endif
+ 
+-- 
+2.47.3
+

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
In reply to Bernd Kuhls

In reply of:

Quoted 9 lines

Buildroot commit 1b8d7e7bedb204b6fb1094a57822a4652206b44a bumped the package to version 23.2.1 that contains the upstream commit
https://gitlab.freedesktop.org/mesa/mesa/-/commit/77826e835243291df664ccf2a7b8405287b72387#e65744354fdd7dd38342b138e59e40767cfcdaa9
which causes build errors on aarch64_be.

The build error was first seen by the autobuilders with mesa3d-23.3.3:
https://autobuild.buildroot.net/results/b62/b62eba2155b080ed02fde774994f2fffc8a6ef51/
according to https://autobuild.buildroot.net/?reason=mesa3d%&arch=aarch64_be

Quoted 6 lines

A backport to LTS branches should be considered.

Fixes:
https://autobuild.buildroot.net/results/efd/efd07d97df4e0c1ceb07fc26e17898afef5435b9/

Applied to 2025.02.x & 2025.11.x. Thanks

Quoted 65 lines
---
 ...3_neon.c-only-for-little-endian-arch.patch | 47 +++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 package/mesa3d/0004-blake3-add-blake3_neon.c-only-for-little-endian-arch.patch
package/mesa3d/0004-blake3-add-blake3_neon.c-only-for-little-endian-arch.patch new file +47 -0
new file mode 100644
index 0000000000..5e4c89b714
@@ -0,0 +1,47 @@
+From c4292cc5af3278b294c2baa5464c9985228205fe Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <[email protected]>
+Date: Tue, 3 Feb 2026 20:13:49 +0100
+Subject: [PATCH] blake3: add blake3_neon.c only for little endian archs
+
+Fixes build error on big endian archs:
+
+Build machine cpu family: x86_64
+Build machine cpu: x86_64
+Host machine cpu family: aarch64
+Host machine cpu: cortex-a53
+Target machine cpu family: aarch64
+Target machine cpu: cortex-a53
+[...]
+../src/util/blake3/blake3_neon.c:6:2: error: #error "This implementation only supports little-endian ARM."
+    6 | #error "This implementation only supports little-endian ARM."
+
+as detected by buildroot autobuilders:
+https://autobuild.buildroot.net/results/efd/efd07d97df4e0c1ceb07fc26e17898afef5435b9/build-end.log
+
+For reference:
+$ grep -i endian output/build/mesa3d-25.3.4/buildroot-build/cross-compilation.conf
+endian = 'big'
+
+Upstream: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39681
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ src/util/blake3/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/util/blake3/meson.build b/src/util/blake3/meson.build
+index bd51cfb68c3..767da2c6ec3 100644
+--- a/src/util/blake3/meson.build
++++ b/src/util/blake3/meson.build
+@@ -35,7 +35,7 @@ elif cpu_family == 'x86'
+   # There are no assembly versions for 32-bit x86. Compiling the C versions require a different compilation flag per
+   # file, which is not well supported by Meson. Leave SIMD support out for now.
+   blake3_defs += blake3_x86_no_simd_defs
+-elif cpu_family == 'aarch64'
++elif cpu_family == 'aarch64' and target_machine.endian() == 'little'
+   files_blake3 += ['blake3_neon.c']
+ endif
+ 
+-- 
+2.47.3
+
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot