From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 09130A0558; Thu, 18 Feb 2021 15:12:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B29F7160783; Thu, 18 Feb 2021 15:12:40 +0100 (CET) Received: from lb.pantheon.sk (lb.pantheon.sk [46.229.239.20]) by mails.dpdk.org (Postfix) with ESMTP id 4499C160782 for ; Thu, 18 Feb 2021 15:12:39 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lb.pantheon.sk (Postfix) with ESMTP id 4BB89C05C9; Thu, 18 Feb 2021 15:12:38 +0100 (CET) X-Virus-Scanned: amavisd-new at siecit.sk Received: from lb.pantheon.sk ([127.0.0.1]) by localhost (lb.pantheon.sk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9BVcPpCrtmUg; Thu, 18 Feb 2021 15:12:36 +0100 (CET) Received: from service-node1.lab.pantheon.local (unknown [46.229.239.141]) by lb.pantheon.sk (Postfix) with ESMTP id D9F89BF47F; Thu, 18 Feb 2021 15:12:35 +0100 (CET) From: =?UTF-8?q?Juraj=20Linke=C5=A1?= To: bruce.richardson@intel.com, thomas@monjalon.net, Ruifeng.Wang@arm.com, Honnappa.Nagarahalli@arm.com, jerinjacobk@gmail.com, ferruh.yigit@intel.com Cc: dev@dpdk.org, =?UTF-8?q?Juraj=20Linke=C5=A1?= Date: Thu, 18 Feb 2021 15:12:35 +0100 Message-Id: <1613657555-17683-1-git-send-email-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1606204376-8236-1-git-send-email-juraj.linkes@pantheon.tech> References: <1606204376-8236-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3] build: alias default build as generic X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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š Reviewed-by: Honnappa Nagarahalli Acked-by: Bruce Richardson --- config/arm/meson.build | 7 ++++--- config/meson.build | 13 +++++++------ devtools/test-meson-builds.sh | 14 +++++++------- doc/guides/prog_guide/build-sdk-meson.rst | 4 ++-- meson_options.txt | 2 +- 5 files changed, 21 insertions(+), 19 deletions(-) diff --git a/config/arm/meson.build b/config/arm/meson.build index 00bc4610a3..aaed89bd5b 100644 --- a/config/arm/meson.build +++ b/config/arm/meson.build @@ -1,6 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation. # Copyright(c) 2017 Cavium, Inc +# Copyright(c) 2021 PANTHEON.tech s.r.o. # common flags to all aarch64 builds, with lowest priority flags_common = [ @@ -208,8 +209,8 @@ if dpdk_conf.get('RTE_ARCH_32') else # aarch64 build if not meson.is_cross_build() - if machine == 'default' - # default build + if machine == 'generic' + # generic build implementer_id = 'generic' part_number = 'generic' else @@ -256,7 +257,7 @@ else '(-Dmachine=generic) build.') endif - # use default flags with implementer flags + # use common flags with implementer flags dpdk_flags = flags_common + implementer_config['flags'] + part_number_config.get('flags', []) # apply supported machine args diff --git a/config/meson.build b/config/meson.build index 3cf560b8a3..ed4de62b37 100644 --- a/config/meson.build +++ b/config/meson.build @@ -70,21 +70,22 @@ else machine = get_option('machine') endif -# machine type 'default' is special, it defaults to the per arch agreed common -# minimal baseline needed for DPDK. +# machine type 'generic' is special, it selects the per arch agreed common +# minimal baseline needed for DPDK. Machine type 'default' is also supported +# with the same meaning for backwards compatibility. # 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' -if machine == 'default' +if machine == 'default' or machine == 'generic' if host_machine.cpu_family().startswith('x86') - # matches the old pre-meson build systems default + # matches the old pre-meson build systems generic machine machine = 'corei7' elif host_machine.cpu_family().startswith('arm') machine = 'armv7-a' elif host_machine.cpu_family().startswith('aarch') - # arm64 manages defaults in config/arm/meson.build - machine = 'default' + # arm64 manages generic config in config/arm/meson.build + machine = 'generic' elif host_machine.cpu_family().startswith('ppc') machine = 'power8' endif diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index c11ae87e0d..daf817ac3e 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -223,12 +223,12 @@ done # test compilation with minimal x86 instruction set # Set the install path for libraries to "lib" explicitly to prevent problems # with pkg-config prefixes if installed in "lib/x86_64-linux-gnu" later. -default_machine='nehalem' -if ! check_cc_flags "-march=$default_machine" ; then - default_machine='corei7' +generic_machine='nehalem' +if ! check_cc_flags "-march=$generic_machine" ; then + generic_machine='corei7' fi -build build-x86-default cc skipABI -Dcheck_includes=true \ - -Dlibdir=lib -Dmachine=$default_machine $use_shared +build build-x86-generic cc skipABI -Dcheck_includes=true \ + -Dlibdir=lib -Dmachine=$generic_machine $use_shared # 32-bit with default compiler if check_cc_flags '-m32' ; then @@ -271,10 +271,10 @@ for f in $srcdir/config/ppc/ppc* ; do build $targetdir $f ABI $use_shared done -# Test installation of the x86-default target, to be used for checking +# Test installation of the x86-generic target, to be used for checking # the sample apps build using the pkg-config file for cflags and libs load_env cc -build_path=$(readlink -f $builds_dir/build-x86-default) +build_path=$(readlink -f $builds_dir/build-x86-generic) export DESTDIR=$build_path/install install_target $build_path $DESTDIR pc_file=$(find $DESTDIR -name libdpdk.pc) diff --git a/doc/guides/prog_guide/build-sdk-meson.rst b/doc/guides/prog_guide/build-sdk-meson.rst index 3429e26479..c7e12eedfb 100644 --- a/doc/guides/prog_guide/build-sdk-meson.rst +++ b/doc/guides/prog_guide/build-sdk-meson.rst @@ -85,7 +85,7 @@ Project-specific options are passed used -Doption=value:: meson -Denable_docs=true fullbuild # build and install docs - meson -Dmachine=default # use builder-independent baseline -march + meson -Dmachine=generic # use builder-independent baseline -march meson -Ddisable_drivers=event/*,net/tap # disable tap driver and all # eventdev PMDs for a smaller build @@ -114,7 +114,7 @@ Examples of setting some of the same options using meson configure:: re-scan from meson. .. note:: - machine=default uses a config that works on all supported architectures + machine=generic uses a config that works on all supported architectures regardless of the capabilities of the machine where the build is happening. As well as those settings taken from ``meson configure``, other options diff --git a/meson_options.txt b/meson_options.txt index 6eff62e47d..2c7b46ef07 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -21,7 +21,7 @@ option('include_subdir_arch', type: 'string', value: '', option('kernel_dir', type: 'string', value: '', description: 'Path to the kernel for building kernel modules. Headers must be in $kernel_dir/build. Modules will be installed in $DEST_DIR/$kernel_dir/extra/dpdk.') option('machine', type: 'string', value: 'native', - description: 'set the target machine type') + description: 'set the target machine type or "generic", a build usable on all machines of the build machine architecture or "native", which lets the compiler pick the architecture of the build machine.') option('max_ethports', type: 'integer', value: 32, description: 'maximum number of Ethernet devices') option('max_lcores', type: 'integer', value: 128, -- 2.20.1