> -----Original Message----- > From: Honnappa Nagarahalli <honnappa.nagaraha...@arm.com> > Sent: Tuesday, October 27, 2020 4:54 AM > To: Juraj Linkeš <juraj.lin...@pantheon.tech>; bruce.richard...@intel.com; > Ruifeng Wang <ruifeng.w...@arm.com>; Phil Yang <phil.y...@arm.com>; > vcchu...@amazon.com; Dharmik Thakkar <dharmik.thak...@arm.com>; > jerinjac...@gmail.com; hemant.agra...@nxp.com > Cc: dev@dpdk.org; nd <n...@arm.com>; Honnappa Nagarahalli > <honnappa.nagaraha...@arm.com>; nd <n...@arm.com> > Subject: RE: [PATCH v4 1/6] build: alias default build as generic > > <snip> > > > > > The current machine='default' build name is not descriptive. The > > actual default build is machine='native'. Add an alternative string > > which does the same build and better describes what we're building: > > machine='generic'. Leave machine='default' for backwards compatibility. > > > > Signed-off-by: Juraj Linkeš <juraj.lin...@pantheon.tech> > > --- > > config/arm/meson.build | 31 ++++++++++++++++--------------- > > config/meson.build | 6 +++--- > > 2 files changed, 19 insertions(+), 18 deletions(-) > > > > diff --git a/config/arm/meson.build b/config/arm/meson.build index > > b49203fa8..491842cad 100644 > > --- a/config/arm/meson.build > > +++ b/config/arm/meson.build > > @@ -1,12 +1,13 @@ > > # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel > > Corporation. > > # Copyright(c) 2017 Cavium, Inc > > +# Copyright(c) 2020 PANTHEON.tech s.r.o. > > > > # for checking defines we need to use the correct compiler flags > > march_opt = '-march=@0@'.format(machine) > > > > arm_force_native_march = false > > -arm_force_default_march = (machine == 'default') > > +arm_force_generic_march = (machine == 'generic') > > > > flags_common_default = [ > > # Accelarate rte_memcpy. Be sure to run unit test > > (memcpy_perf_autotest) @@ -87,7 +88,7 @@ flags_octeontx2_extra = [ > > ['RTE_EAL_IGB_UIO', false], > > ['RTE_USE_C11_MEM_MODEL', true]] > > > > -machine_args_generic = [ > > +machine_args_default = [ > Is this change required? 'machine_args_generic' aligns much better with > 'machine == generic' (change in the file config/meson.build below) >
I thought a lot about the naming and I went back and forth on this before eventually settling on default instead of generic. My reasons are because machine_args_default doesn't just hold information about the build we're doing when machine='generic', but also non-generic information (and thus generic doesn't that well) and it is also used like you would use a default configuration - for implementers which don't have specific configuration. In a later patch I renamed the "default" configuration of these machine_args to "generic" which is where the actual generic part of the configuration lies. Maybe I could've done that in this patch. Or maybe move this change to that patch - this seems better, since this change is not really needed for this patch and is more of a refactor. > > ['default', ['-march=armv8-a+crc', '-moutline-atomics']], > > ['native', ['-march=native']], > > ['0xd03', ['-mcpu=cortex-a53']], > > @@ -113,20 +114,20 @@ machine_args_emag = [ > > ['native', ['-march=native']]] > > > > ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page > > G7-5321) -impl_generic = ['Generic armv8', flags_generic, > > machine_args_generic] > > -impl_0x41 = ['Arm', flags_arm, machine_args_generic] > > -impl_0x42 = ['Broadcom', flags_generic, machine_args_generic] > > +impl_generic = ['Generic armv8', flags_generic, machine_args_default] > > +impl_0x41 = ['Arm', flags_arm, machine_args_default] > > +impl_0x42 = ['Broadcom', flags_generic, machine_args_default] > > impl_0x43 = ['Cavium', flags_cavium, machine_args_cavium] > > -impl_0x44 = ['DEC', flags_generic, machine_args_generic] > > -impl_0x49 = ['Infineon', flags_generic, machine_args_generic] > > -impl_0x4d = ['Motorola', flags_generic, machine_args_generic] > > -impl_0x4e = ['NVIDIA', flags_generic, machine_args_generic] > > +impl_0x44 = ['DEC', flags_generic, machine_args_default] > > +impl_0x49 = ['Infineon', flags_generic, machine_args_default] > > +impl_0x4d = ['Motorola', flags_generic, machine_args_default] > > +impl_0x4e = ['NVIDIA', flags_generic, machine_args_default] > > impl_0x50 = ['Ampere Computing', flags_emag, machine_args_emag] > > -impl_0x51 = ['Qualcomm', flags_generic, machine_args_generic] > > -impl_0x53 = ['Samsung', flags_generic, machine_args_generic] > > -impl_0x56 = ['Marvell ARMADA', flags_armada, machine_args_generic] > > -impl_0x69 = ['Intel', flags_generic, machine_args_generic] -impl_dpaa > > = ['NXP DPAA', flags_dpaa, machine_args_generic] > > +impl_0x51 = ['Qualcomm', flags_generic, machine_args_default] > > +impl_0x53 = ['Samsung', flags_generic, machine_args_default] > > +impl_0x56 = ['Marvell ARMADA', flags_armada, machine_args_default] > > +impl_0x69 = ['Intel', flags_generic, machine_args_default] impl_dpaa > > += ['NXP DPAA', flags_dpaa, machine_args_default] > > > > dpdk_conf.set('RTE_ARCH_ARM', 1) > > dpdk_conf.set('RTE_FORCE_INTRINSICS', 1) @@ -145,7 +146,7 @@ else > > cmd_generic = ['generic', '', '', 'default', ''] > > cmd_output = cmd_generic # Set generic by default > > machine_args = [] # Clear previous machine args > > - if arm_force_default_march and not meson.is_cross_build() > > + if arm_force_generic_march and not meson.is_cross_build() > > machine = impl_generic > > impl_pn = 'default' > > elif not meson.is_cross_build() > > diff --git a/config/meson.build b/config/meson.build index > > 258b01d06..918ca2dfb 100644 > > --- a/config/meson.build > > +++ b/config/meson.build > > @@ -68,13 +68,13 @@ else > > machine = get_option('machine') > > endif > > > > -# machine type 'default' is special, it defaults to the per arch > > agreed common > > +# machine type 'generic' is special, it defaults to the per arch > > +agreed common > > # minimal baseline needed for DPDK. > > # That might not be the most optimized, but the most portable version > > while # still being able to support the CPU features required for DPDK. > > # This can be bumped up by the DPDK project, but it can never be an > > # invariant like 'native' > Nit, may be it is worth mentioning that 'default' is allowed for backward > compatibility? > Ok, I'll add that. > > -if machine == 'default' > > +if machine == 'default' or machine == 'generic' > > if host_machine.cpu_family().startswith('x86') > > # matches the old pre-meson build systems default > > machine = 'corei7' > > @@ -82,7 +82,7 @@ if machine == 'default' > > machine = 'armv7-a' > > elif host_machine.cpu_family().startswith('aarch') > > # arm64 manages defaults in config/arm/meson.build > > - machine = 'default' > > + machine = 'generic' > > elif host_machine.cpu_family().startswith('ppc') > > machine = 'power8' > > endif > > -- > > 2.20.1