All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mikko Rapeli <mikko.rapeli@linaro.org>
To: raj.khem@gmail.com
Cc: Sathishkumar Duraisamy <sathishkumar.d.cbe@gmail.com>,
	openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] systemd build failure with gcc 15 / tpm2 / aarch64: gcs required
Date: Tue, 6 May 2025 16:45:46 +0300	[thread overview]
Message-ID: <aBoSim_nkIBMMsXM@nuoska> (raw)
In-Reply-To: <CAMKF1spwEwgVaa5AM05drEsv3JGNVS4=g30JkHZpYFHBmdzhNQ@mail.gmail.com>

Hi,

On Tue, May 06, 2025 at 06:32:02AM -0700, Khem Raj via lists.openembedded.org wrote:
> On Tue, May 6, 2025 at 6:28 AM Sathishkumar Duraisamy <
> sathishkumar.d.cbe@gmail.com> wrote:
> 
> > Hi
> >
> > On Tue, May 6, 2025 at 6:43 PM Khem Raj <raj.khem@gmail.com> wrote:
> >
> >> On Tue, May 6, 2025 at 4:38 AM Sathishkumar D via
> >> lists.openembedded.org
> >> <sathishkumar.d.cbe=gmail.com@lists.openembedded.org> wrote:
> >> >
> >> > Hi all,
> >> >
> >> > I am also facing the same build issue. I tried to understand the issue.
> >> From build system for both openssl and systemd,
> >> -mbranch-protection=standard   enabled. In fact the support this flag added
> >> long back,
> >> https://github.com/openembedded/openembedded-core/commit/8905639d1cdc5ce809cc5ecd9672f5e86bf8a579
> >> and tpm2 introduces additional dependencies for systemd as in commit
> >> https://git.yoctoproject.org/meta-security/commit/meta-tpm/recipes-core/systemd/systemd_%25.bbappend?id=6eb3098e57881895e62fc811f714c2aa4ecfcf8f
> >> .
> >> >
> >>
> >> is this flag passed to linker as well ?
> >>
> >> Openssl:
> > =======
> >
> > export CC="aarch64-tdx-linux-gcc  -march=armv8-a+crypto
> > -mbranch-protection=standard -fstack-protector-strong  -O2
> > -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security
> > --sysroot=/home/sathishkumar/yoctospace/verdin-next/build/tmp/work/armv8a-tdx-linux/openssl/3.5.0/recipe-sysroot"
> >
> > export CFLAGS=" -O2 -g
> >  -ffile-prefix-map=/home/sathishkumar/yoctospace/verdin-next/build/tmp/work/armv8a-tdx-linux/openssl/3.5.0/openssl-3.5.0=/usr/src/debug/openssl/3.5.0
> >  -ffile-prefix-map=/home/sathishkumar/yoctospace/verdin-next/build/tmp/work/armv8a-tdx-linux/openssl/3.5.0/build=/usr/src/debug/openssl/3.5.0
> >  -ffile-prefix-map=/home/sathishkumar/yoctospace/verdin-next/build/tmp/work/armv8a-tdx-linux/openssl/3.5.0/recipe-sysroot=
> >  -ffile-prefix-map=/home/sathishkumar/yoctospace/verdin-next/build/tmp/work/armv8a-tdx-linux/openssl/3.5.0/recipe-sysroot-native=
> >  -pipe -Wl,-z,gcs-compliant=all "
> >
> > export LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
> >  -ffile-prefix-map=/home/sathishkumar/yoctospace/verdin-next/build/tmp/work/armv8a-tdx-linux/openssl/3.5.0/openssl-3.5.0=/usr/src/debug/openssl/3.5.0
> >  -ffile-prefix-map=/home/sathishkumar/yoctospace/verdin-next/build/tmp/work/armv8a-tdx-linux/openssl/3.5.0/build=/usr/src/debug/openssl/3.5.0
> >  -ffile-prefix-map=/home/sathishkumar/yoctospace/verdin-next/build/tmp/work/armv8a-tdx-linux/openssl/3.5.0/recipe-sysroot=
> >  -ffile-prefix-map=/home/sathishkumar/yoctospace/verdin-next/build/tmp/work/armv8a-tdx-linux/openssl/3.5.0/recipe-sysroot-native=
> >  -Wl,-z,relro,-z,now"
> >
> > systemd
> > ======
> >
> > export CC="aarch64-tdx-linux-gcc  -march=armv8-a+crypto
> > -mbranch-protection=standard -fstack-protector-strong  -O2
> > -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security
> > --sysroot=/home/sathishkumar/yoctospace/verdin-next/build/tmp/work/armv8a-tdx-linux/systemd/257.5/recipe-sysroot"
> >
> > export CFLAGS=" -O2 -g
> >  -ffile-prefix-map=/home/sathishkumar/yoctospace/verdin-next/build/tmp/work/armv8a-tdx-linux/systemd/257.5/git=/usr/src/debug/systemd/257.5
> >  -ffile-prefix-map=/home/sathishkumar/yoctospace/verdin-next/build/tmp/work/armv8a-tdx-linux/systemd/257.5/build=/usr/src/debug/systemd/257.5
> >  -ffile-prefix-map=/home/sathishkumar/yoctospace/verdin-next/build/tmp/work/armv8a-tdx-linux/systemd/257.5/recipe-sysroot=
> >  -ffile-prefix-map=/home/sathishkumar/yoctospace/verdin-next/build/tmp/work/armv8a-tdx-linux/systemd/257.5/recipe-sysroot-native=
> >  -pipe
> > --sysroot=/home/sathishkumar/yoctospace/verdin-next/build/tmp/work/armv8a-tdx-linux/systemd/257.5/recipe-sysroot"
> >
> > export LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
> >  -ffile-prefix-map=/home/sathishkumar/yoctospace/verdin-next/build/tmp/work/armv8a-tdx-linux/systemd/257.5/git=/usr/src/debug/systemd/257.5
> >  -ffile-prefix-map=/home/sathishkumar/yoctospace/verdin-next/build/tmp/work/armv8a-tdx-linux/systemd/257.5/build=/usr/src/debug/systemd/257.5
> >  -ffile-prefix-map=/home/sathishkumar/yoctospace/verdin-next/build/tmp/work/armv8a-tdx-linux/systemd/257.5/recipe-sysroot=
> >  -ffile-prefix-map=/home/sathishkumar/yoctospace/verdin-next/build/tmp/work/armv8a-tdx-linux/systemd/257.5/recipe-sysroot-native=
> >  -Wl,-z,relro,-z,now"
> >
> 
> Please post exact linker command line to build libcrypto.so as well

FWIW, this reproduces on genericarm64 machine, poky-altcfg distro, tpm2 added to
MACHINE_FEATURES and meta-security/meta-tpm layer added to build. It is triggered by
"openssl" in systemd PACKAGECONFIG.

Cheers,

-Mikko


  reply	other threads:[~2025-05-06 13:45 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-05 11:46 systemd build failure with gcc 15 / tpm2 / aarch64: gcs required Max Krummenacher
2025-05-05 12:33 ` [OE-core] " Vyacheslav Yurkov
2025-05-05 12:56   ` Max Krummenacher
2025-05-05 14:45 ` Khem Raj
2025-05-05 19:09   ` [OE-core] " Randy MacLeod
2025-05-06 11:38     ` Sathishkumar D
2025-05-06 12:24       ` [OE-core] " Mikko Rapeli
2025-05-06 13:13       ` Khem Raj
2025-05-06 13:28         ` Sathishkumar Duraisamy
2025-05-06 13:32           ` Khem Raj
2025-05-06 13:45             ` Mikko Rapeli [this message]
2025-05-06 14:21               ` Max Krummenacher
2025-05-06 22:59           ` Khem Raj
2025-05-07  6:04             ` Sathishkumar Duraisamy
2025-05-07  6:14               ` Khem Raj
2025-05-07  8:22                 ` Mikko Rapeli
     [not found]                 ` <183D310FC8853D5E.1749@lists.openembedded.org>
2025-05-07  8:31                   ` Mikko Rapeli
2025-05-07  8:55                     ` Sathishkumar Duraisamy
2025-05-07 14:22                   ` Mikko Rapeli
2025-05-07 14:35                     ` Khem Raj
2025-05-07 16:05                       ` Sathishkumar Duraisamy
2025-05-07 18:29                     ` Trevor Woerner
2025-05-07 18:33                       ` Ross Burton
2025-05-07 18:38                         ` Khem Raj
2025-05-07 19:04                           ` Trevor Woerner
2025-05-07 19:10                             ` Trevor Woerner
2025-05-07 19:51                               ` Khem Raj
2025-05-08  6:22                               ` Mikko Rapeli
2025-05-08  7:00                                 ` Khem Raj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aBoSim_nkIBMMsXM@nuoska \
    --to=mikko.rapeli@linaro.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=raj.khem@gmail.com \
    --cc=sathishkumar.d.cbe@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.