···30303131 hardeningDisable = [ "format" "stackprotector" "pic" "fortify" ];
32323333- # Fails on i686 with:
3434- # 'cc1: error: LTO support has not been enabled in this configuration'
3535- NIX_CFLAGS_COMPILE = lib.optionals stdenv.isi686 [ "-fno-lto" ];
3636-3733 buildFlags =
3834 lib.optionals secureBoot [ "-D SECURE_BOOT_ENABLE=TRUE" ]
3935 ++ lib.optionals csmSupport [ "-D CSM_ENABLE" "-D FD_SIZE_2MB" ]
-3
pkgs/development/libraries/amdvlk/default.nix
···65656666 cmakeDir = "../drivers/xgl";
67676868- # LTO is disabled in gcc for i686 as of #66528
6969- cmakeFlags = lib.optionals stdenv.is32bit ["-DXGL_ENABLE_LTO=OFF"];
7070-7168 installPhase = ''
7269 install -Dm755 -t $out/lib icd/amdvlk${suffix}.so
7370 install -Dm644 -t $out/share/vulkan/icd.d icd/amd_icd${suffix}.json
-6
pkgs/servers/klipper/default.nix
···1515 sha256 = "sha256-vUhP71vZ5XFG7MDkPFpAcCUL4kIdzHJ1hAkwqIi6ksQ=";
1616 };
17171818- # We have no LTO on i686 since commit 22284b0
1919- postPatch = lib.optionalString stdenv.isi686 ''
2020- substituteInPlace chelper/__init__.py \
2121- --replace "-flto -fwhole-program " ""
2222- '';
2323-2418 sourceRoot = "source/klippy";
25192620 # there is currently an attempt at moving it to Python 3, but it will remain
-2
pkgs/tools/system/efibootmgr/default.nix
···2222 sha256 = "1sbijvlpv4khkix3vix9mbhzffj8lp8zpnbxm9gnzjz8yssz9p5h";
2323 })
2424 ];
2525- # We have no LTO here since commit 22284b07.
2626- postPatch = if stdenv.isi686 then "sed '/^CFLAGS/s/-flto//' -i Make.defaults" else null;
27252826 makeFlags = [ "EFIDIR=nixos" "PKG_CONFIG=${stdenv.cc.targetPrefix}pkg-config" ];
2927
+5-3
pkgs/tools/system/efivar/default.nix
···3939 sha256 = "1ajj11wwsvamfspq4naanvw08h63gr0g71q0dfbrrywrhc0jlmdw";
4040 })
4141 ];
4242- # We have no LTO here since commit 22284b07. With GCC 10 that triggers a warning.
4343- postPatch = "sed '/^OPTIMIZE /s/-flto//' -i Make.defaults";
4444- NIX_CFLAGS_COMPILE = "-Wno-error=stringop-truncation";
4242+4343+ NIX_CFLAGS_COMPILE = [
4444+ "-Wno-error=stringop-truncation"
4545+ "-flto-partition=none"
4646+ ];
45474648 nativeBuildInputs = [ pkg-config ];
4749 buildInputs = [ popt ];
-6
pkgs/top-level/all-packages.nix
···1171511715 reproducibleBuild = true;
1171611716 profiledCompiler = false;
11717117171171811718- enableLTO = !stdenv.isi686;
1171911719-1172011718 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
1172111719 threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null;
1172211720···1172911727 reproducibleBuild = true;
1173011728 profiledCompiler = false;
11731117291173211732- enableLTO = !stdenv.isi686;
1173311733-1173411730 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
1173511731 threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null;
1173611732···11742117381174311739 reproducibleBuild = true;
1174411740 profiledCompiler = false;
1174511745-1174611746- enableLTO = !stdenv.isi686;
11747117411174811742 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
1174911743 threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null;