1
0

Disable LTO, reinforce CFLAGS

This commit is contained in:
Jan Engelhardt 2024-08-19 02:30:19 +02:00
parent 1a2400f029
commit 4cbe32c50d
2 changed files with 9 additions and 1 deletions

View File

@ -4,6 +4,7 @@ Sun Aug 18 23:46:46 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
- Update to release 1.11.0 - Update to release 1.11.0
* mount: Fix UAF in option string handling * mount: Fix UAF in option string handling
* mount: Support asking for password via systemd-ask-password * mount: Support asking for password via systemd-ask-password
- Fix a crash in mkfs.bcachefs by disabling LTO.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jul 22 09:06:43 UTC 2024 - David Disseldorp <ddiss@suse.de> Mon Jul 22 09:06:43 UTC 2024 - David Disseldorp <ddiss@suse.de>

View File

@ -62,11 +62,18 @@ This package contains utilities for creating and mounting bcachefs.
%autosetup -p1 %autosetup -p1
%build %build
# The combination of -Og/-O1/-O2 + LTO produces a broken mkfs.bcachefs which
# crashes (disabling one of the two fixes it). Given this -O+LTO scenario, if
# -g2 is also used, the lto1-wpa process runs into memory exhaustion (>80GB)
# and the build fails altogether.
%define _lto_cflags %nil
# gh/koverstreet/bcachefs-tools#237 # gh/koverstreet/bcachefs-tools#237
# bcachefs-tools uses malloc_usable_size, which is incompatible # bcachefs-tools uses malloc_usable_size, which is incompatible
# with fortification level 3 # with fortification level 3
export CFLAGS="${RPM_OPT_FLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}" export CFLAGS="${RPM_OPT_FLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
export CXXFLAGS="${RPM_OPT_FLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}" export CXXFLAGS="$CFLAGS"
# Workaround antisocial Makefile that forces its own -O level
export EXTRA_CFLAGS="$CFLAGS"
%make_build PREFIX="%_prefix" ROOT_SBINDIR="%_sbindir" %make_build PREFIX="%_prefix" ROOT_SBINDIR="%_sbindir"
%install %install