summaryrefslogtreecommitdiff
path: root/header_checks
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-11-16 17:37:22 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-11-16 21:14:52 +0000
commit3750dac5034a69bb556604993e180a2dd3e9b6c6 (patch)
tree5a68f5b4aab0dfb2545544462f78f50f0c4b6eb1 /header_checks
parentaf59a63c473ee9b726050b0331643bbf6c3ad76d (diff)
meson - fix build on non-intel and correct cross compilation
don't set -msse3 unconditionally - set the correct flags based on architecture. now it builds on arm, aarch64 again as well as x86. sorry - can't test ppc as i have no such hardware. also use host_machine not target_machine. target is wrong that's only for cross compilers (if we were compiling a cross compiler and the kind of binary they may produce, not what they run on - that's host).
Diffstat (limited to 'header_checks')
-rw-r--r--header_checks/meson.build8
1 files changed, 4 insertions, 4 deletions
diff --git a/header_checks/meson.build b/header_checks/meson.build
index cb47b040d4..0b4ffe35fc 100644
--- a/header_checks/meson.build
+++ b/header_checks/meson.build
@@ -1,11 +1,11 @@
1if get_option('native-arch-optimization') 1if get_option('native-arch-optimization')
2 if target_machine.cpu_family() == 'x86' or target_machine.cpu_family() == 'x86_64' 2 if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64'
3 native_header = 'immintrin.h' 3 native_header = 'immintrin.h'
4 elif target_machine.cpu_family() == 'arm' 4 elif host_machine.cpu_family() == 'arm'
5 native_header = 'arm_neon.h' 5 native_header = 'arm_neon.h'
6 elif target_machine.cpu_family() == 'aarch64' 6 elif host_machine.cpu_family() == 'aarch64'
7 native_header = 'arm_neon.h' 7 native_header = 'arm_neon.h'
8 elif target_machine.cpu_family() == 'ppc' or target_machine.cpu_family() == 'ppc64' 8 elif host_machine.cpu_family() == 'ppc' or host_machine.cpu_family() == 'ppc64'
9 native_header = 'altivec.h' 9 native_header = 'altivec.h'
10 endif 10 endif
11 11