build: fix for host clang and cross gcc
[dpdk.git] / lib / meson.build
index fcc3e8d..fefb360 100644 (file)
@@ -34,6 +34,10 @@ foreach l:libraries
        headers = []
        includes = []
        cflags = machine_args
+       if cc.has_argument('-Wno-format-truncation')
+           cflags += '-Wno-format-truncation'
+       endif
+
        objs = [] # other object files to link against, used e.g. for
                  # instruction-set optimized versions of code
 
@@ -95,7 +99,7 @@ foreach l:libraries
 
                        # then use pre-build objects to build shared lib
                        sources = []
-                       objs += static_lib.extract_all_objects()
+                       objs += static_lib.extract_all_objects(recursive: false)
                        version_map = '@0@/@1@/rte_@2@_version.map'.format(
                                        meson.current_source_dir(), dir_name, name)
                        shared_lib = shared_library(libname,