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 576F2A0A05;
	Wed, 20 Jan 2021 11:34:49 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 3D223140E9D;
	Wed, 20 Jan 2021 11:34:49 +0100 (CET)
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com
 [66.111.4.25]) by mails.dpdk.org (Postfix) with ESMTP id 31529140E98
 for <dev@dpdk.org>; Wed, 20 Jan 2021 11:34:48 +0100 (CET)
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.nyi.internal (Postfix) with ESMTP id 8D0805C00F3;
 Wed, 20 Jan 2021 05:34:47 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Wed, 20 Jan 2021 05:34:47 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding:content-type; s=fm3; bh=
 oTsy4RRkkFThneY3INJi2eQfRNfVcgY32CtKBk/3cQI=; b=sBrQTzCB8QAD/IF/
 R9//4xCHCQHZBBUWT5WFUiV9Wr1dljXaGOuTriR9YC6zLzrkDmuLA4pdxIb3RW4d
 ewMFzwc+QfP6aLT3v2T9C8dzYW81AaASTb2e6JRf6oU5LJ+Oj1kJgdG7yU56/7Hh
 qFVRvwMurb4xikeH8LDJKKENgVdUdHTAhm78ayuP47TOPx0XJw8HLntGmGT4KUZ7
 Q3vw1CxOvnkvmh9AZqD609rLCUylcOfepVX0fjEXNpHgbafH3wGNbYz9vefByyYn
 b0yTJGDgkZVX/wP+0DGMBOTOA9XPnWeyCUlyOsbfApia/ti6P16+BXfgGccJmusv
 qKMOVA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :date:from:in-reply-to:message-id:mime-version:references
 :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm1; bh=oTsy4RRkkFThneY3INJi2eQfRNfVcgY32CtKBk/3c
 QI=; b=AskkwefK0Px9uqOSWm3b9vsvU3ZhA55Iqmx+iMAvHltx7YDxioik+KMIh
 qGuWM3kF7EjtgXprVpTgEvZmPx7Awk12hb2PWZpv1sfUYOZMElI/6F50B4akwSPW
 ppoZuk3zyc5Ep0hU8N7AhCtbVPcMuoyyV6e5Pzz9fUCgBC0dsK1NvH9bxHqZf/Ds
 nZz6hiZBQUsajZEF4jp74nF4lx9gR+PYpdiKFbQXVRyunYbtPXexVeVwWcZtUGky
 EKO+H3QKi2ywlpnyGUPJiE5Z/Fd9KdlyA3Vnm52BoCRpEjvOFrZT/q/QtfeUz57b
 kvrmTlR5BwGCKtd0Ay86sxmes8SPA==
X-ME-Sender: <xms:RgcIYOPxDbCYV1Qmiqewvu83OUDaAK-6foNsdzmF4ftvBG-djHTlIg>
 <xme:RgcIYM8LfJxtsRr4qWvzrIZ1qbdoFhgMP9p0RKhCVHqu0D_yE5wVh_cPLf8tfVMc3
 GpXch9x2Y74hAGuhA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddvgddulecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc
 fjughrpefhvffufffkjghfggfgtgesthhqredttddtjeenucfhrhhomhepvfhhohhmrghs
 ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf
 frrghtthgvrhhnpeekteehtdeivefhieegjeelgedufeejheekkeetueevieeuvdevuedt
 jeevheevteenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih
 iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho
 nhdrnhgvth
X-ME-Proxy: <xmx:RgcIYFRZoW9oy6LO0CuTBxgbdwdJGI6aQhb6Kcz_DM24r0_x5DlOsQ>
 <xmx:RgcIYOvsR_SGH73kGWWPw-ir-D7-fp1ow8-3vHB43QWDCRmfQSgKUg>
 <xmx:RgcIYGfGYhCzpSm6KNKSsOMaJ5z0P6vpN9fwGDn8Fd1rndxM3I99ZA>
 <xmx:RwcIYOSVtzXKL94QkYETnm2JcSDWrTOfrLz5uxK4kAcc8col82So4A>
Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id B9B0624005B;
 Wed, 20 Jan 2021 05:34:45 -0500 (EST)
From: Thomas Monjalon <thomas@monjalon.net>
To: Juraj =?utf-8?B?TGlua2XFoQ==?= <juraj.linkes@pantheon.tech>
Cc: "david.marchand@redhat.com" <david.marchand@redhat.com>,
 "aconole@redhat.com" <aconole@redhat.com>,
 "maicolgabriel@hotmail.com" <maicolgabriel@hotmail.com>,
 "jerinjacobk@gmail.com" <jerinjacobk@gmail.com>,
 "ferruh.yigit@intel.com" <ferruh.yigit@intel.com>,
 "Ruifeng.Wang@arm.com" <Ruifeng.Wang@arm.com>, "dev@dpdk.org" <dev@dpdk.org>,
 "bruce.richardson@intel.com" <bruce.richardson@intel.com>
Date: Wed, 20 Jan 2021 11:34:44 +0100
Message-ID: <1625239.tDLFZOx7cW@thomas>
In-Reply-To: <e59d0d0b37924393b22a0da6c3996a0f@pantheon.tech>
References: <1601631508-5307-1-git-send-email-juraj.linkes@pantheon.tech>
 <1834029.KMe6SH2nP9@thomas> <e59d0d0b37924393b22a0da6c3996a0f@pantheon.tech>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="UTF-8"
Subject: Re: [dpdk-dev] [PATCH v4 1/3] build: add aarch64 clang to meson
 cross-compile
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
Sender: "dev" <dev-bounces@dpdk.org>

20/01/2021 11:30, Juraj Linke=C5=A1:
> From: Thomas Monjalon <thomas@monjalon.net>
> > 20/01/2021 09:24, Juraj Linke=C5=A1:
> > > From: Thomas Monjalon <thomas@monjalon.net>
> > > > 19/01/2021 09:33, Juraj Linke=C5=A1:
> > > > > Create meson cross-file arm64_armv8_linux_clang_ubuntu1804.
> > > >
> > > > Why is it specific to Ubuntu 18.04?
> > > > I don't want to add specifc cross files per distributions.
> > > >
> > > > > Use clang/LLVM toolchain with sysroot pointing to gcc cross stdli=
b.
> > > > >
> > > > > The sysroot path must be in the cross-file so that Clang can find
> > > > > the proper headers:
> > > > > * setting CFLAGS, LDFLAGS or -Dc_args, -Dc_link_args doesn't
> > > > > affect cross builds (only native builds). Support added in 0.51.0.
> > > > > * setting pkg-config vars only affects lib searching, not includes
> > > > > * splitting the cross-file into two (one with clang info, one with
> > > > > paths) doesn't work. Support added in 0.52.0.
> > > >
> > > > I don't understand the explanations above.
> > > > Please explain what is the bug and how it is fixed.
> > > >
> > >
> > > I guess the missing piece is that the sysroot path is the ubuntu spec=
ific part.
> > The explanations illustrate why we can't have a generic cross file with=
 the
> > current meson version - there's no way to pass the paths to cross build=
s. Now
> > that I think about it, the commit message needs a rewrite - I should've
> > mentioned that clang/llvm doesn't provide it's own standard c lib, so t=
hat has to
> > come from elsewhere (such as gcc) and thus we have to provide the paths.
> >=20
> > Can it be done with the option -Dc_args?
> >=20
>=20
> Not in Meson 0.47.1, it's explained in the commit msg:
> * setting CFLAGS, LDFLAGS or -Dc_args, -Dc_link_args doesn't=20
> affect cross builds (only native builds). Support added in 0.51.0.

So I suggest to make it clearer :)
One proposal:

* setting CFLAGS/LDFLAGS variables or using -Dc_args/-Dc_link_args options
  do not work on cross builds until Meson 0.51.0.

> > > > [...]
> > > > > +c_args =3D ['-target', 'aarch64-linux-gnu', '--sysroot',
> > > > > +'/usr/aarch64-linux-gnu'] c_link_args =3D ['-target',
> > > > > +'aarch64-linux-gnu', '-fuse-ld=3Dlld', '--gcc-toolchain=3D/usr']
> >=20
> >=20
> >=20
>=20
>=20