From patchwork Fri Sep 23 14:45:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 76878 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp608516qgf; Fri, 23 Sep 2016 07:45:18 -0700 (PDT) X-Received: by 10.55.18.40 with SMTP id c40mr8220038qkh.271.1474641917969; Fri, 23 Sep 2016 07:45:17 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id n187si5366565qkf.84.2016.09.23.07.45.16; Fri, 23 Sep 2016 07:45:17 -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 A82AC61890; Fri, 23 Sep 2016 14:45:16 +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=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL 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 7F82160E9E; Fri, 23 Sep 2016 14:45:12 +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 05C9361797; Fri, 23 Sep 2016 14:45:10 +0000 (UTC) Received: from mail-oi0-f46.google.com (mail-oi0-f46.google.com [209.85.218.46]) by lists.linaro.org (Postfix) with ESMTPS id 0497E60E9E for ; Fri, 23 Sep 2016 14:45:09 +0000 (UTC) Received: by mail-oi0-f46.google.com with SMTP id a62so136917020oib.1 for ; Fri, 23 Sep 2016 07:45:08 -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=O2gugPIdYnbi8T2d5u6q8dy7K4EcT6JwQ1argh4WQH4=; b=i8mm47o6i9T1HOGcD/sUotBJzGVi7kxD6vRqj32r7iSGEyYiRp1PGyC+i8P2gvsXCB hmJ21X9CfVFWyPFd+iAd+1GpEACnSVCC6xkcsoWIf5sHrmsgreVrdSfGbg8+b/wwCU1g VjOv08BRBUKWZAH0JnYIXSjF715+4QymUIykLMvh9dynxwAy2Y2sY+6dVjVRVO/Xu6n5 +qxRL2kUlYnB9uV8DIDKf9cx/Y8cP9mDQU4igx5MLn54Z7degb6JFIbwz+dvuVWsaC8L 4tvfj+1me4V5chMQ9yhcuzeeffRy2xyBzqBC1U5oe7ijQl/HDhdrDi1TmFDhGd794aRr W4ag== X-Gm-Message-State: AE9vXwPTwQfaHSqEJARm37pIqcGc+iiYelnusZO6NZPpOSpjNWC9owFyqv+rK1elkx17FR+Hqm8= X-Received: by 10.202.212.150 with SMTP id l144mr10347664oig.175.1474641908292; Fri, 23 Sep 2016 07:45:08 -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 r10sm2202393otc.29.2016.09.23.07.45.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 23 Sep 2016 07:45:07 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Fri, 23 Sep 2016 09:45:04 -0500 Message-Id: <1474641904-4769-2-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1474641904-4769-1-git-send-email-bill.fischofer@linaro.org> References: <1474641904-4769-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv2 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 1835f80..f86d017 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 != xyes;