package/snappy: remove pthread handling for static builds
PATCH 1/1 package/snappy: remove pthread handling for static builds
As pointed out by Thomas[1] the special handling of libpthread for static builds is not needed anymore.
Tested with the following musl & uclibc defconfigs which also fix build errors:
http://autobuild.buildroot.net/results/39f/39f9fc4300ddca19e8a533765b46838003752000/
http://autobuild.buildroot.net/results/886/8860b9259f7a3aecb2ddbfa787be048072bd347b/
[1] http://lists.busybox.net/pipermail/buildroot/2017-July/199549.html
--- package/snappy/snappy.mk | 9 --------- 1 file changed, 9 deletions(-)
package/snappy/snappy.mk +0 -9
@@ -11,13 +11,4 @@ SNAPPY_LICENSE_FILES = COPYING SNAPPY_INSTALL_STAGING = YES SNAPPY_CONF_OPTS = -DSNAPPY_BUILD_TESTS=OFF -# libsnappy links with libstdc++. Some libstdc++/arch variants use -# pthread symbols for internal locking if built with thread -# support. libstdc++ does not have a .pc file, and its .la file does -# not mention -pthread. So, static linkig to libstdc++ will fail if -# -pthread is not explicity linked to. Only do that for static builds. -ifeq ($(BR2_STATIC_LIBS)$(BR2_TOOLCHAIN_HAS_THREADS),yy) -SNAPPY_CONF_OPTS += LIBS=-pthread -endif - $(eval $(cmake-package))
Signature · 1 line
2.11.0
PATCH 1/1 package/snappy: remove pthread handling for static builds
Bernd, All,
On 2017-08-04 06:02 +0200, Bernd Kuhls spake thusly:
Quoted 2 lines
As pointed out by Thomas[1] the special handling of libpthread for static builds is not needed anymore.
What is iomportant to state is why it is no longer needed.
Previously, the unit-tests were always built, and that's what caused the linking errors.
But now, we explicitly no longer build the unit-tests, so we no longer need to workar9ond the static build limitation anymore.
However, it is to be noted that packages that link against a static snappy will still need to add -pthreads to their linker flags (if they don't already do tht for themselves, that is).
Otherwise:
Regards,
Yann E. MORIN.
Quoted 33 lines
Tested with the following musl & uclibc defconfigs which also fix build errors:
http://autobuild.buildroot.net/results/39f/39f9fc4300ddca19e8a533765b46838003752000/
http://autobuild.buildroot.net/results/886/8860b9259f7a3aecb2ddbfa787be048072bd347b/[1] http://lists.busybox.net/pipermail/buildroot/2017-July/199549.html
Signed-off-by Bernd Kuhls <[email protected]>--- package/snappy/snappy.mk | 9 --------- 1 file changed, 9 deletions(-)package/snappy/snappy.mk +0
-9@@ -11,13 +11,4 @@ SNAPPY_LICENSE_FILES = COPYING SNAPPY_INSTALL_STAGING = YES SNAPPY_CONF_OPTS = -DSNAPPY_BUILD_TESTS=OFF -# libsnappy links with libstdc++. Some libstdc++/arch variants use -# pthread symbols for internal locking if built with thread -# support. libstdc++ does not have a .pc file, and its .la file does -# not mention -pthread. So, static linkig to libstdc++ will fail if -# -pthread is not explicity linked to. Only do that for static builds. -ifeq ($(BR2_STATIC_LIBS)$(BR2_TOOLCHAIN_HAS_THREADS),yy) -SNAPPY_CONF_OPTS += LIBS=-pthread -endif - $(eval $(cmake-package))Signature · 1 line
2.11.0
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
Arnout Vandecappelle
AppliedPATCH 1/1 package/snappy: remove pthread handling for static builds
In reply to Bernd KuhlsQuoted 11 lines · Bernd Kuhls
As pointed out by Thomas[1] the special handling of libpthread for static builds is not needed anymore.
Tested with the following musl & uclibc defconfigs which also fix build errors:
http://autobuild.buildroot.net/results/39f/39f9fc4300ddca19e8a533765b46838003752000/
http://autobuild.buildroot.net/results/886/8860b9259f7a3aecb2ddbfa787be048072bd347b/[1] http://lists.busybox.net/pipermail/buildroot/2017-July/199549.html
Signed-off-by Bernd Kuhls <[email protected]>
Applied to master, with an improved commit message from Baruch (whose Sob I
also added) and a remark about why -pthread is no longer needed as suggested by Yann.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF