From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luca Boccassi Subject: Re: [PATCH] build: add PPC64 Meson build Date: Mon, 10 Sep 2018 12:33:33 +0100 Message-ID: <1536579213.10952.0.camel@debian.org> References: <20180907183502.26164-1-bluca@debian.org> <20180910105029.GB24376@bricha3-MOBL.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org, chaozhu@linux.vnet.ibm.com, christian.ehrhardt@canonical.com, thomas@monjalon.net To: Bruce Richardson Return-path: Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id 228571041 for ; Mon, 10 Sep 2018 13:33:35 +0200 (CEST) Received: by mail-wm0-f67.google.com with SMTP id c14-v6so21176466wmb.4 for ; Mon, 10 Sep 2018 04:33:35 -0700 (PDT) In-Reply-To: <20180910105029.GB24376@bricha3-MOBL.ger.corp.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, 2018-09-10 at 11:50 +0100, Bruce Richardson wrote: > On Fri, Sep 07, 2018 at 07:35:02PM +0100, Luca Boccassi wrote: > > This has been only build-tested for now, on a native ppc64el > > POWER8E > > machine running Debian sid. > >=20 > > Signed-off-by: Luca Boccassi > > --- > > The build box cannot be used to run DPDK as it doesn't have > > supported > > NICs and root access. Would be great if someone could run-test it, > > but > > at this point I think build support is enough to get started. > >=20 > > =C2=A0config/meson.build=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0|=C2=A0= =C2=A08 ++++++++ > > =C2=A0config/ppc_64/meson.build=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0| 15 > > +++++++++++++++ > > =C2=A0lib/librte_eal/common/arch/ppc_64/meson.build=C2=A0=C2=A0=C2=A0= =C2=A0|=C2=A0=C2=A05 +++++ > > =C2=A0.../common/include/arch/ppc_64/meson.build=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0| 16 > > ++++++++++++++++ > > =C2=A04 files changed, 44 insertions(+) > > =C2=A0create mode 100644 config/ppc_64/meson.build > > =C2=A0create mode 100644 lib/librte_eal/common/arch/ppc_64/meson.build > > =C2=A0create mode 100644 > > lib/librte_eal/common/include/arch/ppc_64/meson.build > >=20 > > diff --git a/config/meson.build b/config/meson.build > > index 4d755323f4..8e87b344c2 100644 > > --- a/config/meson.build > > +++ b/config/meson.build > > @@ -9,7 +9,13 @@ else > > =C2=A0endif > > =C2=A0dpdk_conf.set('RTE_MACHINE', machine) > > =C2=A0machine_args =3D [] > > +# ppc64 does not support -march=3Dnative > > +if host_machine.cpu_family().startswith('ppc') and machine =3D=3D > > 'native' > > +machine_args +=3D '-mcpu=3D' + machine > > +machine_args +=3D '-mtune=3D' + machine > > +else > > =C2=A0machine_args +=3D '-march=3D' + machine > > +endif >=20 > Indentation? Was left in the keyboard > > =C2=A0 > > =C2=A0toolchain =3D cc.get_id() > > =C2=A0dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain) > > @@ -84,6 +90,8 @@ if host_machine.cpu_family().startswith('x86') > > =C2=A0 arch_subdir =3D 'x86' > > =C2=A0elif host_machine.cpu_family().startswith('arm') or > > host_machine.cpu_family().startswith('aarch') > > =C2=A0 arch_subdir =3D 'arm' > > +elif host_machine.cpu_family().startswith('ppc') > > + arch_subdir =3D 'ppc_64' > > =C2=A0endif > > =C2=A0subdir(arch_subdir) > > =C2=A0dpdk_conf.set('RTE_COMPILE_TIME_CPUFLAGS', > > ','.join(compile_time_cpuflags)) > > diff --git a/config/ppc_64/meson.build b/config/ppc_64/meson.build > > new file mode 100644 > > index 0000000000..d6faa7d64f > > --- /dev/null > > +++ b/config/ppc_64/meson.build > > @@ -0,0 +1,15 @@ > > +# SPDX-License-Identifier: BSD-3-Clause > > +# Copyright(c) 2018 Luca Boccassi > > + > > +# for checking defines we need to use the correct compiler flags > > +march_opt =3D '-march=3D@0@'.format(machine) >=20 > This contradicts the statement above in config/meson.build where you > state > that ppc64 doesn't support "-march=3Dnative"? Yeah I copy-pasted the arm file to get started, but it doesn't seem to me march_opt is used anywhere else other than in the x86 specific file, so I've dropped that line in v2 --=20 Kind regards, Luca Boccassi