[2/2] freebsd: always use clang for kmod compilation
diff mbox series

Message ID 20191112164136.70510-3-bruce.richardson@intel.com
State Accepted, archived
Delegated to: David Marchand
Headers show
  • small improvements for FreeBSD build
Related show


Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Bruce Richardson Nov. 12, 2019, 4:41 p.m. UTC
Clang is the system compiler for FreeBSD and kernel module builds can fail
when built with gcc, e.g. when testing with test-meson-builds.sh.
Therefore, it's safer to always use clang to build the kmods since the
actual flags used are outside of DPDK's control and cannot be guaranteed to
work with all compilers.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
 kernel/freebsd/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff mbox series

diff --git a/kernel/freebsd/meson.build b/kernel/freebsd/meson.build
index ab1177147..dc156a43f 100644
--- a/kernel/freebsd/meson.build
+++ b/kernel/freebsd/meson.build
@@ -26,7 +26,8 @@  foreach k:kmods
 			'KMOD=' + k,
-			'KMOD_CFLAGS=' + ' '.join(kmod_cflags)],
+			'KMOD_CFLAGS=' + ' '.join(kmod_cflags),
+			'CC=clang'],
 		depends: built_kmods, # make each module depend on prev
 		build_by_default: get_option('enable_kmods'),
 		install: get_option('enable_kmods'),