Merge pull request #170072 from collares/rr-compile-fix
rr: disable LTO and build with current stdenv
This commit is contained in:
commit
93cf2b3865
@ -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 = [
|
||||
|
Loading…
Reference in New Issue
Block a user