diff mbox

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

Message ID 1466279349-28865-1-git-send-email-sw@weilnetz.de
State New
Headers show

Commit Message

Stefan Weil June 18, 2016, 7:49 p.m. UTC
The test currently only works with ELF and requires readelf,
but OS X does not use ELF binaries.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 configure | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Peter Maydell June 18, 2016, 8:45 p.m. UTC | #1
On 18 June 2016 at 20:49, Stefan Weil <sw@weilnetz.de> wrote:
> The test currently only works with ELF and requires readelf,
> but OS X does not use ELF binaries.
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  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
diff mbox

Patch

diff --git a/configure b/configure
index 10cb212..89ffd28 100755
--- a/configure
+++ b/configure
@@ -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