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