gtest: fix usage on ARM platforms
PATCH 1/1 gtest: fix usage on ARM platforms
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.
--- package/gtest/gtest.mk | 7 +++++++ 1 file changed, 7 insertions(+)
package/gtest/gtest.mk +7 -0
@@ -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)
Signature · 1 line
2.7.4
PATCH 1/1 gtest: fix usage on ARM platforms
Hello,
Quoted 5 lines · Carlos Santos
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 <[email protected]>
Is this fixing an autobuilder issue? If so, the reference to the autobuilder failure should be included in the commit log.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 gtest: fix usage on ARM platforms
Quoted 9 lines
From: "Thomas Petazzoni" <[email protected]>
To: "Carlos Santos" <[email protected]>
Cc: buildroot at buildroot.org
Sent: Wednesday, April 19, 2017 9:33:31 AM
Subject: Re: [Buildroot] [PATCH] gtest: fix usage on ARM platformsHello,
On Wed, 19 Apr 2017 08:51:52 -0300, Carlos Santos wrote:
Quoted 8 lines
Quoted 5 lines
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 <[email protected]>Is this fixing an autobuilder issue? If so, the reference to the autobuilder failure should be included in the commit log.
It was observed during a local build of one of our products which has an ARM Cortex-A9 processor.
Signature · 4 lines
Carlos Santos (Casantos) - DATACOM, P&D ?The greatest triumph that modern PR can offer is the transcendent success of having your words and actions judged by your reputation, rather than the other way about.? ? Christopher Hitchens
Thomas Petazzoni
AppliedPATCH 1/1 gtest: fix usage on ARM platforms
In reply to Carlos SantosHello,
Quoted 8 lines · Carlos Santos
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 <[email protected]>--- package/gtest/gtest.mk | 7 +++++++ 1 file changed, 7 insertions(+)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com