Skip to contentSkip to conversation

configure: Don't run AVX optimization requirement check on Mac OS X

PATCH In review Stefan Weil 2 participants 2 messages Jun 18, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: Don't run AVX optimization requirement check on Mac OS X

The test currently only works with ELF and requires readelf, but OS X does not use ELF binaries.

---
 configure | 7 +++++++
 1 file changed, 7 insertions(+)
configure +7 -0
index 10cb212..89ffd28 100755
@@ -1778,6 +1778,11 @@ fi
 ##########################################
 # avx2 optimization requirement check
 
+# This check currently only works for hosts with ELF,
+# so don't run it on Darwin.
+
+if [ "$darwin" != "yes" ] ; then
+
 cat > $TMPC << EOF
 #pragma GCC push_options
 #pragma GCC target("avx2")
@@ -1797,6 +1802,8 @@ if compile_object "" ; then
     fi
 fi
 
+fi # "$darwin" != "yes"
+
 #########################################
 # zlib check
 
Signature · 1 line
2.1.4
#1 lore raw
Quoted 7 lines · Stefan Weil

The test currently only works with ELF and requires readelf, but OS X does not use ELF binaries.

---
 configure | 7 +++++++
 1 file changed, 7 insertions(+)

Would be neater to use "if has readelf" I think, rather than making it OS specific. (I assume readelf itself does the right thing if fed a non-ELF object, or we'd already be breaking windows builds.)

thanks
-- PMM