[v2] net/dpaa2: fix build error about timesync functions

Message ID 20200917084357.14717-1-chenxux.di@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers
Series [v2] net/dpaa2: fix build error about timesync functions |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-testing success Testing PASS
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK

Commit Message

Chenxu Di Sept. 17, 2020, 8:43 a.m. UTC
  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@dpdk.org

Signed-off-by: Chenxu Di <chenxux.di@intel.com>
---
 drivers/net/dpaa2/meson.build | 6 ++++++
 1 file changed, 6 insertions(+)
  

Comments

Hemant Agrawal Sept. 17, 2020, 11:48 a.m. UTC | #1
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

On 9/17/2020 2:13 PM, 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@dpdk.org
>
> Signed-off-by: Chenxu Di <chenxux.di@intel.com>
> ---
>   drivers/net/dpaa2/meson.build | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/drivers/net/dpaa2/meson.build b/drivers/net/dpaa2/meson.build
> index 6dd0eb274..43d625dc5 100644
> --- a/drivers/net/dpaa2/meson.build
> +++ b/drivers/net/dpaa2/meson.build
> @@ -17,6 +17,12 @@ sources = files('base/dpaa2_hw_dpni.c',
>   		'mc/dpdmux.c',
>   		'mc/dpni.c')
>   
> +foreach each:get_option('c_args')
> +	if each.contains('-DRTE_LIBRTE_IEEE1588')
> +		dpdk_conf.set('RTE_LIBRTE_IEEE1588', 1)
> +	endif
> +endforeach
> +
>   if dpdk_conf.has('RTE_LIBRTE_IEEE1588')
>   	sources += files('mc/dprtc.c')
>   	sources += files('dpaa2_ptp.c')
  

Patch

diff --git a/drivers/net/dpaa2/meson.build b/drivers/net/dpaa2/meson.build
index 6dd0eb274..43d625dc5 100644
--- a/drivers/net/dpaa2/meson.build
+++ b/drivers/net/dpaa2/meson.build
@@ -17,6 +17,12 @@  sources = files('base/dpaa2_hw_dpni.c',
 		'mc/dpdmux.c',
 		'mc/dpni.c')
 
+foreach each:get_option('c_args')
+	if each.contains('-DRTE_LIBRTE_IEEE1588')
+		dpdk_conf.set('RTE_LIBRTE_IEEE1588', 1)
+	endif
+endforeach
+
 if dpdk_conf.has('RTE_LIBRTE_IEEE1588')
 	sources += files('mc/dprtc.c')
 	sources += files('dpaa2_ptp.c')