From c331cfe5440c998d866aacaf5d5ded1ec15240c8 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 25 Jul 2025 21:13:32 +0100 Subject: [PATCH] cc-wrapper: don't set -fno-omit-frame-pointer on s390/x390x Without the change both `s390` and `s390x` `glibc` builds fail as https://hydra.nixos.org/build/303208799: In file included from ../sysdeps/s390/utf16-utf32-z9.c:501, from ../sysdeps/s390/multiarch/utf16-utf32-z9.c:20: ../iconv/loop.c: In function '__from_utf16_loop_vx_cu': ../iconv/loop.c:274:1: error: %r11 cannot be used in 'asm' here 274 | } | ^ Disable the `-fno-omit-frame-pointer` for now. --- pkgs/build-support/cc-wrapper/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 18714dd4440f..2a88e3369a99 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -810,9 +810,13 @@ stdenvNoCC.mkDerivation { # Do not prevent omission of framepointers on x86 32bit due to the small # number of general purpose registers. Keeping EBP available provides # non-trivial performance benefits. + # Also skip s390/s390x as it fails to build glibc and causes + # performance regressions: + # https://bugs.launchpad.net/ubuntu-z-systems/+bug/2064538 + # https://github.com/NixOS/nixpkgs/issues/428260 + ( let - enable_fp = !targetPlatform.isx86_32; + enable_fp = !targetPlatform.isx86_32 && !targetPlatform.isS390; enable_leaf_fp = enable_fp && (