aboutsummaryrefslogtreecommitdiffstats
path: root/main/qemu/configure-ifunc.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/qemu/configure-ifunc.patch')
-rw-r--r--main/qemu/configure-ifunc.patch14
1 files changed, 14 insertions, 0 deletions
diff --git a/main/qemu/configure-ifunc.patch b/main/qemu/configure-ifunc.patch
new file mode 100644
index 0000000000..c047882ff4
--- /dev/null
+++ b/main/qemu/configure-ifunc.patch
@@ -0,0 +1,14 @@
+compiler supports ifunc but musl dynamic linker does not.
+
+--- ./configure.orig
++++ ./configure
+@@ -1787,7 +1787,8 @@
+ int main(void) { foo(); return 0; }
+ EOF
+ if compile_prog "-mavx2" "" ; then
+- if readelf --syms $TMPE |grep "IFUNC.*foo" >/dev/null 2>&1; then
++ if readelf --syms $TMPE |grep "IFUNC.*foo" >/dev/null 2>&1 &&
++ ldd $TMPE >/dev/null 2>&1; then
+ avx2_opt="yes"
+ fi
+ fi