]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
systemd: disable linker GCS warning on aarch64
authorTrevor Woerner <twoerner@gmail.com>
Wed, 7 May 2025 19:26:34 +0000 (15:26 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 12 May 2025 09:52:52 +0000 (10:52 +0100)
openssl has some assembler code that has PAC and BTI hints but not GCS. The
systemd recipe then links to libcrypto from openssl with GCS enabled (as
that is a distro-wide setting) and it - correctly - warns that it is being
told to use GCS but one of the inputs does not have GCS. This would not
be a problem but systemd also links with â€”fatal-warnings, so the build
explodes.

libcrypto.so: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
| collect2: error: ld returned 1 exit status

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/systemd/systemd_257.5.bb

index acf97517a94a28c68aae83cda6e2dd783094d062..995b55580e4a038a64a604f44c47068c4a27ac24 100644 (file)
@@ -240,6 +240,7 @@ RESOLV_CONF ??= ""
 # bpf-framework: pass the recipe-sysroot to the compiler used to build
 # the eBPFs, so that it can find needed system includes in there.
 CFLAGS:append = " --sysroot=${STAGING_DIR_TARGET}"
+LDFLAGS:append:aarch64 = " ${@bb.utils.contains('PACKAGECONFIG', 'openssl', '-Wl,-z,gcs-report-dynamic=none', '', d)}"
 
 EXTRA_OEMESON += "-Dnobody-user=nobody \
                   -Dnobody-group=nogroup \