[dpdk-stable] [PATCH] net/dpaa2: fix build error about timesync functions
Ferruh Yigit
ferruh.yigit at intel.com
Wed Sep 16 17:29:13 CEST 2020
On 9/15/2020 3:40 AM, Chenxu Di wrote:
> When the build option has '-DRTE_LIBRTE_IEEE1588=1',
> the announce of timesync functions will be build.
> However the dpdk_conf doesn't hav RTE_LIBRTE_IEEE1588
> so that the file dpaa2_ptp.c will not be build.
> It cause the build error.
> This patch fixes it by adding set for dpdk_conf.
>
> Fixes: 184c39d16568 ("net/dpaa2: add DPRTC sub-module")
> Cc: stable at dpdk.org
>
> Signed-off-by: Chenxu Di <chenxux.di at intel.com>
> ---
> drivers/net/dpaa2/meson.build | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/dpaa2/meson.build b/drivers/net/dpaa2/meson.build
> index 6dd0eb274..d9aadfdae 100644
> --- a/drivers/net/dpaa2/meson.build
> +++ b/drivers/net/dpaa2/meson.build
> @@ -17,6 +17,10 @@ sources = files('base/dpaa2_hw_dpni.c',
> 'mc/dpdmux.c',
> 'mc/dpni.c')
>
> +if '-DRTE_LIBRTE_IEEE1588=1' in get_option('c_args')
The "RTE_LIBRTE_IEEE1588=1" can fail,
all places looking for "#ifdef RTE_LIBRTE_IEEE1588", so a
"-Dc_args=-DRTE_LIBRTE_IEEE1588" is more likely,
but why not "-Dc_args=-DRTE_LIBRTE_IEEE1588=666"
> + dpdk_conf.set('RTE_LIBRTE_IEEE1588', 1)
> +endif
> +
> if dpdk_conf.has('RTE_LIBRTE_IEEE1588')
> sources += files('mc/dprtc.c')
> sources += files('dpaa2_ptp.c')
>
Can't we just remove the conditional build:
-if dpdk_conf.has('RTE_LIBRTE_IEEE1588')
- sources += files('mc/dprtc.c')
- sources += files('dpaa2_ptp.c')
-endif
+sources += files('mc/dprtc.c')
+sources += files('dpaa2_ptp.c')
More information about the stable
mailing list