Buildroot Archive on 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

* Re: [Buildroot] [PATCH] package/cairo: fix pthread detection
  2023-08-11  5:30 [Buildroot] [PATCH] package/cairo: fix pthread detection Waldemar Brodkorb
@ 2023-08-12 12:21 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-08-12 12:21 UTC (permalink / raw)
  To: Waldemar Brodkorb; +Cc: Bernd Kuhls, Fabrice Fontaine, buildroot

Hello,

+Bernd, +Fabrice,

On Fri, 11 Aug 2023 07:30:24 +0200
Waldemar Brodkorb <wbx@openadk.org> wrote:

> 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(+)

Thanks, however, we already have two previous proposals to address this issue:

  https://patchwork.ozlabs.org/project/buildroot/list/?series=&submitter=&state=&q=cairo&archive=&delegate=

The one from Bernd being identical to yours. I'm not sure which one is
correct. Building the entire cairo code with -Wl,-z,noexecstack just to
solve a bogus configure check seems a bit strange to me.

Since Bernd's proposal came in before yours, I've kept Bernd's patch in
our list of patches to review.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox