From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id AD871A0548;
	Thu,  2 Jun 2022 14:01:05 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 67C0940691;
	Thu,  2 Jun 2022 14:01:04 +0200 (CEST)
Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com
 [209.85.160.178])
 by mails.dpdk.org (Postfix) with ESMTP id 2D3524021E
 for <dev@dpdk.org>; Thu,  2 Jun 2022 14:01:03 +0200 (CEST)
Received: by mail-qt1-f178.google.com with SMTP id x7so3183114qta.6
 for <dev@dpdk.org>; Thu, 02 Jun 2022 05:01:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=AAufecULCw7Ou58CbS3iINnwn0PLdEyh7Bf4JnnZoyU=;
 b=BU9vrGzwlcV0PLruda8rQP1d5cKyJwbRq/my/EEcqUaHt7ipjIpBLf29yjxOlYsUsV
 umdzHw0fxYcwDYXFi6+iwe0xLOX1LzQLKw87IzxTIwar7YcaOGcsGLVlNzs6D1ACdCAN
 yoirWRQTFW41ISKqmcyoqw6se0mbcclwFwl6pj5jakNyqiV5LjLfV01dgM+7yCd59er/
 SkIwprgSe3k+lVSZbwaWwU9kHg1S8bhIusc2NpgSloWV32KmvYzPAnGh4+3IkhKiMfQd
 edr3db/qEY5teI8t5EfqW4XQdaeQejVq92Kbq7T47m11ij0EF26hOEXTUe1ZsKiKfvx+
 9ybg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=AAufecULCw7Ou58CbS3iINnwn0PLdEyh7Bf4JnnZoyU=;
 b=owGeQC4G0bnH7rXWSia04IcGBaULfatuKpj8m7vSAqjWRmKVwTcic2hi0lQ5ZbrkdX
 zmAfjtowzmU+2wGDhL3M5occ1kUZ/YI6P4048fHmn9RXqTDyjS0DY4krnFH5e1/tiM2R
 E1XGBQjgqNP90It6wU6pXpCC/6o8YkVIi6CshquPdkMNmKaX5alVYqOXTLqEqJm+SjJ1
 37wTKP3/e47RM5qkKp7Tl+9zacE3GHZZxLMH63tGu+pmpViw2AHjX5e0rB6/LfY6PvUA
 OZyHbEL6d9kehaLsYDWUDAOkeL7iTPbsItZFHLob7oBm2RFaZ3yW77lJVjRRcZx6Ocdy
 A0wg==
X-Gm-Message-State: AOAM53332XGyRnwBt9wvpFFPGycjGEHKMkevXCYeZnz+z0z5KER10et4
 8v5VyNV45y8BcA64AMrjc6ZxgW9t8+sCQ9qMwHk=
X-Google-Smtp-Source: ABdhPJz3ZlqwHesRdNDRfp2joUV047no4oSY797I/1Nb6AuTVwC7MTCO1YdcchbVIUTNy60jXozZsvl+uLfh43hl0Jg=
X-Received: by 2002:a05:622a:15c8:b0:300:a48f:f628 with SMTP id
 d8-20020a05622a15c800b00300a48ff628mr3215590qty.502.1654171262569; Thu, 02
 Jun 2022 05:01:02 -0700 (PDT)
MIME-Version: 1.0
References: <20220602092356.2788089-1-jerinj@marvell.com>
 <YpiFudOnPLJLp4Ol@bricha3-MOBL.ger.corp.intel.com>
 <CALBAE1N7m7x6SeZ9fZW9JA8OFR6jVoXj19iC7sLgQyr9giaKnA@mail.gmail.com>
 <7385990.EvYhyI6sBW@thomas>
In-Reply-To: <7385990.EvYhyI6sBW@thomas>
From: Jerin Jacob <jerinjacobk@gmail.com>
Date: Thu, 2 Jun 2022 17:30:36 +0530
Message-ID: <CALBAE1Pq+dMpR45y659w0TCdJud-UJ=uJdW43aepvEW7ZJB34g@mail.gmail.com>
Subject: Re: [dpdk-dev] [PATCH v1] build: ccache support for cross build
To: Thomas Monjalon <thomas@monjalon.net>
Cc: Bruce Richardson <bruce.richardson@intel.com>,
 Jerin Jacob <jerinj@marvell.com>, 
 dpdk-dev <dev@dpdk.org>, Ruifeng Wang <ruifeng.wang@arm.com>, 
 Jan Viktorin <viktorin@rehivetech.com>,
 David Christensen <drc@linux.vnet.ibm.com>, 
 Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,
 David Marchand <david.marchand@redhat.com>, 
 =?UTF-8?Q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>, 
 fengchengwen <fengchengwen@huawei.com>
Content-Type: text/plain; charset="UTF-8"
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
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

On Thu, Jun 2, 2022 at 4:25 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 02/06/2022 11:43, Jerin Jacob:
> > On Thu, Jun 2, 2022 at 3:11 PM Bruce Richardson
> > <bruce.richardson@intel.com> wrote:
> > >
> > > On Thu, Jun 02, 2022 at 02:53:55PM +0530, jerinj@marvell.com wrote:
> > > > From: Jerin Jacob <jerinj@marvell.com>
> > > >
> > > > By default, ccache is not used for cross build[1].
> > > > Update all cross files to use ccache if it is available
> > > > in build machine.
> > > >
> > > > [1]
> > > > https://mesonbuild.com/Machine-files.html
> > > >
> > > > Signed-off-by: Jerin Jacob <jerinj@marvell.com>
> > >
> > > Does this still work even if ccache is not available? That's not fully
> >
> > Yes.
> >
> > > clear from the docs, but it seems to be that if an array is passed the
> > > whole array is used as the command, rather than just one element of the
> > > array. That would imply that cross-builds now require ccache. Is that
> > > acceptable?
> >
> > I have removed ccache from the build machine still it works.
>
> I don't understand why it works without ccache.

Meson is detecting valid compiler prefix. ccache is one of them.

See
https://github.com/fabio-porcedda/meson/commit/44db495f5ece43645ca3994dc95895c76a828530
https://github.com/mesonbuild/meson/issues/1392



>
> In general, I would prefer we have a mechanism to update the cross file
> on the fly, depending on the setup.

I believe, It would be a departure from the meson cross-file concept.

> We have this for toolchain prefix name.
> The prefix depends on where the toochain comes from.
> In a "normal" build system, we set the prefix with an environment variable,
> not by writing a file.
>
>