patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] acl: fix missing flags when compiling without AVX2
@ 2019-03-11 15:00 Andrius Sirvys
  0 siblings, 0 replies; only message in thread
From: Andrius Sirvys @ 2019-03-11 15:00 UTC (permalink / raw)
  To: dev; +Cc: stable, Andrius Sirvys, bruce.richardson

When compiling the ACL library on a system without AVX2 support,
the flags used to compile the AVX2-specific code for later run-time
use were not based on the regular cflags for the rest of the library.
This can cause errors due to symbols being missed/undefined due to incorrect
flags. For example, when testing compilation on Alpine linux, we got:
	error: unknown type name 'cpu_set_t'
due to _GNU_SOURCE not being defined in the cflags.

This issue can be fixed by appending "-mavx2" to
the cflags rather than replacing them with it.

Fixes: 5b9656b157d3 ("lib: build with meson")
Cc: stable@dpdk.org

Signed-off-by: Andrius Sirvys <andrius.sirvys@intel.com>
---
Cc: bruce.richardson@intel.com
---
 lib/librte_acl/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_acl/meson.build b/lib/librte_acl/meson.build
index aec792f..c7f2ba1 100644
--- a/lib/librte_acl/meson.build
+++ b/lib/librte_acl/meson.build
@@ -23,7 +23,7 @@ if arch_subdir == 'x86'
 		avx2_tmplib = static_library('avx2_tmp',
 				'acl_run_avx2.c',
 				dependencies: static_rte_eal,
-				c_args: '-mavx2')
+				c_args: clfags +  ['-mavx2'])
 		objs += avx2_tmplib.extract_objects('acl_run_avx2.c')
 		cflags += '-DCC_AVX2_SUPPORT'
 	endif
-- 
2.7.4

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-03-11 15:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-11 15:00 [dpdk-stable] [PATCH] acl: fix missing flags when compiling without AVX2 Andrius Sirvys

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).