summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorMauricio Collares <mauricio@collares.org>2022-04-24 11:34:51 +0200
committerMauricio Collares <mauricio@collares.org>2022-04-24 11:36:35 +0200
commitad97a4885528522216877350e33f3586b838ad8e (patch)
tree394b8148d90aace5f9e9c0bbad2086f4afb8baf4 /pkgs/development
parentbc41b01dd7a9fdffd32d9b03806798797532a5fe (diff)
downloadnixpkgs-ad97a4885528522216877350e33f3586b838ad8e.tar
nixpkgs-ad97a4885528522216877350e33f3586b838ad8e.tar.gz
nixpkgs-ad97a4885528522216877350e33f3586b838ad8e.tar.bz2
nixpkgs-ad97a4885528522216877350e33f3586b838ad8e.tar.lz
nixpkgs-ad97a4885528522216877350e33f3586b838ad8e.tar.xz
nixpkgs-ad97a4885528522216877350e33f3586b838ad8e.tar.zst
nixpkgs-ad97a4885528522216877350e33f3586b838ad8e.zip
rr: disable LTO and build with current stdenv
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/tools/analysis/rr/default.nix16
1 files changed, 11 insertions, 5 deletions
diff --git a/pkgs/development/tools/analysis/rr/default.nix b/pkgs/development/tools/analysis/rr/default.nix
index bda6f7e4e3c..a667de3d5cb 100644
--- a/pkgs/development/tools/analysis/rr/default.nix
+++ b/pkgs/development/tools/analysis/rr/default.nix
@@ -1,6 +1,6 @@
-{ lib, gcc9Stdenv, fetchFromGitHub, cmake, libpfm, zlib, pkg-config, python3Packages, which, procps, gdb, capnproto }:
+{ lib, stdenv, fetchFromGitHub, cmake, libpfm, zlib, pkg-config, python3Packages, which, procps, gdb, capnproto }:
 
-gcc9Stdenv.mkDerivation rec {
+stdenv.mkDerivation rec {
   version = "5.5.0";
   pname = "rr";
 
@@ -17,9 +17,15 @@ gcc9Stdenv.mkDerivation rec {
     patchShebangs .
   '';
 
-  # TODO: remove this preConfigure hook after 5.2.0 since it is fixed upstream
-  # see https://github.com/mozilla/rr/issues/2269
-  preConfigure = ''substituteInPlace CMakeLists.txt --replace "std=c++11" "std=c++14"'';
+  # With LTO enabled, linking fails with the following message:
+  #
+  # src/AddressSpace.cc:1666: undefined reference to `rr_syscall_addr'
+  # ld.bfd: bin/rr: hidden symbol `rr_syscall_addr' isn't defined
+  # ld.bfd: final link failed: bad value
+  # collect2: error: ld returned 1 exit status
+  #
+  # See also https://github.com/NixOS/nixpkgs/pull/110846
+  preConfigure = ''substituteInPlace CMakeLists.txt --replace "-flto" ""'';
 
   nativeBuildInputs = [ cmake pkg-config which ];
   buildInputs = [