From patchwork Wed Apr 19 11:51:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 752220 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3w7L2d5ndBz9s03 for ; Wed, 19 Apr 2017 21:52:09 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A961884A73; Wed, 19 Apr 2017 11:52:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Amt9QB5p033H; Wed, 19 Apr 2017 11:52:05 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 48CF4860DC; Wed, 19 Apr 2017 11:52:05 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 2C22B1C02BB for ; Wed, 19 Apr 2017 11:52:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2E7CB84A73 for ; Wed, 19 Apr 2017 11:52:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hTlSW4pjxCxR for ; Wed, 19 Apr 2017 11:52:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.datacom.ind.br (mx.datacom.ind.br [177.66.5.10]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5DF9E86143 for ; Wed, 19 Apr 2017 11:52:02 +0000 (UTC) Received: from mail.datacom.ind.br (localhost [127.0.0.1]) by mail.datacom.ind.br (Postfix) with ESMTPS id BFF771AEAA2A; Wed, 19 Apr 2017 08:51:31 -0300 (BRT) Received: from localhost (localhost [127.0.0.1]) by mail.datacom.ind.br (Postfix) with ESMTP id AFA2C1AEAA1D; Wed, 19 Apr 2017 08:51:31 -0300 (BRT) Received: from mail.datacom.ind.br ([127.0.0.1]) by localhost (mail.datacom.ind.br [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id HCjxRGhZRYgx; Wed, 19 Apr 2017 08:51:31 -0300 (BRT) Received: from pedeld202344.datacom.net (pedeld202344.datacom.net [10.0.120.87]) by mail.datacom.ind.br (Postfix) with ESMTPSA id 959571AEA9FE; Wed, 19 Apr 2017 08:51:31 -0300 (BRT) From: Carlos Santos To: buildroot@buildroot.org Date: Wed, 19 Apr 2017 08:51:52 -0300 Message-Id: <1492602712-28828-1-git-send-email-casantos@datacom.ind.br> X-Mailer: git-send-email 2.7.4 Subject: [Buildroot] [PATCH] gtest: fix usage on ARM platforms X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Ensure that GTest is compiled with -fPIC to allow linking the static libraries with dynamically linked programs. This is not a requirement for most architectures but is mandatory for ARM. Signed-off-by: Carlos Santos --- package/gtest/gtest.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package/gtest/gtest.mk b/package/gtest/gtest.mk index 329179d..dc43597 100644 --- a/package/gtest/gtest.mk +++ b/package/gtest/gtest.mk @@ -37,6 +37,13 @@ HOST_GTEST_GMOCK_PYTHONPATH = \ # the gtest sources. GTEST_CONF_OPTS = -DBUILD_SHARED_LIBS=OFF +# Ensure that GTest is compiled with -fPIC to allow linking the static +# libraries with dynamically linked programs. This is not a requirement +# for most architectures but is mandatory for ARM. +ifeq ($(BR2_STATIC_LIBS),) +GTEST_CONF_OPTS += -DCMAKE_POSITION_INDEPENDENT_CODE=ON +endif + GTEST_CONF_OPTS += -DBUILD_GTEST=ON ifeq ($(BR2_PACKAGE_GTEST_GMOCK),y)