From patchwork Fri Sep 23 04:41:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 76822 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp372981qgf; Thu, 22 Sep 2016 21:41:47 -0700 (PDT) X-Received: by 10.55.138.66 with SMTP id m63mr5820569qkd.159.1474605707352; Thu, 22 Sep 2016 21:41:47 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id f123si3949366qkd.299.2016.09.22.21.41.46; Thu, 22 Sep 2016 21:41:47 -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=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 816E06171A; Fri, 23 Sep 2016 04:41:46 +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_H2 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 023CE60D60; Fri, 23 Sep 2016 04:41:42 +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 4B17F60F02; Fri, 23 Sep 2016 04:41:40 +0000 (UTC) Received: from mail-oi0-f48.google.com (mail-oi0-f48.google.com [209.85.218.48]) by lists.linaro.org (Postfix) with ESMTPS id 2B59D60D60 for ; Fri, 23 Sep 2016 04:41:39 +0000 (UTC) Received: by mail-oi0-f48.google.com with SMTP id t83so122119975oie.3 for ; Thu, 22 Sep 2016 21:41:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2s/IT3xZ6QYYdv/7GHw/QGChSVXp+20/C6jA33OiWDk=; b=kPfUNPcFwVujXiZmPB8td0F8yo8tqceQPNWtR7W95yFPVp7bqdDMBLKcmIgHDkfokT 1bFL7nHDO5JN0T1YK7LynJz5zdf8BTMCLcTipvtTBeTDWS0tizGHwEMqQ5gmbISAixF0 bSuPHSL4cNrI09HTVlyM8L9q1N5p0jjNZJW4IC1LUl+e7DFy/sFPrdtJmOV52Bfxg91R mCudzB8/X+k6EcuAInqEek+Y/F8JQzPmEHxSK7mTEaBhDrukG52uG3ZolEbIUTzHIEwc dcM6EgQgMroTl1cKDnG+uF+ve63Ls0WdMrJkU+OSnWUTs8B9pll5AmzVvvwGSbzTZAmy MjDg== X-Gm-Message-State: AE9vXwPBCpTIWYTAir00Po414kk8CNIXG8uNk5a6VIHpqlRrrBx4gK4D8UsVZFJF5Pxb5yqyliM= X-Received: by 10.202.252.22 with SMTP id a22mr7105480oii.124.1474605698723; Thu, 22 Sep 2016 21:41:38 -0700 (PDT) Received: from localhost.localdomain (cpe-70-121-83-241.austin.res.rr.com. [70.121.83.241]) by smtp.gmail.com with ESMTPSA id p15sm1637972ota.8.2016.09.22.21.41.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 22 Sep 2016 21:41:38 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Thu, 22 Sep 2016 23:41:35 -0500 Message-Id: <1474605695-21978-2-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1474605695-21978-1-git-send-email-bill.fischofer@linaro.org> References: <1474605695-21978-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 2/2] config: share: use relocatable code if --enable-shared=no is specified 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" Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2510 by adding CFLAGS=-fPIC when --enable-shared=no is in effect to force generation of relocatable code. Signed-off-by: Bill Fischofer --- configure.ac | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.7.4 diff --git a/configure.ac b/configure.ac index 58c6a16..8659c40 100644 --- a/configure.ac +++ b/configure.ac @@ -178,6 +178,14 @@ AM_CONDITIONAL([user_guide], [test "x${user_guides}" = "xyes" ]) AM_CONDITIONAL([HAVE_MSCGEN], [test "x${MSCGEN}" = "xmscgen"]) ########################################################################## +# Generate PIC if sharing not supported +########################################################################## +if test $enable_shared != xyes; +then + CFLAGS="$CFLAGS -fPIC" +fi + +########################################################################## # Setup for ABI compatibility ########################################################################## if test x$enable_abi_compat != xno;