treewide: reenable LTO on i686

main
Ryan Burns 3 years ago
parent dff528efbf
commit 233f451841
  1. 2
      pkgs/applications/misc/curaengine/stable.nix
  2. 4
      pkgs/applications/virtualization/OVMF/default.nix
  3. 3
      pkgs/development/libraries/amdvlk/default.nix
  4. 6
      pkgs/servers/klipper/default.nix
  5. 2
      pkgs/tools/system/efibootmgr/default.nix

@ -13,8 +13,6 @@ stdenv.mkDerivation {
postPatch = ''
substituteInPlace Makefile --replace "--static" ""
'' + lib.optionalString stdenv.isi686 ''
substituteInPlace Makefile --replace "-flto" ""
'';
installPhase = ''

@ -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" ]

@ -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

@ -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

@ -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" ];

Loading…
Cancel
Save