From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 24DB8A04B5;
	Wed, 16 Sep 2020 17:29:23 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 6DE981C2F7;
	Wed, 16 Sep 2020 17:29:22 +0200 (CEST)
Received: from mga09.intel.com (mga09.intel.com [134.134.136.24])
 by dpdk.org (Postfix) with ESMTP id 4EA891C2F0;
 Wed, 16 Sep 2020 17:29:20 +0200 (CEST)
IronPort-SDR: To4ye3sdDMr9XOB5h/Fu0r6esmX1RTrJzycp8PMet/zo/iBXoIuRlw/wgWYOkbtA/qklla/C1T
 JJeNjahopt1w==
X-IronPort-AV: E=McAfee;i="6000,8403,9746"; a="160420539"
X-IronPort-AV: E=Sophos;i="5.76,433,1592895600"; d="scan'208";a="160420539"
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga005.jf.intel.com ([10.7.209.41])
 by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 16 Sep 2020 08:29:19 -0700
IronPort-SDR: nSR7sHk7KlwpL28azvT2r21OAUUUfdok0uS/thXE4w/SYK8YmilolQonq5crG18PdlPP7Fr6xI
 5ORvhEGF1s9w==
X-IronPort-AV: E=Sophos;i="5.76,433,1592895600"; d="scan'208";a="483353153"
Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.248.202])
 ([10.213.248.202])
 by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 16 Sep 2020 08:29:17 -0700
To: Chenxu Di <chenxux.di@intel.com>, hemant.agrawal@nxp.com
Cc: sachin.saxena@nxp.com, stable@dpdk.org, dev@dpdk.org,
 Bruce Richardson <bruce.richardson@intel.com>
References: <20200915024055.72103-1-chenxux.di@intel.com>
From: Ferruh Yigit <ferruh.yigit@intel.com>
Message-ID: <974e79a6-6a52-c84c-6ae2-cf802e551444@intel.com>
Date: Wed, 16 Sep 2020 16:29:13 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
 Thunderbird/78.2.2
MIME-Version: 1.0
In-Reply-To: <20200915024055.72103-1-chenxux.di@intel.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] net/dpaa2: fix build error
 about timesync functions
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

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@dpdk.org
> 
> Signed-off-by: Chenxu Di <chenxux.di@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')