All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/cairo: fix pthread detection
@ 2023-08-11  5:30 Waldemar Brodkorb
  2023-08-12 12:21 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Waldemar Brodkorb @ 2023-08-11  5:30 UTC (permalink / raw)
  To: buildroot

Cairo configure fails to detect pthreads, because of the following warning
binutils 2.39+ emits:
ld: warning: some.o: missing .note.GNU-stack section implies executable stack
ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker

Then the build errors out with:
error: #error "XXX: No mutex implementation found.  Cairo will not work with multiple threads.

Fixes:
 - http://autobuild.buildroot.net/results/2c4/2c4b983248b25ed6769c91d8b687c54434068eb7

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
 package/cairo/cairo.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/cairo/cairo.mk b/package/cairo/cairo.mk
index 7bc8f92deb..3373aa4f73 100644
--- a/package/cairo/cairo.mk
+++ b/package/cairo/cairo.mk
@@ -26,8 +26,12 @@ ifeq ($(BR2_m68k_cf),y)
 CAIRO_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -mxgot"
 endif
 
+# cairo configure check for pthreads is failing when
+# binutils is warning about executable stack
 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS_NPTL),)
 CAIRO_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) -DCAIRO_NO_MUTEX=1"
+else
+CAIRO_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -z noexecstack"
 endif
 
 # cairo can use C++11 atomics when available, so we need to link with
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-12 12:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-11  5:30 [Buildroot] [PATCH] package/cairo: fix pthread detection Waldemar Brodkorb
2023-08-12 12:21 ` Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.