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 24F5BA00BE; Wed, 8 Jul 2020 02:54:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A88AA1DD48; Wed, 8 Jul 2020 02:54:20 +0200 (CEST) Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by dpdk.org (Postfix) with ESMTP id 4FEA01DD11 for ; Wed, 8 Jul 2020 02:54:14 +0200 (CEST) Received: by mail-lj1-f195.google.com with SMTP id f5so36334811ljj.10 for ; Tue, 07 Jul 2020 17:54:14 -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=Qv1I9Efdp9QszICF7rBDiFwhcQ7p/YIexfbvRV4tGbwHKorzqCWO+L26f+yxGIcbZX N23j65koqK+AhBOlfQTu/FzkBUrP9Y6meI9O9EfZCVg4erBaOn6Jdl5J4hDnfbuMBFaP 2dA9Fok93YRec7Kn5/TYGZUEFcZHa0CsIIY/kqTJ/NG9Q9fBZ2QVk0FLV1W7ZrGq4aaY 3vEChVpfaMMagQjPrXmIATLw1j3LfPl91XLpB3L0JgStYrveXkdDSadQUvlu001ZQmM3 V3Ee0a29osAQjOJIog9GHk/8PRu/gpATzyI63rW+zLKUZdwbyAIS4S0M5GUqLoL1MUol G9TA== 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=VG22VG58+N3tVGYX7GVpV+uGH1mp/CJ2ahncHeRcYgd5iuow586lGiS3exm095G/7x qosWO66T5GThcx5DpOsH6ffNcDXt0Auiqww40PLAFYCpXMDWdaB3K/VelR1qLf9p8xb8 NFlEDjGPXTN2iuBut+KfrYt84aDT6ZFC3Geca5nsBq7+ZJLXqSj2sRGh6RR9PC/IIDhM Kc0dteIeKMrypdLIyxB5CNlE9oN7G+ooptm25k+3qHin0etT2QDVQlIRRXUt1iaJgXS0 kXtkHKON/EfwWfeudqaW/o0K79z9ffCX+jADpH/XOasZ4qDFveE90KHbHhPyf5v5x9PC rfsw== X-Gm-Message-State: AOAM5339II0Rs02kGWNZqr1gRNMrHnCF2ofed8ptLYXZ6KDiaFE6YoJJ Ck9C6unjmxZbk8XjMGhAzGhIhWu1hld63w== X-Google-Smtp-Source: ABdhPJxX2ejPovzgN9H2t5zDC0uo4VW9T5bEFgQOUjjCPLye7fgjanH4QoGg2O9UZQRMoR6oyg+t9A== X-Received: by 2002:a2e:9c95:: with SMTP id x21mr24964797lji.234.1594169653467; Tue, 07 Jul 2020 17:54:13 -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 h22sm515986ljg.1.2020.07.07.17.54.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2020 17:54:12 -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: Wed, 8 Jul 2020 03:53:53 +0300 Message-Id: <20200708005355.7102-3-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200708005355.7102-1-dmitry.kozliuk@gmail.com> References: <20200702000232.10761-1-dmitry.kozliuk@gmail.com> <20200708005355.7102-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 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