https://bugs.kde.org/show_bug.cgi?id=527723
Bug ID: 527723
Summary: configure fails when cross-compiling 3.28.0: cannot
run test program (arm64 dotprod/crypto probes)
Classification: Developer tools
Product: valgrind
Version First unspecified
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 197592
--> https://bugs.kde.org/attachment.cgi?id=197592&action=edit
[PATCH] configure.ac: do not fail the arm64 test probes when cross-compiling
Since 3.28.0, configure aborts for any cross build, whatever the target
architecture:
- checking if armv82-a+dotprod is supported for tests... configure: error: in
'.../valgrind-3.28.0/.x86_64-libreelec-linux-gnu': configure: error: cannot run
test program while cross compiling
- 3.27.1 configures and builds fine with the same toolchains.
CAUSE
Two probes in configure.ac use AC_RUN_IFELSE without the fourth
(action-if-cross-compiling) argument:
- cd8a547aa "arm64: change configure dotprod test to a run test" (was
AC_COMPILE_IFELSE, so it worked when cross-compiling)
- 938c24838 "arm64: add a configure check for crypto support"
Neither is guarded by the target architecture, so an x86_64 cross build stops
on them as well as an arm64 one. They carry no cache variable either, so
packagers cannot preseed the answer.
FIX
The attached patch adds a cross-compiling action to both probes that answers
"no". The probes only set BUILD_ARMV82_DOTPROD_TESTS and
BUILD_ARMV8_CRYPTO_TESTS, which decide whether the matching regression
tests are built, and those tests cannot be run on the build host in a cross
build anyway. The installed valgrind is unchanged.
The patch applies to master (at VALGRIND_3_28_0). Tested by cross building
3.28.0 with the patch and autoreconf for x86_64, aarch64 and armv7 (LibreELEC,
gcc 16.1); configure now reports:
checking if armv82-a+dotprod is supported for tests... no (cross-compiling)
checking if armv8-a+crypto is supported for tests... no (cross-compiling)
STEPS TO REPRODUCE
1. ./configure --host=x86_64-linux-gnu --build=<different triple>
(any cross build)
2. configure stops at the dotprod probe.
--
You are receiving this mail because:
You are watching all bug changes.