void-packages/srcpkgs/mold/patches/test-target-machine.patch

18 lines
457 B
Diff

Allow tests to run when targeting i686 on a host where uname -m returns x86_64.
diff --git a/test/elf/common.inc b/test/elf/common.inc
index 8d5407a827f..8299c1dd7ac 100644
--- a/test/elf/common.inc
+++ b/test/elf/common.inc
@@ -14,7 +14,9 @@ canonical_name() {
esac
}
-if [ -z "$MACHINE" ]; then
+if [ -n "$XBPS_TARGET_MACHINE" ]; then
+ MACHINE=$(canonical_name "${XBPS_TARGET_MACHINE%-musl}")
+else
MACHINE=$(canonical_name $(uname -m))
fi