From patchwork Fri Aug 18 09:00:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 110366 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp634824qge; Fri, 18 Aug 2017 02:01:11 -0700 (PDT) X-Received: by 10.55.18.202 with SMTP id 71mr11146509qks.174.1503046871649; Fri, 18 Aug 2017 02:01:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503046871; cv=none; d=google.com; s=arc-20160816; b=DhAm0dkcoZAGyhESAjBsMZ/XC9gT7u7QtdTjJj7wDBbZbx40L9p0PoiW+orNk7KAUt USlBOEm9VgjUfPojMq+5cBueEPZwgurH0rqq+52qofqs2LthS8iz9IRn0AwG3GQ5KQXE aiw7HZYuXKO+PFH9wu3cuxHqOaixjfX9ynCSHld6lKoq22dyxuRw9ZvKnZQD0/EDJK70 RUarFL2rY9VeRET2YHvnmzH4kYsbB/dMK8SQfw5dKSQTv6WURdSOu7TvOEYPPczFfqn4 Wli8BSDpwQfJQAQj0fgioxLHiaa1rcru20o6vNg0CJGp1WeR9Ji/koKqeEAOgnNgKFlo BJlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=62LaSfuGhufAKggHvHqgs6NE/Dh0vDsUPncQ7FyUt6c=; b=anSM5hWEwhMRhF+R39Vi+mCznIJ+Gv8axTI4ZYcW4sBnB9JRn1PzsVvhVDSBxCf30K f+OUI0kvGW9qnDnSy6HfAQceW6dkmM6VLcJAXPAOybRC2frsNFclXhGhxG17LLfYeLOp LYegSQt2SxIi68EEVj7Xg9/mL2QniiYrzUXdKm+sxMS1zrlurX1eIViJig16utp3pRWO ISaHnOBzB+MN/+PUlM1eNJLi9Dbidnnlq2VQ9UYbFkN/ZCccUd5i09jz/hejFVItap6S JlldDT5SomK/Quvv4yyIY6IKN3Of//AX7dBvb3zE3SrWVI5JGxKG22BqBBC+qgVMreR7 3D9w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id z37si5098318qtj.17.2017.08.18.02.01.10; Fri, 18 Aug 2017 02:01:11 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id AED1E65BC3; Fri, 18 Aug 2017 09:01:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 2A4A6607D1; Fri, 18 Aug 2017 09:00:55 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id D70EF65C7A; Fri, 18 Aug 2017 09:00:46 +0000 (UTC) Received: from forward102p.mail.yandex.net (forward102p.mail.yandex.net [77.88.28.102]) by lists.linaro.org (Postfix) with ESMTPS id 7A91365C7A for ; Fri, 18 Aug 2017 09:00:43 +0000 (UTC) Received: from mxback7g.mail.yandex.net (mxback7g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:168]) by forward102p.mail.yandex.net (Yandex) with ESMTP id 06C1A4304AD8 for ; Fri, 18 Aug 2017 12:00:42 +0300 (MSK) Received: from smtp4j.mail.yandex.net (smtp4j.mail.yandex.net [2a02:6b8:0:1619::15:6]) by mxback7g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 5zTKP6bkgh-0fEis4XV; Fri, 18 Aug 2017 12:00:41 +0300 Received: by smtp4j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 8N6pV62QAY-0fNqABJb; Fri, 18 Aug 2017 12:00:41 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 18 Aug 2017 12:00:05 +0300 Message-Id: <1503046807-18491-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1503046807-18491-1-git-send-email-odpbot@yandex.ru> References: <1503046807-18491-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 134 Subject: [lng-odp] [PATCH CLOUD-DEV v1 1/3] configure: Enable linux-dpdk X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Balakrishna Garapati Signed-off-by: Balakrishna Garapati --- /** Email created from pull request 134 (GBalakrishna:linux-dpdk-cloud) ** https://github.com/Linaro/odp/pull/134 ** Patch: https://github.com/Linaro/odp/pull/134.patch ** Base sha: 1cd271cf2b8be3e79625ab19648178e906612fc4 ** Merge commit sha: fa5d6df18ededa59dcaf9f48df33471a18ec730b **/ configure.ac | 41 ++++++++++++++----------- example/Makefile.inc | 2 +- helper/test/Makefile.am | 2 +- platform/Makefile.inc | 1 - platform/linux-dpdk/Makefile.am | 45 +++++++++++++++++++++++----- platform/linux-generic/Makefile.am | 2 ++ test/Makefile.inc | 2 +- test/common_plat/validation/Makefile.inc | 2 +- test/common_plat/validation/api/Makefile.inc | 2 +- 9 files changed, 69 insertions(+), 30 deletions(-) diff --git a/configure.ac b/configure.ac index d9e4a34f..77506dce 100644 --- a/configure.ac +++ b/configure.ac @@ -111,6 +111,7 @@ AS_CASE([$host], [ARCH_DIR=undefined] ) AC_SUBST([ARCH_DIR]) +AM_CONDITIONAL([ARCH_X86], [test "x${ARCH_DIR}" = "xx86"]) ########################################################################## # Warn on the defaults if arch is undefined @@ -161,22 +162,6 @@ AC_SUBST([with_platform]) AC_SUBST([platform_with_platform], ["platform/${with_platform}"]) ########################################################################## -# Run platform specific checks and settings -########################################################################## -IMPLEMENTATION_NAME="" -if test "${with_platform}" = "linux-generic"; -then - m4_include([./platform/linux-generic/m4/configure.m4]) - m4_include([./test/linux-generic/m4/configure.m4]) - IMPLEMENTATION_NAME="odp-linux" -else - echo "UNSUPPORTED PLATFORM: ${with_platform}" - exit 1 -fi - -ODP_CFLAGS="$ODP_CFLAGS -DIMPLEMENTATION_NAME=$IMPLEMENTATION_NAME" - -########################################################################## # Include m4 files ########################################################################## m4_include([./doc/m4/configure.m4]) @@ -195,6 +180,27 @@ AC_HELP_STRING([--with-sdk-install-path=DIR path to external libs and headers], AC_SUBST(SDK_INSTALL_PATH) ########################################################################## +# Run platform specific checks and settings +########################################################################## +IMPLEMENTATION_NAME="" +AS_IF([test "${with_platform}" == "linux-generic"], + [m4_include([./platform/linux-generic/m4/configure.m4])] + [m4_include([./test/linux-generic/m4/configure.m4])] + [IMPLEMENTATION_NAME="linux-generic"] + [ODP_CFLAGS="$ODP_CFLAGS -std=c99"] + [ODP_LIB_STR="odp-linux"], + [test "${with_platform}" == "linux-dpdk"], + [m4_include([./platform/linux-dpdk/m4/configure.m4])] + [m4_include([./test/linux-dpdk/m4/configure.m4])] + [IMPLEMENTATION_NAME="linux-dpdk"] + [ODP_CFLAGS="$ODP_CFLAGS -std=gnu99"] + [ODP_LIB_STR="odp-dpdk"], + [echo "UNSUPPORTED PLATFORM: ${with_platform}"]) + +ODP_CFLAGS="$ODP_CFLAGS -DIMPLEMENTATION_NAME=$IMPLEMENTATION_NAME" +AC_SUBST(ODP_LIB_STR) + +########################################################################## # Set the install directory for test binaries/scripts ########################################################################## AC_ARG_WITH([testdir], @@ -210,6 +216,7 @@ AC_SUBST([testdir]) # Set conditionals as computed within platform specific files ########################################################################## AM_CONDITIONAL([SDK_INSTALL_PATH_], [test "x${SDK_INSTALL_PATH_}" = "x1"]) +AM_CONDITIONAL([DPDK_DEFAULT_DIR], [test "x${DPDK_DEFAULT_DIR}" = "x1"]) AM_CONDITIONAL([test_installdir], [test "$testdir" != ""]) AM_CONDITIONAL([cunit_support], [test x$cunit_support = xyes ]) AM_CONDITIONAL([test_vald], [test x$test_vald = xyes ]) @@ -314,7 +321,6 @@ ODP_CFLAGS="$ODP_CFLAGS -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototype ODP_CFLAGS="$ODP_CFLAGS -Wmissing-declarations -Wold-style-definition -Wpointer-arith" ODP_CFLAGS="$ODP_CFLAGS -Wcast-align -Wnested-externs -Wcast-qual -Wformat-nonliteral" ODP_CFLAGS="$ODP_CFLAGS -Wformat-security -Wundef -Wwrite-strings" -ODP_CFLAGS="$ODP_CFLAGS -std=c99" dnl Use -Werror in the checks below since Clang emits a warning instead of dnl an error when it encounters an unknown warning option. @@ -359,6 +365,7 @@ AM_CXXFLAGS="-std=c++11" AC_CONFIG_FILES([Makefile pkgconfig/libodp-linux.pc + pkgconfig/libodp-dpdk.pc pkgconfig/libodphelper.pc ]) diff --git a/example/Makefile.inc b/example/Makefile.inc index c6d7ff5f..88d34d33 100644 --- a/example/Makefile.inc +++ b/example/Makefile.inc @@ -1,6 +1,6 @@ include $(top_srcdir)/platform/@with_platform@/Makefile.inc LIB = $(top_builddir)/lib -LDADD = $(LIB)/libodp-linux.la $(LIB)/libodphelper.la $(DPDK_PMDS) +LDADD = $(LIB)/lib$(ODP_LIB_STR).la $(LIB)/libodphelper.la $(DPDK_PMDS) AM_CFLAGS += \ -I$(srcdir) \ -I$(top_srcdir)/example \ diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am index beef9191..d772ae14 100644 --- a/helper/test/Makefile.am +++ b/helper/test/Makefile.am @@ -5,7 +5,7 @@ LIB = $(top_builddir)/lib #in the following line, the libs using the symbols should come before #the libs containing them! The includer is given a chance to add things #before libodp by setting PRE_LDADD before the inclusion. -LDADD = $(PRE_LDADD) $(LIB)/libodphelper.la $(LIB)/libodp-linux.la +LDADD = $(PRE_LDADD) $(LIB)/libodphelper.la $(LIB)/lib$(ODP_LIB_STR).la INCFLAGS = \ -I$(top_builddir)/platform/@with_platform@/include \ diff --git a/platform/Makefile.inc b/platform/Makefile.inc index b35b5760..1621d980 100644 --- a/platform/Makefile.inc +++ b/platform/Makefile.inc @@ -6,7 +6,6 @@ pkgconfig_DATA = $(top_builddir)/pkgconfig/libodp-linux.pc .PHONY: pkgconfig/libodp-linux.pc VPATH = $(srcdir) $(builddir) -lib_LTLIBRARIES = $(LIB)/libodp-linux.la AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)' diff --git a/platform/linux-dpdk/Makefile.am b/platform/linux-dpdk/Makefile.am index c1497f0f..e56dc165 100644 --- a/platform/linux-dpdk/Makefile.am +++ b/platform/linux-dpdk/Makefile.am @@ -1,6 +1,8 @@ include $(top_srcdir)/platform/Makefile.inc include $(top_srcdir)/platform/@with_platform@/Makefile.inc +lib_LTLIBRARIES = $(LIB)/libodp-dpdk.la + PLAT_CFLAGS = if ARCH_X86 PLAT_CFLAGS += -msse4.2 @@ -72,8 +74,20 @@ odpapiinclude_HEADERS = \ $(srcdir)/include/odp/api/time.h \ $(srcdir)/include/odp/api/timer.h \ $(srcdir)/include/odp/api/traffic_mngr.h \ - $(srcdir)/include/odp/api/version.h \ - $(srcdir)/arch/@ARCH_DIR@/odp/api/cpu_arch.h + $(srcdir)/include/odp/api/version.h + +if ARCH_IS_ARM +odpapiinclude_HEADERS += $(srcdir)/arch/arm/odp/api/cpu_arch.h +endif +if ARCH_IS_MIPS64 +odpapiinclude_HEADERS += $(srcdir)/arch/mips64/odp/api/cpu_arch.h +endif +if ARCH_IS_POWERPC +odpapiinclude_HEADERS += $(srcdir)/arch/powerpc/odp/api/cpu_arch.h +endif +if ARCH_IS_X86 +odpapiinclude_HEADERS += $(srcdir)/arch/x86/odp/api/cpu_arch.h +endif odpapiplatincludedir= $(includedir)/odp/api/plat odpapiplatinclude_HEADERS = \ @@ -215,15 +229,32 @@ __LIB__libodp_dpdk_la_SOURCES = \ ../linux-generic/odp_traffic_mngr.c \ ../linux-generic/odp_version.c \ ../linux-generic/odp_weak.c \ - arch/@ARCH_DIR@/odp_cpu_arch.c \ - arch/@ARCH_DIR@/odp_sysinfo_parse.c - -__LIB__libodp_dpdk_la_LIBADD = $(ATOMIC_LIBS) + ../linux-generic/drv_atomic.c \ + ../linux-generic/drv_barrier.c \ + ../linux-generic/drv_driver.c \ + ../linux-generic/drv_shm.c \ + ../linux-generic/drv_spinlock.c +if ARCH_IS_ARM +__LIB__libodp_dpdk_la_SOURCES += arch/arm/odp_cpu_arch.c \ + arch/arm/odp_sysinfo_parse.c +endif +if ARCH_IS_MIPS64 +__LIB__libodp_dpdk_la_SOURCES += arch/mips64/odp_cpu_arch.c \ + arch/mips64/odp_sysinfo_parse.c +endif +if ARCH_IS_POWERPC +__LIB__libodp_dpdk_la_SOURCES += arch/powerpc/odp_cpu_arch.c \ + arch/powerpc/odp_sysinfo_parse.c +endif if ARCH_IS_X86 -__LIB__libodp_dpdk_la_SOURCES += arch/@ARCH_DIR@/cpu_flags.c +__LIB__libodp_dpdk_la_SOURCES += arch/x86/cpu_flags.c \ + arch/x86/odp_cpu_arch.c \ + arch/x86/odp_sysinfo_parse.c endif +__LIB__libodp_dpdk_la_LIBADD = $(ATOMIC_LIBS) + # Create symlink for ABI header files. Application does not need to use the arch # specific include path for installed files. install-data-hook: diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 1d703cea..be7674a5 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -4,6 +4,8 @@ include $(top_srcdir)/platform/Makefile.inc include $(top_srcdir)/platform/@with_platform@/Makefile.inc +lib_LTLIBRARIES = $(LIB)/libodp-linux.la + AM_CFLAGS += -I$(srcdir)/include AM_CFLAGS += -I$(top_srcdir)/include AM_CFLAGS += -I$(top_srcdir)/frameworks/modular diff --git a/test/Makefile.inc b/test/Makefile.inc index 839bd033..c22bdd61 100644 --- a/test/Makefile.inc +++ b/test/Makefile.inc @@ -4,7 +4,7 @@ LIB = $(top_builddir)/lib #in the following line, the libs using the symbols should come before #the libs containing them! The includer is given a chance to add things #before libodp by setting PRE_LDADD before the inclusion. -LDADD = $(PRE_LDADD) $(LIB)/libodphelper.la $(LIB)/libodp-linux.la $(DPDK_PMDS) +LDADD = $(PRE_LDADD) $(LIB)/libodphelper.la $(LIB)/lib$(ODP_LIB_STR).la $(DPDK_PMDS) INCFLAGS = \ -I$(top_builddir)/platform/@with_platform@/include \ diff --git a/test/common_plat/validation/Makefile.inc b/test/common_plat/validation/Makefile.inc index dda18adc..5512cc0e 100644 --- a/test/common_plat/validation/Makefile.inc +++ b/test/common_plat/validation/Makefile.inc @@ -13,4 +13,4 @@ AM_LDFLAGS += -static LIBCUNIT_COMMON = $(COMMON_DIR)/libcunit_common.la LIBCPUMASK_COMMON = $(COMMON_DIR)/libcpumask_common.la LIBTHRMASK_COMMON = $(COMMON_DIR)/libthrmask_common.la -LIBODP = $(LIB)/libodphelper.la $(LIB)/libodp-linux.la +LIBODP = $(LIB)/libodphelper.la $(LIB)/lib$(ODP_LIB_STR).la diff --git a/test/common_plat/validation/api/Makefile.inc b/test/common_plat/validation/api/Makefile.inc index 177d2ac3..1c5d316a 100644 --- a/test/common_plat/validation/api/Makefile.inc +++ b/test/common_plat/validation/api/Makefile.inc @@ -16,4 +16,4 @@ AM_CPPFLAGS += $(CUNIT_CPPFLAGS) LIBCUNIT_COMMON = $(COMMON_DIR)/libcunit_common.la LIBCPUMASK_COMMON = $(COMMON_DIR)/libcpumask_common.la LIBTHRMASK_COMMON = $(COMMON_DIR)/libthrmask_common.la -LIBODP = $(LIB)/libodphelper.la $(LIB)/libodp-linux.la +LIBODP = $(LIB)/libodphelper.la $(LIB)/lib$(ODP_LIB_STR).la