From 233f451841a0bfb0f22c3e36d2e6893a8e8e27a8 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Fri, 5 Nov 2021 21:30:46 -0700 Subject: [PATCH] treewide: reenable LTO on i686 --- pkgs/applications/misc/curaengine/stable.nix | 2 -- pkgs/applications/virtualization/OVMF/default.nix | 4 ---- pkgs/development/libraries/amdvlk/default.nix | 3 --- pkgs/servers/klipper/default.nix | 6 ------ pkgs/tools/system/efibootmgr/default.nix | 2 -- 5 files changed, 17 deletions(-) diff --git a/pkgs/applications/misc/curaengine/stable.nix b/pkgs/applications/misc/curaengine/stable.nix index 148553da1621..3c74aaaded4a 100644 --- a/pkgs/applications/misc/curaengine/stable.nix +++ b/pkgs/applications/misc/curaengine/stable.nix @@ -13,8 +13,6 @@ stdenv.mkDerivation { postPatch = '' substituteInPlace Makefile --replace "--static" "" - '' + lib.optionalString stdenv.isi686 '' - substituteInPlace Makefile --replace "-flto" "" ''; installPhase = '' diff --git a/pkgs/applications/virtualization/OVMF/default.nix b/pkgs/applications/virtualization/OVMF/default.nix index 1d1788ba0d80..7adcd328add7 100644 --- a/pkgs/applications/virtualization/OVMF/default.nix +++ b/pkgs/applications/virtualization/OVMF/default.nix @@ -30,10 +30,6 @@ edk2.mkDerivation projectDscPath { hardeningDisable = [ "format" "stackprotector" "pic" "fortify" ]; - # Fails on i686 with: - # 'cc1: error: LTO support has not been enabled in this configuration' - NIX_CFLAGS_COMPILE = lib.optionals stdenv.isi686 [ "-fno-lto" ]; - buildFlags = lib.optionals secureBoot [ "-D SECURE_BOOT_ENABLE=TRUE" ] ++ lib.optionals csmSupport [ "-D CSM_ENABLE" "-D FD_SIZE_2MB" ] diff --git a/pkgs/development/libraries/amdvlk/default.nix b/pkgs/development/libraries/amdvlk/default.nix index 9eec2be67b7b..de3c2bc4a072 100644 --- a/pkgs/development/libraries/amdvlk/default.nix +++ b/pkgs/development/libraries/amdvlk/default.nix @@ -65,9 +65,6 @@ in stdenv.mkDerivation rec { cmakeDir = "../drivers/xgl"; - # LTO is disabled in gcc for i686 as of #66528 - cmakeFlags = lib.optionals stdenv.is32bit ["-DXGL_ENABLE_LTO=OFF"]; - installPhase = '' install -Dm755 -t $out/lib icd/amdvlk${suffix}.so install -Dm644 -t $out/share/vulkan/icd.d icd/amd_icd${suffix}.json diff --git a/pkgs/servers/klipper/default.nix b/pkgs/servers/klipper/default.nix index 75d08caf3a21..051497f863cb 100644 --- a/pkgs/servers/klipper/default.nix +++ b/pkgs/servers/klipper/default.nix @@ -15,12 +15,6 @@ stdenv.mkDerivation rec { sha256 = "sha256-vUhP71vZ5XFG7MDkPFpAcCUL4kIdzHJ1hAkwqIi6ksQ="; }; - # We have no LTO on i686 since commit 22284b0 - postPatch = lib.optionalString stdenv.isi686 '' - substituteInPlace chelper/__init__.py \ - --replace "-flto -fwhole-program " "" - ''; - sourceRoot = "source/klippy"; # there is currently an attempt at moving it to Python 3, but it will remain diff --git a/pkgs/tools/system/efibootmgr/default.nix b/pkgs/tools/system/efibootmgr/default.nix index 0c678dd9c51b..fd7eceede159 100644 --- a/pkgs/tools/system/efibootmgr/default.nix +++ b/pkgs/tools/system/efibootmgr/default.nix @@ -22,8 +22,6 @@ stdenv.mkDerivation rec { sha256 = "1sbijvlpv4khkix3vix9mbhzffj8lp8zpnbxm9gnzjz8yssz9p5h"; }) ]; - # We have no LTO here since commit 22284b07. - postPatch = if stdenv.isi686 then "sed '/^CFLAGS/s/-flto//' -i Make.defaults" else null; makeFlags = [ "EFIDIR=nixos" "PKG_CONFIG=${stdenv.cc.targetPrefix}pkg-config" ];