Skip to contentSkip to conversation

small improvements for FreeBSD build

PATCH In review Bruce Richardson 3 participants 5 messages Nov 12, 2019 – Nov 20, 2019 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

cover small improvements for FreeBSD build

Two small changes to improve FreeBSD build and install with meson

Bruce Richardson (2):
freebsd: allow installing kernel modules
freebsd: always use clang for kmod compilation

 kernel/freebsd/meson.build | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Signature · 1 line
2.22.0
#1 lore raw

PATCH 1/2 freebsd: allow installing kernel modules

Set the install path for the kernel modules as /boot/modules. This may ease the integration with the official FreeBSD ports system as all components should be correctly located in the staging directory after running "ninja install"

---
 kernel/freebsd/meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
kernel/freebsd/meson.build +3 -1
index 336083c48..ab1177147 100644
@@ -28,5 +28,7 @@ foreach k:kmods
 			'KMOD=' + k,
 			'KMOD_CFLAGS=' + ' '.join(kmod_cflags)],
 		depends: built_kmods, # make each module depend on prev
-		build_by_default: get_option('enable_kmods'))
+		build_by_default: get_option('enable_kmods'),
+		install: get_option('enable_kmods'),
+		install_dir: '/boot/modules/')
 endforeach
Signature · 1 line
2.22.0
#2 lore raw

PATCH 2/2 freebsd: always use clang for kmod compilation

In reply to Bruce Richardson

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.

---
 kernel/freebsd/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/freebsd/meson.build +2 -1
index ab1177147..dc156a43f 100644
@@ -26,7 +26,8 @@ foreach k:kmods
 			'KMOD_OBJDIR=@OUTDIR@',
 			'KMOD_SRC=@INPUT1@',
 			'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'),
Signature · 1 line
2.22.0
#3 lore raw
In reply to Bruce Richardson
Quoted 8 lines · Bruce Richardson

Two small changes to improve FreeBSD build and install with meson

Bruce Richardson (2):
freebsd: allow installing kernel modules
freebsd: always use clang for kmod compilation

 kernel/freebsd/meson.build | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Signature · 2 lines
Kind regards,
Luca Boccassi
#4 lore raw
Quoted 4 lines · Luca Boccassi
Quoted 2 lines · Bruce Richardson

Two small changes to improve FreeBSD build and install with meson

Quoted 8 lines
Quoted 6 lines

Bruce Richardson (2):
freebsd: allow installing kernel modules
freebsd: always use clang for kmod compilation

 kernel/freebsd/meson.build | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Series applied, thanks.

Signature · 1 line
David Marchand