treewide: reenable LTO on i686

This commit is contained in:
Ryan Burns 2021-11-05 21:30:46 -07:00
parent dff528efbf
commit 233f451841
5 changed files with 0 additions and 17 deletions

View File

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

View File

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

View File

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

View File

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

View File

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