Merge pull request #144832 from r-burns/i686-lto

authored by

Sandro and committed by
GitHub
b275c083 1442afd8

+5 -26
-2
pkgs/applications/misc/curaengine/stable.nix
··· 13 13 14 14 postPatch = '' 15 15 substituteInPlace Makefile --replace "--static" "" 16 - '' + lib.optionalString stdenv.isi686 '' 17 - substituteInPlace Makefile --replace "-flto" "" 18 16 ''; 19 17 20 18 installPhase = ''
-4
pkgs/applications/virtualization/OVMF/default.nix
··· 30 30 31 31 hardeningDisable = [ "format" "stackprotector" "pic" "fortify" ]; 32 32 33 - # Fails on i686 with: 34 - # 'cc1: error: LTO support has not been enabled in this configuration' 35 - NIX_CFLAGS_COMPILE = lib.optionals stdenv.isi686 [ "-fno-lto" ]; 36 - 37 33 buildFlags = 38 34 lib.optionals secureBoot [ "-D SECURE_BOOT_ENABLE=TRUE" ] 39 35 ++ lib.optionals csmSupport [ "-D CSM_ENABLE" "-D FD_SIZE_2MB" ]
-3
pkgs/development/libraries/amdvlk/default.nix
··· 65 65 66 66 cmakeDir = "../drivers/xgl"; 67 67 68 - # LTO is disabled in gcc for i686 as of #66528 69 - cmakeFlags = lib.optionals stdenv.is32bit ["-DXGL_ENABLE_LTO=OFF"]; 70 - 71 68 installPhase = '' 72 69 install -Dm755 -t $out/lib icd/amdvlk${suffix}.so 73 70 install -Dm644 -t $out/share/vulkan/icd.d icd/amd_icd${suffix}.json
-6
pkgs/servers/klipper/default.nix
··· 15 15 sha256 = "sha256-vUhP71vZ5XFG7MDkPFpAcCUL4kIdzHJ1hAkwqIi6ksQ="; 16 16 }; 17 17 18 - # We have no LTO on i686 since commit 22284b0 19 - postPatch = lib.optionalString stdenv.isi686 '' 20 - substituteInPlace chelper/__init__.py \ 21 - --replace "-flto -fwhole-program " "" 22 - ''; 23 - 24 18 sourceRoot = "source/klippy"; 25 19 26 20 # there is currently an attempt at moving it to Python 3, but it will remain
-2
pkgs/tools/system/efibootmgr/default.nix
··· 22 22 sha256 = "1sbijvlpv4khkix3vix9mbhzffj8lp8zpnbxm9gnzjz8yssz9p5h"; 23 23 }) 24 24 ]; 25 - # We have no LTO here since commit 22284b07. 26 - postPatch = if stdenv.isi686 then "sed '/^CFLAGS/s/-flto//' -i Make.defaults" else null; 27 25 28 26 makeFlags = [ "EFIDIR=nixos" "PKG_CONFIG=${stdenv.cc.targetPrefix}pkg-config" ]; 29 27
+5 -3
pkgs/tools/system/efivar/default.nix
··· 39 39 sha256 = "1ajj11wwsvamfspq4naanvw08h63gr0g71q0dfbrrywrhc0jlmdw"; 40 40 }) 41 41 ]; 42 - # We have no LTO here since commit 22284b07. With GCC 10 that triggers a warning. 43 - postPatch = "sed '/^OPTIMIZE /s/-flto//' -i Make.defaults"; 44 - NIX_CFLAGS_COMPILE = "-Wno-error=stringop-truncation"; 42 + 43 + NIX_CFLAGS_COMPILE = [ 44 + "-Wno-error=stringop-truncation" 45 + "-flto-partition=none" 46 + ]; 45 47 46 48 nativeBuildInputs = [ pkg-config ]; 47 49 buildInputs = [ popt ];
-6
pkgs/top-level/all-packages.nix
··· 11715 11715 reproducibleBuild = true; 11716 11716 profiledCompiler = false; 11717 11717 11718 - enableLTO = !stdenv.isi686; 11719 - 11720 11718 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; 11721 11719 threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null; 11722 11720 ··· 11729 11727 reproducibleBuild = true; 11730 11728 profiledCompiler = false; 11731 11729 11732 - enableLTO = !stdenv.isi686; 11733 - 11734 11730 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; 11735 11731 threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null; 11736 11732 ··· 11742 11738 11743 11739 reproducibleBuild = true; 11744 11740 profiledCompiler = false; 11745 - 11746 - enableLTO = !stdenv.isi686; 11747 11741 11748 11742 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; 11749 11743 threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null;