diff mbox series

[meta-oe,1/1] ne10: Avoid requesting an executable stack

Message ID 20250403212342.3580553-1-pkj@axis.com
State Accepted
Headers show
Series [meta-oe,1/1] ne10: Avoid requesting an executable stack | expand

Commit Message

Peter Kjellerstedt April 3, 2025, 9:23 p.m. UTC
This avoids warnings like:

  ld: warning: NE10_physics.neon.s.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

With glibc 2.41, the need for an executable stack lead to errors like
this in runtime:

  [ ERR     ] foo@0[984]: [setup-script: /usr/share/foo/foo.enc] sol:
  runtime error: libNE10.so.10: cannot enable executable stack as shared
  object requires: Invalid argument

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta-oe/recipes-support/ne10/ne10_1.2.1.bb | 1 +
 1 file changed, 1 insertion(+)

Comments

Ross Burton May 1, 2025, 8:22 a.m. UTC | #1
On 3 Apr 2025, at 22:23, Peter Kjellerstedt via lists.openembedded.org <peter.kjellerstedt=axis.com@lists.openembedded.org> wrote:
> 
> This avoids warnings like:
> 
>  ld: warning: NE10_physics.neon.s.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

Considering ne10 hasn’t had a commit in seven years and the only user in meta-oe (libopus) also has intrinsic codepaths which the compiler probably does a better job at optimising, I’m wondering if we should just drop ne10 entirely.

Did you come across this from any specific recipe that isn’t libopus?

Cheers,
Ross
Peter Kjellerstedt May 1, 2025, 4:04 p.m. UTC | #2
> -----Original Message-----
> From: Ross Burton <Ross.Burton@arm.com>
> Sent: den 1 maj 2025 10:22
> To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> Cc: openembedded-devel@lists.openembedded.org
> Subject: Re: [oe] [meta-oe][PATCH 1/1] ne10: Avoid requesting an
> executable stack
> 
> On 3 Apr 2025, at 22:23, Peter Kjellerstedt via lists.openembedded.org
> <peter.kjellerstedt=axis.com@lists.openembedded.org> wrote:
> >
> > This avoids warnings like:
> >
> >  ld: warning: NE10_physics.neon.s.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
> 
> Considering ne10 hasn’t had a commit in seven years and the only user in
> meta-oe (libopus) also has intrinsic codepaths which the compiler probably
> does a better job at optimising, I’m wondering if we should just drop ne10
> entirely.
> 
> Did you come across this from any specific recipe that isn’t libopus?
> 
> Cheers,
> Ross

We have a couple of our own recipes that depend on ne10.

//Peter
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/ne10/ne10_1.2.1.bb b/meta-oe/recipes-support/ne10/ne10_1.2.1.bb
index b10c23984d..39ff7ab969 100644
--- a/meta-oe/recipes-support/ne10/ne10_1.2.1.bb
+++ b/meta-oe/recipes-support/ne10/ne10_1.2.1.bb
@@ -26,6 +26,7 @@  NE10_TARGET_ARCH:armv7a = "${@bb.utils.contains("TUNE_FEATURES","neon","armv7","
 NE10_TARGET_ARCH:armv7ve = "${@bb.utils.contains("TUNE_FEATURES","neon","armv7","",d)}"
 
 EXTRA_OECMAKE = '-DGNULINUX_PLATFORM=ON -DNE10_BUILD_SHARED=ON -DNE10_LINUX_TARGET_ARCH="${NE10_TARGET_ARCH}"'
+CFLAGS += "-Wa,--noexecstack"
 
 do_install() {
     install -d ${D}${libdir}