Merge pull request #33199 from DaanDeMeyer/optimization

mkosi: Build with -O0 by default
This commit is contained in:
Luca Boccassi 2024-06-04 16:37:53 +01:00 committed by GitHub
commit 35c562a049
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 7 deletions

View file

@ -21,10 +21,7 @@ ln --symbolic "$BUILDDIR" "pkg/$ID/build"
# Because we run with --noextract we are responsible for making sure the source files appear in src/.
ln --symbolic . "pkg/$ID/src"
# shellcheck source=/dev/null
. /etc/makepkg.conf
MKOSI_CFLAGS="-Wp,-U_FORTIFY_SOURCE"
MKOSI_CFLAGS="-O0 -Wp,-U_FORTIFY_SOURCE"
if ((LLVM)); then
# TODO: Remove -fno-sanitize-function when https://github.com/systemd/systemd/issues/29972 is fixed.
MKOSI_CFLAGS="$MKOSI_CFLAGS -shared-libasan -fno-sanitize=function"

View file

@ -47,7 +47,7 @@ COMMON_MACRO_OVERRIDES=(
)
# TODO: Drop -U_FORTIFY_SOURCE when we switch to CentOS Stream 10.
MKOSI_CFLAGS="-Wp,-U_FORTIFY_SOURCE"
MKOSI_CFLAGS="-O0 -Wp,-U_FORTIFY_SOURCE"
if ((WITH_DEBUG)); then
MKOSI_CFLAGS="$MKOSI_CFLAGS -fdebug-prefix-map=../src=$SRCDEST"
fi

View file

@ -44,7 +44,7 @@ EOF
cat debian/changelog >>debian/changelog.new
mv debian/changelog.new debian/changelog
MKOSI_CFLAGS=""
MKOSI_CFLAGS="-O0"
if ((LLVM)); then
# TODO: Remove -fno-sanitize-function when https://github.com/systemd/systemd/issues/29972 is fixed.
MKOSI_CFLAGS="$MKOSI_CFLAGS -shared-libasan -fno-sanitize=function"

View file

@ -42,7 +42,7 @@ DIST="$(rpm --eval %dist)"
ARCH="$(rpm --eval %_arch)"
SRCDEST="/usr/src/debug/systemd-$VERSION-${RELEASE}${DIST}.$ARCH"
MKOSI_CFLAGS="-Wp,-U_FORTIFY_SOURCE"
MKOSI_CFLAGS="-O0 -Wp,-U_FORTIFY_SOURCE"
if ((WITH_DEBUG)); then
MKOSI_CFLAGS="$MKOSI_CFLAGS -fdebug-prefix-map=../src=$SRCDEST"
fi