build: explicitly enable sse4 for meson
If the compiler does not recognise the specific CPU when building with the default "native" machine type, sse4.2 instructions can be missing, causing a build error. Rather than advising the user to change the machine type, we can just turn on SSE4.2 directly. This can prevent issues with running automated tests with older compilers/distros on newer hardware. Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: David Marchand <david.marchand@redhat.com>
This commit is contained in:
parent
2e088e6f94
commit
10060dba64
@ -15,11 +15,9 @@ if not is_windows
|
||||
endif
|
||||
|
||||
# we require SSE4.2 for DPDK
|
||||
sse_errormsg = '''SSE4.2 instruction set is required for DPDK.
|
||||
Please set the machine type to "nehalem" or "corei7" or higher value'''
|
||||
|
||||
if cc.get_define('__SSE4_2__', args: machine_args) == ''
|
||||
error(sse_errormsg)
|
||||
message('SSE 4.2 not enabled by default, explicitly enabling')
|
||||
machine_args += '-msse4'
|
||||
endif
|
||||
|
||||
base_flags = ['SSE', 'SSE2', 'SSE3','SSSE3', 'SSE4_1', 'SSE4_2']
|
||||
|
Loading…
Reference in New Issue
Block a user