From patchwork Wed Feb 1 13:14:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 93024 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp2312762obz; Wed, 1 Feb 2017 05:15:29 -0800 (PST) X-Received: by 10.55.104.136 with SMTP id d130mr2874491qkc.9.1485954929664; Wed, 01 Feb 2017 05:15:29 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id t40si14414885qtb.173.2017.02.01.05.15.29; Wed, 01 Feb 2017 05:15:29 -0800 (PST) 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 4A4E36071D; Wed, 1 Feb 2017 13:15:29 +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, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 A9B5E62CDE; Wed, 1 Feb 2017 13:14:29 +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 8973862D18; Wed, 1 Feb 2017 13:14:19 +0000 (UTC) Received: from mail-qt0-f171.google.com (mail-qt0-f171.google.com [209.85.216.171]) by lists.linaro.org (Postfix) with ESMTPS id E3E1E62CE1 for ; Wed, 1 Feb 2017 13:14:16 +0000 (UTC) Received: by mail-qt0-f171.google.com with SMTP id w20so194227637qtb.1 for ; Wed, 01 Feb 2017 05:14:16 -0800 (PST) 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=l/kZjqj/Hzdpt8Mxx6sBmABttjqOkr9bolAoz0fSsbY=; b=CGylCj6BiBde7uI1mlWuC+BsMUWIpr01f3zN79aNMoL5lK7d5hOXHW4SI2v79Mezer pjwiDySoWZ+1luFnBm45NbB5Xi4Q0S4v7e3uiisuc/P2gDY6UL7frgdyPlCJGPFK5wbj qfvbr4jUIsNpX4wdCiNX+G9GSU9T3qodYx/W+CovYsIuen0ZvNYkccC6cel+sTrsG6Hf U+gz8x92TjgBqtDdc9QZhfnZvVdHVqmZFqKoMyZuYosL1ayIFXKqYUWqDqKqi9wDYIHj 53RWU1BgSK4vSdc9pXSH95mRZ2sM6s7kVeSzuMGQ2c0rquN+VPkK/RkaCMfFgEXIb6ur 9tIw== X-Gm-Message-State: AIkVDXLy7KRRc5Zae/HITQL+X6jCBhVJbgOS1ZHQL+PHtv4EtPsQ8aH5EMeheN5mDTQbYzILYpw= X-Received: by 10.237.43.167 with SMTP id e36mr2747874qtd.245.1485954856255; Wed, 01 Feb 2017 05:14:16 -0800 (PST) Received: from localhost (c-98-221-136-245.hsd1.nj.comcast.net. [98.221.136.245]) by smtp.gmail.com with ESMTPSA id b36sm18558166qte.21.2017.02.01.05.14.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 01 Feb 2017 05:14:15 -0800 (PST) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Wed, 1 Feb 2017 08:14:06 -0500 Message-Id: <20170201131409.26631-3-mike.holmes@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170201131409.26631-1-mike.holmes@linaro.org> References: <20170201131409.26631-1-mike.holmes@linaro.org> Subject: [lng-odp] [PATCH 2/5] helper: add ABI compile flag 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" Signed-off-by: Mike Holmes --- configure.ac | 6 +++++ helper/Makefile.am | 1 + helper/include/odp/helper/.gitignore | 1 + helper/include/odp/helper/static_inline.h.in | 35 ++++++++++++++++++++++++++++ helper/m4/configure.m4 | 3 ++- 5 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 helper/include/odp/helper/.gitignore create mode 100644 helper/include/odp/helper/static_inline.h.in -- 2.9.3 diff --git a/configure.ac b/configure.ac index daa9b31..71f07f9 100644 --- a/configure.ac +++ b/configure.ac @@ -272,16 +272,22 @@ ODP_CFLAGS="$ODP_CFLAGS -DODP_DEBUG=$ODP_DEBUG" # Enable/disable ABI compatible build ########################################################################## ODP_ABI_COMPAT=1 +ODP_HELPER_ABI_COMPAT=1 abi_compat=yes AC_ARG_ENABLE([abi-compat], [ --disable-abi-compat disables ABI compatible mode, enables inline code in header files], [if test "x$enableval" = "xno"; then ODP_ABI_COMPAT=0 + ODP_HELPER_ABI_COMPAT=0 abi_compat=no #if there is no ABI compatibility the .so numbers are meaningless ODP_LIBSO_VERSION=0:0:0 + ODPHELPER_LIBSO_VERSION=0:0:0 fi]) AC_SUBST(ODP_ABI_COMPAT) +AC_SUBST(ODP_HELPER_ABI_COMPAT) +ODP_CFLAGS="$ODP_CFLAGS -DODP_HELPER_ABI_COMPAT=$ODP_HELPER_ABI_COMPAT" +ODP_CFLAGS="$ODP_CFLAGS -DODP_ABI_COMPAT=$ODP_ABI_COMPAT" ########################################################################## # Default warning setup diff --git a/helper/Makefile.am b/helper/Makefile.am index b77a928..69531d6 100644 --- a/helper/Makefile.am +++ b/helper/Makefile.am @@ -26,6 +26,7 @@ helperinclude_HEADERS = \ $(srcdir)/include/odp/helper/odph_hashtable.h\ $(srcdir)/include/odp/helper/odph_iplookuptable.h\ $(srcdir)/include/odp/helper/odph_lineartable.h\ + $(srcdir)/include/odp/helper/static_inline.h\ $(srcdir)/include/odp/helper/strong_types.h\ $(srcdir)/include/odp/helper/tcp.h\ $(srcdir)/include/odp/helper/table.h\ diff --git a/helper/include/odp/helper/.gitignore b/helper/include/odp/helper/.gitignore new file mode 100644 index 0000000..95db5f4 --- /dev/null +++ b/helper/include/odp/helper/.gitignore @@ -0,0 +1 @@ +static_inline.h diff --git a/helper/include/odp/helper/static_inline.h.in b/helper/include/odp/helper/static_inline.h.in new file mode 100644 index 0000000..a3efcae --- /dev/null +++ b/helper/include/odp/helper/static_inline.h.in @@ -0,0 +1,35 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * Macro for static inline functions + */ + +#ifndef ODP_HELPER_STATIC_INLINE_H_ +#define ODP_HELPER_STATIC_INLINE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @internal + * @def _HELPER_STATIC + * Control conditional static inline expansions for ABI compatibility + */ +#if @ODP_HELPER_ABI_COMPAT@ +#define _HELPER_STATIC +#else +#define _HELPER_STATIC static inline +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/helper/m4/configure.m4 b/helper/m4/configure.m4 index 38c95d9..71b1f2d 100644 --- a/helper/m4/configure.m4 +++ b/helper/m4/configure.m4 @@ -20,4 +20,5 @@ AC_ARG_ENABLE([helper-extn], fi]) AC_CONFIG_FILES([helper/Makefile - helper/test/Makefile]) + helper/test/Makefile + helper/include/odp/helper/static_inline.h]) \ No newline at end of file