]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Bug 480126 - Build failure on Raspberry Pi 5 / OS 6.1.0-rpi7-rpi-v8
authorPaul Floyd <pjfloyd@wanadoo.fr>
Sun, 21 Jan 2024 20:33:06 +0000 (21:33 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Sun, 21 Jan 2024 20:33:06 +0000 (21:33 +0100)
The problem is that the Pi 3+ with raspbian has a 64bit aarch64 OS
but a 32bit gnueabihf userland. If you just run "configure" the
result will be an attempt to use 32-bit GCC with the ARM64 Valgrind
platform, which will fail.

This can be fixed by using the appropriate --host= option.
I've updated README.aarch64 with a description of this.

I've also changed configure.ac to take "arm*" for the
ARM platform (previously it was "armv7*"). That's been
a patch on Debian for a while. It will allow building
on older arm hardware and also armv8 (used on the
Raspberry Pi 3 and later models).

NEWS
README.aarch64
configure.ac

diff --git a/NEWS b/NEWS
index 1aaea801141d4b3c34a2297d7485aed0c17356c3..5f1f2f5d959e27e19cdf23df161b8eb6e45d0bef 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -52,6 +52,7 @@ are not entered into bugzilla tend to get forgotten about or ignored.
 478837  valgrind fails to read debug info for rust binaries
 479041  Executables without RW sections do not trigger debuginfo reading
 480052  WARNING: unhandled amd64-freebsd syscall: 580
+480126  Build failure on Raspberry Pi 5 / OS 6.1.0-rpi7-rpi-v8
 n-i-bz  Add redirect for memccpy
 
 To see details of a given bug, visit
index 2d6c93602fb7390243d9c7b5e207bd6862c6a77b..1a74d9d015ed096b77ecd4661aaf048149024c3a 100644 (file)
@@ -238,3 +238,25 @@ inline scalar code
 
 
 chainXDirect_ARM64: use direct jump forms when possible
+
+
+Raspberry Pi
+~~~~~~~~~~~~
+
+The Raspberry Pi since version 3 has had 64 bit hardware (aarch64). However,
+Raspberry Pi OS (formerly raspbian) has a 32-bit userland. You can check
+this using commands like file, ldd or readelf. For instance,
+
+$ file -L `which gcc`
+/usr/bin/gcc: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, BuildID[sha1]=6cfb4b75e1e265eb5a05ef0a1915bca9bae34674, for GNU/Linux 3.2.0, stripped
+
+As a consequence, if you try to run just "configure" it will detect aarch64 and
+select the "arm64" target, which is incorrect for the 32-bit userland.
+
+Instead you should run
+
+configure --host=armv8-unknown-linux
+
+That will override the aarch64 detection and result in a 32bit build of
+Valgrind for the "arm" target.
+
index 5d491b9c3bc4a0599fda8b55f9cd47caff61ff4e..2acb7023e29c7da34cc063210a99fde88a2dc14b 100755 (executable)
@@ -271,7 +271,7 @@ case "${host_cpu}" in
         ARCH_MAX="s390x"
         ;;
 
-     armv7*)
+     arm*)
        AC_MSG_RESULT([ok (${host_cpu})])
        ARCH_MAX="arm"
        ;;