[dpdk-dev,v2] build: add support for vendor specific ARM cross builds

Message ID 20180122131450.8855-1-pbhagavatula@caviumnetworks.com (mailing list archive)
State Superseded, archived
Delegated to: Bruce Richardson
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Pavan Nikhilesh Jan. 22, 2018, 1:14 p.m. UTC
  Add various vendor specific cross build targets.
This can be verified by using linaro toolchain and running

	meson build --cross-file config/arm/arch64_armv8_<cpu>_cross

In future more cross build targets can be added.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---

 v2 Changes:
 - rename cross file names.
 - redo machine args selection logic.

 config/arm/arm64_armv8_linuxapp_gcc    | 10 ++++++++++
 config/arm/arm64_thunderx_linuxapp_gcc | 13 +++++++++++++
 config/arm/meson.build                 |  3 +++
 3 files changed, 26 insertions(+)
 create mode 100644 config/arm/arm64_armv8_linuxapp_gcc
 create mode 100644 config/arm/arm64_thunderx_linuxapp_gcc

--
2.16.0
  

Comments

Jerin Jacob Jan. 22, 2018, 1:40 p.m. UTC | #1
-----Original Message-----
> Date: Mon, 22 Jan 2018 18:44:50 +0530
> From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> To: jerin.jacob@caviumnetworks.com, bruce.richardson@intel.com,
>  harry.van.haaren@intel.com, herbert.guan@arm.com, hemant.agrawal@nxp.com
> Cc: dev@dpdk.org, Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> Subject: [dpdk-dev] [PATCH v2] build: add support for vendor specific ARM
>  cross builds
> X-Mailer: git-send-email 2.14.1
> 
> Add various vendor specific cross build targets.
> This can be verified by using linaro toolchain and running
> 
> 	meson build --cross-file config/arm/arch64_armv8_<cpu>_cross

Looks like git comment is _not_ updated. i.e comment is not sync with filename.

IMO, it will useful to update the existing meson build document for the
cross build procedure.
  
Bruce Richardson Jan. 22, 2018, 2:12 p.m. UTC | #2
On Mon, Jan 22, 2018 at 06:44:50PM +0530, Pavan Nikhilesh wrote:
> Add various vendor specific cross build targets.
> This can be verified by using linaro toolchain and running
> 
> 	meson build --cross-file config/arm/arch64_armv8_<cpu>_cross
> 
> In future more cross build targets can be added.
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> ---

Does this need to be merged into the set to add ARM compilation support
in order to fix the cross-compile build?

/Bruce
  
Pavan Nikhilesh Jan. 22, 2018, 2:26 p.m. UTC | #3
On Mon, Jan 22, 2018 at 02:12:05PM +0000, Bruce Richardson wrote:
> On Mon, Jan 22, 2018 at 06:44:50PM +0530, Pavan Nikhilesh wrote:
> > Add various vendor specific cross build targets.
> > This can be verified by using linaro toolchain and running
> >
> > 	meson build --cross-file config/arm/arch64_armv8_<cpu>_cross
> >
> > In future more cross build targets can be added.
> >
> > Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> > ---
>
> Does this need to be merged into the set to add ARM compilation support
> in order to fix the cross-compile build?
>

Yup, this patch as to go after applying the ARM compilation support patches.

> /Bruce

Regards,
Pavan.
  
Pavan Nikhilesh Jan. 22, 2018, 2:49 p.m. UTC | #4
On Mon, Jan 22, 2018 at 07:10:53PM +0530, Jerin Jacob wrote:
> -----Original Message-----
> > Date: Mon, 22 Jan 2018 18:44:50 +0530
> > From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> > To: jerin.jacob@caviumnetworks.com, bruce.richardson@intel.com,
> >  harry.van.haaren@intel.com, herbert.guan@arm.com, hemant.agrawal@nxp.com
> > Cc: dev@dpdk.org, Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> > Subject: [dpdk-dev] [PATCH v2] build: add support for vendor specific ARM
> >  cross builds
> > X-Mailer: git-send-email 2.14.1
> >
> > Add various vendor specific cross build targets.
> > This can be verified by using linaro toolchain and running
> >
> > 	meson build --cross-file config/arm/arch64_armv8_<cpu>_cross
>
> Looks like git comment is _not_ updated. i.e comment is not sync with filename.

Yup missed it, now that naming and directory structure is agreed upon will
merge this patch with other set and send a v6.

>
> IMO, it will useful to update the existing meson build document for the
> cross build procedure.
>
Will update the documentation and send it as a patch in the next series.

Thanks,
Pavan.
  

Patch

diff --git a/config/arm/arm64_armv8_linuxapp_gcc b/config/arm/arm64_armv8_linuxapp_gcc
new file mode 100644
index 000000000..3b4d3c469
--- /dev/null
+++ b/config/arm/arm64_armv8_linuxapp_gcc
@@ -0,0 +1,10 @@ 
+[binaries]
+c = 'aarch64-linux-gnu-gcc'
+cpp = 'aarch64-linux-gnu-cpp'
+ar = 'aarch64-linux-gnu-gcc-ar'
+
+[host_machine]
+system = 'linux'
+cpu_family = 'aarch64'
+cpu = 'armv8-a'
+endian = 'little'
diff --git a/config/arm/arm64_thunderx_linuxapp_gcc b/config/arm/arm64_thunderx_linuxapp_gcc
new file mode 100644
index 000000000..7ff34af74
--- /dev/null
+++ b/config/arm/arm64_thunderx_linuxapp_gcc
@@ -0,0 +1,13 @@ 
+[binaries]
+c = 'aarch64-linux-gnu-gcc'
+cpp = 'aarch64-linux-gnu-cpp'
+ar = 'aarch64-linux-gnu-gcc-ar'
+
+[host_machine]
+system = 'linux'
+cpu_family = 'aarch64'
+cpu = 'armv8-a'
+endian = 'little'
+
+[properties]
+implementor_id = '0x43'
diff --git a/config/arm/meson.build b/config/arm/meson.build
index 212b94499..a5bfb9610 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -59,6 +59,9 @@  else
 		endif
 		# Set to generic if variable is not found
 		machine = get_variable('impl_' + cmd_output[0], 'generic')
+	else
+		impl_id = meson.get_cross_property('implementor_id', 'generic')
+		machine = get_variable('impl_' + impl_id)
 	endif

 	if machine == 'generic'