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 14 postPatch = '' 15 substituteInPlace Makefile --replace "--static" "" 16 - '' + lib.optionalString stdenv.isi686 '' 17 - substituteInPlace Makefile --replace "-flto" "" 18 ''; 19 20 installPhase = ''
··· 13 14 postPatch = '' 15 substituteInPlace Makefile --replace "--static" "" 16 ''; 17 18 installPhase = ''
-4
pkgs/applications/virtualization/OVMF/default.nix
··· 30 31 hardeningDisable = [ "format" "stackprotector" "pic" "fortify" ]; 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 buildFlags = 38 lib.optionals secureBoot [ "-D SECURE_BOOT_ENABLE=TRUE" ] 39 ++ lib.optionals csmSupport [ "-D CSM_ENABLE" "-D FD_SIZE_2MB" ]
··· 30 31 hardeningDisable = [ "format" "stackprotector" "pic" "fortify" ]; 32 33 buildFlags = 34 lib.optionals secureBoot [ "-D SECURE_BOOT_ENABLE=TRUE" ] 35 ++ lib.optionals csmSupport [ "-D CSM_ENABLE" "-D FD_SIZE_2MB" ]
-3
pkgs/development/libraries/amdvlk/default.nix
··· 65 66 cmakeDir = "../drivers/xgl"; 67 68 - # LTO is disabled in gcc for i686 as of #66528 69 - cmakeFlags = lib.optionals stdenv.is32bit ["-DXGL_ENABLE_LTO=OFF"]; 70 - 71 installPhase = '' 72 install -Dm755 -t $out/lib icd/amdvlk${suffix}.so 73 install -Dm644 -t $out/share/vulkan/icd.d icd/amd_icd${suffix}.json
··· 65 66 cmakeDir = "../drivers/xgl"; 67 68 installPhase = '' 69 install -Dm755 -t $out/lib icd/amdvlk${suffix}.so 70 install -Dm644 -t $out/share/vulkan/icd.d icd/amd_icd${suffix}.json
-6
pkgs/servers/klipper/default.nix
··· 15 sha256 = "sha256-vUhP71vZ5XFG7MDkPFpAcCUL4kIdzHJ1hAkwqIi6ksQ="; 16 }; 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 sourceRoot = "source/klippy"; 25 26 # there is currently an attempt at moving it to Python 3, but it will remain
··· 15 sha256 = "sha256-vUhP71vZ5XFG7MDkPFpAcCUL4kIdzHJ1hAkwqIi6ksQ="; 16 }; 17 18 sourceRoot = "source/klippy"; 19 20 # there is currently an attempt at moving it to Python 3, but it will remain
-2
pkgs/tools/system/efibootmgr/default.nix
··· 22 sha256 = "1sbijvlpv4khkix3vix9mbhzffj8lp8zpnbxm9gnzjz8yssz9p5h"; 23 }) 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 28 makeFlags = [ "EFIDIR=nixos" "PKG_CONFIG=${stdenv.cc.targetPrefix}pkg-config" ]; 29
··· 22 sha256 = "1sbijvlpv4khkix3vix9mbhzffj8lp8zpnbxm9gnzjz8yssz9p5h"; 23 }) 24 ]; 25 26 makeFlags = [ "EFIDIR=nixos" "PKG_CONFIG=${stdenv.cc.targetPrefix}pkg-config" ]; 27
+5 -3
pkgs/tools/system/efivar/default.nix
··· 39 sha256 = "1ajj11wwsvamfspq4naanvw08h63gr0g71q0dfbrrywrhc0jlmdw"; 40 }) 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"; 45 46 nativeBuildInputs = [ pkg-config ]; 47 buildInputs = [ popt ];
··· 39 sha256 = "1ajj11wwsvamfspq4naanvw08h63gr0g71q0dfbrrywrhc0jlmdw"; 40 }) 41 ]; 42 + 43 + NIX_CFLAGS_COMPILE = [ 44 + "-Wno-error=stringop-truncation" 45 + "-flto-partition=none" 46 + ]; 47 48 nativeBuildInputs = [ pkg-config ]; 49 buildInputs = [ popt ];
-6
pkgs/top-level/all-packages.nix
··· 11715 reproducibleBuild = true; 11716 profiledCompiler = false; 11717 11718 - enableLTO = !stdenv.isi686; 11719 - 11720 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; 11721 threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null; 11722 ··· 11729 reproducibleBuild = true; 11730 profiledCompiler = false; 11731 11732 - enableLTO = !stdenv.isi686; 11733 - 11734 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; 11735 threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null; 11736 ··· 11742 11743 reproducibleBuild = true; 11744 profiledCompiler = false; 11745 - 11746 - enableLTO = !stdenv.isi686; 11747 11748 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; 11749 threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null;
··· 11715 reproducibleBuild = true; 11716 profiledCompiler = false; 11717 11718 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; 11719 threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null; 11720 ··· 11727 reproducibleBuild = true; 11728 profiledCompiler = false; 11729 11730 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; 11731 threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null; 11732 ··· 11738 11739 reproducibleBuild = true; 11740 profiledCompiler = false; 11741 11742 libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null; 11743 threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else null;