From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id DC6621AEE9 for ; Fri, 15 Sep 2017 19:36:44 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id 187so3377638wmn.0 for ; Fri, 15 Sep 2017 10:36:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vjBGci0LJJym45AX4xU6REHHxETcu3dFVho69EldbX8=; b=jI96ROaEHfv5O7GKfLP4zog+MS1lUHh1O8ofAvTCGqmr4O36IiMfkCL9QX+kNttD1u NvBkDc9O+qRYyQbxZ82XZUoLMjjU5I4tjq4zeCl1d0TBaPYNwK/xl46naz2mMu/tl9Fc x4TDCeaqCopfPjVc/lZE10ndRQZUJVUipztyGnDBtD7whBljSbrr4X1v7vZO+vd49gK7 TILck2kW8R0TdW8zd+CIyfaitUbKD4J/ZRRaLGxcpM1N7leRL/hq4571ZefSn8ZPROdx 3N7qDAnO8RfRAxO+Bhy3CqNcFyIkp974f8pNmbeblk6R7xQOGMnyumErG1dCZsYrdkF3 4cTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vjBGci0LJJym45AX4xU6REHHxETcu3dFVho69EldbX8=; b=X4pWBNU/KTZJbXltoCwGvLuknVSMocEVxsMbTUd0Oc4svgX39dbu4lOk9VrVDjhw9o CixcDU+pG6BaDCXy+usXBjUBNd23t56I6N4NsiB+Fh/oBSVp1BF312Hsy2C/gnwJs/Zq MPa14IHVOfgEnI+9S9AKRLOA1BF4rLxHFlhpRbCuB8mn2H31KqyZUrckPaQfIbtRAg1h GKWV1D/7dvKArXnuOJc8A80ipW/jJwy2Wr5KCzpngzqbC2YxDtzPVI/0os3pNL5gjHmq ROXrnRTuSvc8UgVos3W/Epf/ZWwPj5yirNErk4wiPXpYjYUARBxXOXDnFxaYgnfUN9hj AWpg== X-Gm-Message-State: AHPjjUiREKscYqCfv93X+IpXlAgm7Hm09jDzawqgmOwPPBe3FB8Ao9J4 26FIzC0Suoe5L297sFLvpUM5F5vy X-Google-Smtp-Source: AOwi7QAEDOqDcPJAuuZ0p1609+6Y35SSvvSdiLqL7AjbEE033EeWGDN0Qhb3O7usL3yqyp4D0x56pA== X-Received: by 10.28.14.144 with SMTP id 138mr3495000wmo.110.1505496999367; Fri, 15 Sep 2017 10:36:39 -0700 (PDT) Received: from localhost ([2a00:23c5:bef3:400:4a51:b7ff:fe0b:4749]) by smtp.gmail.com with ESMTPSA id f19sm1916613wrf.85.2017.09.15.10.36.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Sep 2017 10:36:38 -0700 (PDT) From: luca.boccassi@gmail.com To: dev@dpdk.org Cc: bruce.richardson@intel.com, Luca Boccassi Date: Fri, 15 Sep 2017 18:36:11 +0100 Message-Id: <20170915173612.13636-3-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170915173612.13636-1-luca.boccassi@gmail.com> References: <20170915173612.13636-1-luca.boccassi@gmail.com> Subject: [dpdk-dev] [PATCH 2/3] build: add optional arch-specific headers install path X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Sep 2017 17:36:45 -0000 From: Luca Boccassi A subset of the dpdk headers are arch-dependent, but have common names and thus cause a clash in a multiarch installation. For example, rte_config.h is different for each target. Add a "include_subdir_arch" option to allow a user to specify a subdirectory for arch independent headers to fix multiarch support. Signed-off-by: Luca Boccassi --- config/meson.build | 2 +- lib/librte_eal/common/include/arch/x86/meson.build | 3 ++- meson.build | 3 ++- meson_options.txt | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/config/meson.build b/config/meson.build index b57a7e64b..db68a08d4 100644 --- a/config/meson.build +++ b/config/meson.build @@ -69,4 +69,4 @@ dpdk_conf.set('RTE_MAX_NUMA_NODES', get_option('max_numa_nodes')) dpdk_conf.set('RTE_LIBEAL_USE_HPET', get_option('use_hpet')) dpdk_conf.set('RTE_EAL_ALLOW_INV_SOCKET_ID', get_option('allow_invalid_socket_id')) -install_headers('rte_config.h') +install_headers('rte_config.h', subdir: get_option('include_subdir_arch')) diff --git a/lib/librte_eal/common/include/arch/x86/meson.build b/lib/librte_eal/common/include/arch/x86/meson.build index 80b5980c1..5e9c02687 100644 --- a/lib/librte_eal/common/include/arch/x86/meson.build +++ b/lib/librte_eal/common/include/arch/x86/meson.build @@ -45,4 +45,5 @@ install_headers( 'rte_rtm.h', 'rte_rwlock.h', 'rte_spinlock.h', - 'rte_vect.h') + 'rte_vect.h', + subdir: get_option('include_subdir_arch')) diff --git a/meson.build b/meson.build index f41fb4120..134158dae 100644 --- a/meson.build +++ b/meson.build @@ -70,7 +70,7 @@ subdir('app') build_cfg = 'rte_build_config.h' configure_file(output: build_cfg, configuration: dpdk_conf, - install_dir: get_option('includedir')) + install_dir: get_option('includedir') + '/' + get_option('include_subdir_arch')) # for static builds, include the drivers as libs, and also any # other dependent libs that DPDK needs to link against @@ -85,5 +85,6 @@ pkg.generate(name: meson.project_name(), version: meson.project_version(), libraries: dpdk_libraries, description: 'The Data Plane Development Kit (DPDK)', + subdirs: [get_option('include_subdir_arch'), '.'], extra_cflags: '-include "rte_config.h"' ) diff --git a/meson_options.txt b/meson_options.txt index 636226ce8..fb945db91 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -7,3 +7,4 @@ option('allow_invalid_socket_id', type: 'boolean', value: false, option('enable_kmods', type: 'boolean', value: true, description: 'build kernel modules') option('kernel_dir', type: 'string', value: '', description: 'path to the kernel for building kernel modules') option('per_library_versions', type: 'boolean', value: true, description: 'true: each lib gets its own version number, false: DPDK version used for each lib') +option('include_subdir_arch', type: 'string', value: '', description: 'subdirectory where to install arch-dependent headers') -- 2.11.0