path: root/config
diff options
authorGavin Hu <>2018-06-30 01:27:37 +0800
committerThomas Monjalon <>2018-07-11 21:14:21 +0200
commitd292a42fc86b6b3ab69abb36f3112720cceb0b4b (patch)
tree9481b6772f02464148db81ef88d4e4c5d2afb8e8 /config
parentc0d022070f7c7a77c1a47fee55f971b2afb763d4 (diff)
build: fix for host clang and cross gcc
The following error hits if host cc compiler is clang(default one in most linux distributions) and the cross compiler is gcc. The root cause is: the hybride compilers add the warning options to the meson project as project arguments, which apply for both host compiling and cross compiling. But some options such as '-Wno-format-truncation' are not supported nor recognized by clang, so they have to be removed from the project arguments for the host compiler to run smoothily and added back as cflags for the cross compiler to compile for cross source files. The fix is remove unrecognized warning options from the meson project arguments shared by gcc and clang, as add them specifically for gcc or clang as cflags. [265/893] Compiling C object 'buildtools/pmdinfogen/pmdinfogen@exe/pmdinfogen.c.o'. warning: unknown warning option '-Wno-format-truncation' [-Wunknown-warning-option] Fixes: a55277a788 ("devtools: add test script for meson builds") Cc: Signed-off-by: Gavin Hu <> Reviewed-by: Phil Yang <> Reviewed-by: Song Zhu <> Reviewed-by: Steve Capper <> Acked-by: Bruce Richardson <>
Diffstat (limited to 'config')
1 files changed, 1 insertions, 2 deletions
diff --git a/config/ b/config/
index 50081b5..272d4a8 100644
--- a/config/
+++ b/config/
@@ -57,8 +57,7 @@ add_project_arguments('-include', 'rte_config.h', language: 'c')
warning_flags = [
- '-Wno-address-of-packed-member',
- '-Wno-format-truncation'
+ '-Wno-address-of-packed-member'
foreach arg: warning_flags
if cc.has_argument(arg)