From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A4897A0526; Wed, 8 Jul 2020 23:24:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2C36E1DFEF; Wed, 8 Jul 2020 23:23:53 +0200 (CEST) Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by dpdk.org (Postfix) with ESMTP id 7E9721DE98 for ; Wed, 8 Jul 2020 23:23:49 +0200 (CEST) Received: by mail-lj1-f193.google.com with SMTP id e8so21629371ljb.0 for ; Wed, 08 Jul 2020 14:23:49 -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 :mime-version:content-transfer-encoding; bh=S80P6Jny2RG5HDhbqjgpDbYyO3/J3JYhYBKK+KpjIE8=; b=ToCUxVp89mnNzMOQKNErY1ZCnS6GkM1kn3czrDu8Iwi4HCqXNFaoj9yux8IxBaYsvM W+bffG1CAm0NOlKZpCANPrcHwzAdH1sDoKBcFYa3Kjof3FO8fay6Hy8kIVOd+PGPVK+r dHK19jsIfHTdqwxjO5SbhmgACfOIUWM1ZA2hFdxuOecXHZMtWrmCS7dBFjvFtU9cGu6N Wx0eGvPQEknSP9lkJ3ewG2+srfjPPK7r4zoXKSKFr9vDzCaZF6tvs3oBhA8Aoy9YDmin i/yUpIQSDQpMaFZgS4Yy3QxRUOLDA9wYSjEmUhUtQTasERMbIVEV67RdHCULmZbuok7s Y9ug== 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:mime-version:content-transfer-encoding; bh=S80P6Jny2RG5HDhbqjgpDbYyO3/J3JYhYBKK+KpjIE8=; b=a8mngIU26OE6tPwU3XjyqA71qZ/qP26Uthyh/PKiiqb3w5YbdNZZPTAy8IeU4fn/yg bQ8KUmrSv96oAXEFvT9vBByWeXse+yXasYZ9y8+UleY7JgKv+wdTULq+6gXW06uWdmXb N0RaF/NtrKT1CsIro8ocBo3x+f9B2y4KcNE18N2qKwOIePmfi1CICas5bhP8eDQRTRVK zpMhX6vCHRLOwXeRvh3HxXpWv0J0le8ukUr3SW6pqdB49ajvF/1hKJWCZCWB//PrbHwX FR1u08ScwPGaylTZc0DGBX9RP6BCX480GHtecoHL6IWdN6ySji2WCFjYbksAzmo+StpG lNRA== X-Gm-Message-State: AOAM5335nxK5wI8Omes39GQ2URcVtx5hghQaYKJ4PJBMJsaWkW0NQfog aLy0kT2Y9v2yhN9aMnhBGXYYbG06tXZ9RA== X-Google-Smtp-Source: ABdhPJwiTEaSM2tBXc4t2jn+5HBQYpoj9D3YTurgZL4ZOB3knLuV0rsDxSNWjOqNrsCSn8c2rOS+qg== X-Received: by 2002:a2e:b53c:: with SMTP id z28mr27121273ljm.439.1594243428529; Wed, 08 Jul 2020 14:23:48 -0700 (PDT) Received: from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id u9sm230590ljk.44.2020.07.08.14.23.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2020 14:23:47 -0700 (PDT) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Neil Horman , Bruce Richardson , Thomas Monjalon , robin.jarry@6wind.com, Jie Zhou , Tal Shnaiderman , Dmitry Kozlyuk , Aaron Conole , Michael Santana Date: Thu, 9 Jul 2020 00:23:33 +0300 Message-Id: <20200708212335.25338-3-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200708212335.25338-1-dmitry.kozliuk@gmail.com> References: <20200708005355.7102-1-dmitry.kozliuk@gmail.com> <20200708212335.25338-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v4 2/4] build: use Python pmdinfogen 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Like for other build scripts, use Python interpreter to run pmdinfogen. Adjust wrapper script accordingly and also don't suppress stderr from ar and pmdinfogen. Add python3-pyelftools to CI configuration. Signed-off-by: Dmitry Kozlyuk --- .travis.yml | 2 +- GNUmakefile | 2 +- buildtools/Makefile | 9 --------- buildtools/gen-pmdinfo-cfile.sh | 6 +++--- buildtools/meson.build | 1 + drivers/meson.build | 2 +- meson.build | 1 - mk/internal/rte.compile-pre.mk | 2 +- mk/rte.sdkinstall.mk | 2 -- 9 files changed, 8 insertions(+), 19 deletions(-) delete mode 100644 buildtools/Makefile diff --git a/.travis.yml b/.travis.yml index 14f812423..28b559a25 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ addons: apt: update: true packages: &required_packages - - [libnuma-dev, python3-setuptools, python3-wheel, python3-pip, ninja-build] + - [libnuma-dev, python3-setuptools, python3-wheel, python3-pip, python3-pyelftools, ninja-build] - [libbsd-dev, libpcap-dev, libibverbs-dev, libcrypto++-dev, libfdt-dev, libjansson-dev] _aarch64_packages: &aarch64_packages diff --git a/GNUmakefile b/GNUmakefile index e8de422df..242d30d2e 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -12,6 +12,6 @@ export RTE_SDK # directory list # -ROOTDIRS-y := buildtools lib kernel drivers app +ROOTDIRS-y := lib kernel drivers app include $(RTE_SDK)/mk/rte.sdkroot.mk diff --git a/buildtools/Makefile b/buildtools/Makefile deleted file mode 100644 index 7f76fd7d6..000000000 --- a/buildtools/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2016 Neil Horman -# All rights reserved. - -include $(RTE_SDK)/mk/rte.vars.mk - -DIRS-y += pmdinfogen - -include $(RTE_SDK)/mk/rte.subdir.mk diff --git a/buildtools/gen-pmdinfo-cfile.sh b/buildtools/gen-pmdinfo-cfile.sh index 43059cf36..109ee461e 100755 --- a/buildtools/gen-pmdinfo-cfile.sh +++ b/buildtools/gen-pmdinfo-cfile.sh @@ -4,11 +4,11 @@ arfile=$1 output=$2 -pmdinfogen=$3 +shift 2 +pmdinfogen=$* # The generated file must not be empty if compiled in pedantic mode echo 'static __attribute__((unused)) const char *generator = "'$0'";' > $output for ofile in `ar t $arfile` ; do - ar p $arfile $ofile | $pmdinfogen - - >> $output 2> /dev/null + ar p $arfile $ofile | $pmdinfogen - - >> $output done -exit 0 diff --git a/buildtools/meson.build b/buildtools/meson.build index 04808dabc..3a64b28b7 100644 --- a/buildtools/meson.build +++ b/buildtools/meson.build @@ -17,3 +17,4 @@ else endif map_to_win_cmd = py3 + files('map_to_win.py') sphinx_wrapper = py3 + files('call-sphinx-build.py') +pmdinfogen = py3 + files('pmdinfogen.py') diff --git a/drivers/meson.build b/drivers/meson.build index 161cfda04..3c4d4b700 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -119,7 +119,7 @@ foreach class:dpdk_driver_classes command: [pmdinfo, tmp_lib.full_path(), '@OUTPUT@', pmdinfogen], output: out_filename, - depends: [pmdinfogen, tmp_lib]) + depends: [tmp_lib]) endif # now build the static driver diff --git a/meson.build b/meson.build index 61d9a4f5f..a6e8c09c2 100644 --- a/meson.build +++ b/meson.build @@ -45,7 +45,6 @@ subdir('buildtools') subdir('config') # build libs and drivers -subdir('buildtools/pmdinfogen') subdir('lib') subdir('drivers') diff --git a/mk/internal/rte.compile-pre.mk b/mk/internal/rte.compile-pre.mk index df05b5576..bb2ab0725 100644 --- a/mk/internal/rte.compile-pre.mk +++ b/mk/internal/rte.compile-pre.mk @@ -59,7 +59,7 @@ endif CHECK_SYMBOLS_SCRIPT = $(RTE_SDK)/buildtools/check-symbols.sh CHECK_SYMBOLS = $(CHECK_SYMBOLS_SCRIPT) $(SRCDIR)/$(EXPORT_MAP) $@ -PMDINFO_GEN = $(RTE_SDK_BIN)/app/dpdk-pmdinfogen $@ $@.pmd.c +PMDINFO_GEN = $(RTE_SDK)/buildtools/pmdinfogen.py $@ $@.pmd.c PMDINFO_CC = $(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@.pmd.o $@.pmd.c PMDINFO_LD = $(CROSS)ld -r $(filter-out -export-dynamic,$(LDFLAGS)) -o $@.o $@.pmd.o $@ PMDINFO_TO_O = if grep -q 'RTE_PMD_REGISTER_.*(.*)' $<; then \ diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk index 32bed5d95..875a64f04 100644 --- a/mk/rte.sdkinstall.mk +++ b/mk/rte.sdkinstall.mk @@ -98,7 +98,6 @@ install-runtime: $(Q)cp $(CP_FLAGS) $O/lib/* $(DESTDIR)$(libdir) $(Q)$(call rte_mkdir, $(DESTDIR)$(bindir)) $(Q)tar -cf - -C $O --exclude 'app/*.map' \ - --exclude app/dpdk-pmdinfogen \ --exclude 'app/cmdline*' --exclude app/test \ --exclude app/testacl --exclude app/testpipeline app | \ tar -xf - -C $(DESTDIR)$(bindir) $(TAR_X_FLAGS) @@ -134,7 +133,6 @@ install-sdk: $(Q)cp $(CP_FLAGS) $(RTE_SDK)/buildtools $(DESTDIR)$(sdkdir) $(Q)$(call rte_mkdir, $(DESTDIR)$(targetdir)/app) $(Q)cp $(CP_FLAGS) $O/.config $(DESTDIR)$(targetdir) - $(Q)cp $(CP_FLAGS) $O/app/dpdk-pmdinfogen $(DESTDIR)$(targetdir)/app $(Q)$(call rte_symlink, $(DESTDIR)$(includedir), $(DESTDIR)$(targetdir)/include) $(Q)$(call rte_symlink, $(DESTDIR)$(libdir), $(DESTDIR)$(targetdir)/lib) -- 2.25.4