X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=config%2Fx86%2Fmeson.build;h=7504cb9e5cf79e9037ecbd96f5daaadd4dca0724;hb=2a28a502c6078ceb3e5b296b5f9cbb7e27ceedbd;hp=33efb5e54761ff141cb115cb60fa3c00a2e730bc;hpb=6c9457c27954f16d99f3798711eb253fbaf05fa3;p=dpdk.git diff --git a/config/x86/meson.build b/config/x86/meson.build index 33efb5e547..7504cb9e5c 100644 --- a/config/x86/meson.build +++ b/config/x86/meson.build @@ -2,7 +2,16 @@ # Copyright(c) 2017 Intel Corporation # for checking defines we need to use the correct compiler flags -march_opt = '-march=@0@'.format(machine) +march_opt = ['-march=@0@'.format(machine)] + +# get binutils version for the workaround of Bug 97 +ldver = run_command('ld', '-v').stdout().strip() +if ldver.contains('2.30') + if cc.has_argument('-mno-avx512f') + march_opt += '-mno-avx512f' + message('Binutils 2.30 detected, disabling AVX512 support as workaround for bug #97') + endif +endif # we require SSE4.2 for DPDK sse_errormsg = '''SSE4.2 instruction set is required for DPDK. @@ -19,10 +28,9 @@ foreach f:base_flags endforeach dpdk_conf.set('RTE_ARCH_X86', 1) -if (host_machine.cpu_family() == 'x86_64') +if dpdk_conf.get('RTE_ARCH_64') dpdk_conf.set('RTE_ARCH_X86_64', 1) dpdk_conf.set('RTE_ARCH', 'x86_64') - dpdk_conf.set('RTE_ARCH_64', 1) else dpdk_conf.set('RTE_ARCH_I686', 1) dpdk_conf.set('RTE_ARCH', 'i686')