From patchwork Mon Sep 18 13:00:10 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: 112917 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp3636156qgf; Mon, 18 Sep 2017 06:01:41 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBMd58kBHoHvijftPkdx0/7AH0R23j179CBv0lo4ordL5IeI/TuoA0dfP6FiCvpRXpU3BGJ X-Received: by 10.200.54.240 with SMTP id b45mr48677715qtc.264.1505739701041; Mon, 18 Sep 2017 06:01:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505739701; cv=none; d=google.com; s=arc-20160816; b=Qw3+NZqbG2gVVMRVmNcbqLJ3AZm8GwNHDvtBqkpGXjKxpgRcQjS5UkmcQyrau2begL 9zrACjltZmHv1OGekJBBoKbqHlwMfYJT4m/c5VjeT9vYhJBmE9vkc1nGRWV85yM2mfPv eII/kCiRGRgZPEDBVnXAdtIya1HxRu7vi5/EbUk2Fz8EaitGiF2j6I2yWNkPUix/Vh9w VMZSK0lsox6btOQMKnF4isYvcgpCsp0a0dPYvi5uwycjaBfZjBUzsQ8gKpbo++FXwv9D orU77oViSiPXVilh/+YBknPi1xVffI60Ie7ubv/lGUaTd9N8Hqk1JJEPDHc0T2yZV6g8 fILg== 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=63SlPEiLpJJjcUURuW6TJnwJMj2WoD30EztnRrRM9iU=; b=R4LgSQEvdjC6NiSlG3DI7RVDu6ciVW/YfamLo0Ujcs1cHoKUON01AUGmXi+sHbwv4B /GRD2E2OJHUOndKjLq58UdVIPpmzwpYlbS6U+ptUZx9AKjN6MyIxnKhY692veE8Mp4wO YFVObnjSt+eVH6yxh5Z4NC50F6/ztsq7DlJEwu/0oEcF0Zw0XKJlBiw6lYzoZLMsbxOH AApzfG561I6BfoDKxGqRC26b8v0ZaAm3jXeStbCGkZej9HdzBSakeMEXKKb7Y9dLsBHu nG6DB7mjMDLPm9U+Q6cL2JKtbVH+xNCSlg5ni0Fbgsb+zd5FPT1fFU7ZgI6cWmN7yxAz wAWA== 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 p42si6928686qte.537.2017.09.18.06.01.40; Mon, 18 Sep 2017 06:01:41 -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 882C46074D; Mon, 18 Sep 2017 13:01:40 +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, RCVD_IN_DNSWL_NONE,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 0A56D60D44; Mon, 18 Sep 2017 13:00:37 +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 1F6DF60D3A; Mon, 18 Sep 2017 13:00:32 +0000 (UTC) Received: from forward101j.mail.yandex.net (forward101j.mail.yandex.net [5.45.198.241]) by lists.linaro.org (Postfix) with ESMTPS id 7C8CC60D45 for ; Mon, 18 Sep 2017 13:00:26 +0000 (UTC) Received: from mxback14j.mail.yandex.net (mxback14j.mail.yandex.net [IPv6:2a02:6b8:0:1619::90]) by forward101j.mail.yandex.net (Yandex) with ESMTP id 833E71241FB8 for ; Mon, 18 Sep 2017 16:00:25 +0300 (MSK) Received: from smtp1p.mail.yandex.net (smtp1p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:6]) by mxback14j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id FSllaIknrY-0PoKIgh9; Mon, 18 Sep 2017 16:00:25 +0300 Received: by smtp1p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id WiH8IrUPsa-0OLWBEWe; Mon, 18 Sep 2017 16:00:24 +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: Mon, 18 Sep 2017 16:00:10 +0300 Message-Id: <1505739611-19678-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505739611-19678-1-git-send-email-odpbot@yandex.ru> References: <1505739611-19678-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 163 Subject: [lng-odp] [PATCH v5 3/4] configure: support compiling with no arch optimizations 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: Dmitry Eremin-Solenikov Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 163 (lumag:improve-build-4) ** https://github.com/Linaro/odp/pull/163 ** Patch: https://github.com/Linaro/odp/pull/163.patch ** Base sha: e1c46f8e296a730ed27141a33189185bb7dfd1b1 ** Merge commit sha: a232c0012683b33d1a12d67ce30127ac78ba57e0 **/ configure.ac | 68 +++++++++++++++++--------------------- platform/linux-generic/Makefile.am | 8 ++++- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/configure.ac b/configure.ac index 99bee092f..bea8f4dfd 100644 --- a/configure.ac +++ b/configure.ac @@ -104,45 +104,44 @@ AX_VALGRIND_CHECK ########################################################################## # Which architecture optimizations will we use ########################################################################## -AS_CASE([$host], - [x86*], [ARCH_DIR=x86], - [i686*], [ARCH_DIR=x86], - [mips64*], [ARCH_DIR=mips64], - [powerpc*], [ARCH_DIR=powerpc], - [aarch64*], [ARCH_DIR=aarch64], - [arm*], [ARCH_DIR=arm], - [ARCH_DIR=undefined] -) +AC_ARG_WITH([arch-default], + [AS_HELP_STRING([with-arch-default], [use generic arch files])], + [ARCH_DIR=default + ARCH_ABI=default], +[AS_CASE([$host], + [x86*], [ARCH_DIR=x86 + ARCH_ABI=x86_64-linux], + [i686*], [ARCH_DIR=x86 + ARCH_ABI=x86_32-linux], + [mips64*], [ARCH_DIR=mips64 + ARCH_ABI=mips64-linux], + [powerpc*], [ARCH_DIR=powerpc + ARCH_ABI=power64-linux], + [aarch64*], [ARCH_DIR=aarch64 + ARCH_ABI=arm64-linux], + [arm*], [ARCH_DIR=arm + ARCH_ABI=arm32-linux], + [ARCH_DIR=undefined + ARCH_ABI=undefined] +)]) AC_SUBST([ARCH_DIR]) +AC_SUBST([ARCH_ABI]) ########################################################################## # Warn on the defaults if arch is undefined ########################################################################## -if test "${ARCH_DIR}" = "undefined"; -then - echo "ARCH_DIR is undefined, please add your ARCH_DIR based on host=${host}" - exit 1 -fi +AS_IF([test "${ARCH_DIR}" = "undefined"], + [AC_MSG_ERROR([ARCH_DIR is undefined, please add your ARCH_DIR based on host=${host}])]) -########################################################################## -# Architecture for ABI support -########################################################################## -AS_CASE([$host], - [x86*], [ARCH_ABI=x86_64-linux], - [i686*], [ARCH_ABI=x86_32-linux], - [mips64*], [ARCH_ABI=mips64-linux], - [powerpc*], [ARCH_ABI=power64-linux], - [aarch64*], [ARCH_ABI=arm64-linux], - [arm*], [ARCH_ABI=arm32-linux], - [ARCH_ABI=undefined] -) -AC_SUBST([ARCH_ABI]) +AS_IF([test "${ARCH_ABI}" = "undefined"], + [AC_MSG_ERROR([ARCH_ABI is undefined, please add your ARCH_ABI based on host=${host}])]) -if test "${ARCH_ABI}" = "undefined"; -then - echo "ARCH_ABI is undefined, please add your ARCH_ABI based on host=${host}" - exit 1 -fi +AM_CONDITIONAL([ARCH_IS_DEFAULT], [test "x${ARCH_DIR}" = "xdefault"]) +AM_CONDITIONAL([ARCH_IS_ARM], [test "x${ARCH_DIR}" = "xarm"]) +AM_CONDITIONAL([ARCH_IS_AARCH64], [test "x${ARCH_DIR}" = "xaarch64"]) +AM_CONDITIONAL([ARCH_IS_MIPS64], [test "x${ARCH_DIR}" = "xmips64"]) +AM_CONDITIONAL([ARCH_IS_POWERPC], [test "x${ARCH_DIR}" = "xpowerpc"]) +AM_CONDITIONAL([ARCH_IS_X86], [test "x${ARCH_DIR}" = "xx86"]) ########################################################################## # Set correct pkgconfig version @@ -219,11 +218,6 @@ AM_CONDITIONAL([HAVE_DOXYGEN], [test "x${DOXYGEN}" = "xdoxygen"]) AM_CONDITIONAL([user_guide], [test "x${user_guides}" = "xyes" ]) AM_CONDITIONAL([HAVE_MSCGEN], [test "x${MSCGEN}" = "xmscgen"]) AM_CONDITIONAL([helper_linux], [test x$helper_linux = xyes ]) -AM_CONDITIONAL([ARCH_IS_ARM], [test "x${ARCH_DIR}" = "xarm"]) -AM_CONDITIONAL([ARCH_IS_AARCH64], [test "x${ARCH_DIR}" = "xaarch64"]) -AM_CONDITIONAL([ARCH_IS_MIPS64], [test "x${ARCH_DIR}" = "xmips64"]) -AM_CONDITIONAL([ARCH_IS_POWERPC], [test "x${ARCH_DIR}" = "xpowerpc"]) -AM_CONDITIONAL([ARCH_IS_X86], [test "x${ARCH_DIR}" = "xx86"]) ########################################################################## # Setup doxygen documentation diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 0ebb6f76c..753885208 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -259,7 +259,13 @@ arch_odp_headers = $(srcdir)/arch/x86/odp/api/cpu_arch.h noinst_HEADERS += $(srcdir)/arch/x86/cpu_flags.h endif -noinst_HEADERS += $(srcdir)/arch/default/odp/api/cpu_arch.h +if ARCH_IS_DEFAULT +__LIB__libodp_linux_la_SOURCES += arch/default/odp_cpu_arch.c \ + arch/default/odp_cpu_cycles.c \ + arch/default/odp_global_time.c \ + arch/default/odp_sysinfo_parse.c +arch_odp_headers = $(srcdir)/arch/default/odp/api/cpu_arch.h +endif odpapiinclude_HEADERS += $(arch_odp_headers)