package/pistache: force Release mode
PATCH 1/1 package/pistache: force Release mode
Debug build without SSP will fail on:
/home/giuliobenetti/autobuild/run/instance-3/output-1/host/opt/ext-toolchain/bin/../lib/gcc/i586-buildroot-linux-musl/8.3.0/../../../../i586-buildroot-linux-musl/bin/ld: cannot find -lssp_nonshared /home/giuliobenetti/autobuild/run/instance-3/output-1/host/opt/ext-toolchain/bin/../lib/gcc/i586-buildroot-linux-musl/8.3.0/../../../../i586-buildroot-linux-musl/bin/ld: cannot find -lssp
because of the following lines in CMakeLists.txt:
if(CMAKE_BUILD_TYPE MATCHES "Debug")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage -fstack-protector-all --param=ssp-buffer-size=4")endif()
So force Release mode
Fixes:
- http://autobuild.buildroot.org/results/3ed42be111cc8c3b3d1d4f6504ae548730ab6af6
--- package/pistache/pistache.mk | 3 +++ 1 file changed, 3 insertions(+)
package/pistache/pistache.mk +3 -0
@@ -11,6 +11,9 @@ PISTACHE_LICENSE_FILES = LICENSE PISTACHE_INSTALL_STAGING = YES +# Force Release to fix build failure without SSP +PISTACHE_CONF_OPTS = -DCMAKE_BUILD_TYPE=Release + ifeq ($(BR2_PACKAGE_OPENSSL),y) PISTACHE_DEPENDENCIES += openssl PISTACHE_CONF_OPTS += -DPISTACHE_USE_SSL=ON
Signature · 1 line
2.26.2
PATCH 1/1 package/pistache: force Release mode
package/pistache/pistache.mk PISTACHE_LICENSE_FILES = LICENSE · line 15
Quoted 2 lines · On Sat, 16 May 2020 14:19:35 +0200 Fabrice Fontaine…
package/pistache/pistache.mk +2
-0+# Force Release to fix build failure without SSP +PISTACHE_CONF_OPTS = -DCMAKE_BUILD_TYPE=Release
In some packages, we use CMAKE_BUILD_TYPE=Buildroot, and in others CMAKE_BUILD_TYPE=Release. Should we take a decision on which one makes the most sense ?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 package/pistache: force Release mode
Le sam. 17 oct. 2020 ? 14:56, Thomas Petazzoni
<[email protected]> a ?crit :
Quoted 10 lines
package/pistache/pistache.mk PISTACHE_LICENSE_FILES = LICENSE · line 15
Quoted 2 lines · On Sat, 16 May 2020 14:19:35 +0200 Fabrice Fontaine…
package/pistache/pistache.mk +2
-0+# Force Release to fix build failure without SSP +PISTACHE_CONF_OPTS = -DCMAKE_BUILD_TYPE=ReleaseIn some packages, we use CMAKE_BUILD_TYPE=Buildroot, and in others CMAKE_BUILD_TYPE=Release. Should we take a decision on which one makes the most sense ?
Release is a standard cmake value
(https://cmake.org/cmake/help/v3.0/variable/CMAKE_BUILD_TYPE.html). It is "forced" in 5 packages.
Buildroot is not standard and is used by only 2 packages. So I would vote for Release.
More globally, perhaps we should always set CMAKE_BUILD_TYPE to Release in pkg-cmake independently of the BR2_ENABLE_DEBUG value. This would allow us to remove all those workarounds.
Quoted 8 lines
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Best Regards,
Fabrice