[dpdk-dev] [PATCH 1/2] build: fix kernel compile on cross-build

Hemant Agrawal hemant.agrawal at nxp.com
Thu Apr 19 17:46:14 CEST 2018


> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Bruce Richardson
> 
> When cross-compiling, if no kernel_dir was specified, then the kernel modules
> were still being compiled for the build machine. Fix this by only building modules
> on cross-compile when we have a kernel_dir value set.
> 
> Fixes: a52f4574f798 ("igb_uio: build with meson")
> 
> Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
> ---
>  meson.build | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/meson.build b/meson.build
> index cc16595cb..9e3b44931 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -26,10 +26,14 @@ subdir('config')
> 
>  # build libs and drivers
>  subdir('lib')
> -subdir('kernel')
>  subdir('buildtools')
>  subdir('drivers')
> 
> +# build kernel modules if we have a kernel path, or we are not cross
> +compiling if get_option('kernel_dir') != '' or not meson.is_cross_build()
> +	subdir('kernel')
> +endif

[Hemant] actually kernel_dir may not be always available on host.
 So unless kernel_dir is available - irrespective of host/cross - it 
 shall not try kernel compilation. 

> +
>  # build binaries and installable tools
>  subdir('usertools')
>  subdir('app')
> --
> 2.14.3



More information about the dev mailing list