Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Merge pull request #52014 from hedning/fix-darwin-valgrind

valgrind: fix build on darwin

authored by

Tor Hedin Brønner and committed by
GitHub
ddd05706 1d7317e2

+5 -6
+5 -6
pkgs/development/tools/analysis/valgrind/default.nix
··· 31 in '' 32 echo "Don't derive our xnu version using uname -r." 33 substituteInPlace configure --replace "uname -r" "echo ${OSRELEASE}" 34 - '' 35 - ); 36 37 - postPatch = stdenv.lib.optionalString (stdenv.isDarwin) 38 - # Apple's GCC doesn't recognize `-arch' (as of version 4.2.1, build 5666). 39 - '' 40 echo "getting rid of the \`-arch' GCC option..." 41 find -name Makefile\* -exec \ 42 sed -i {} -e's/DARWIN\(.*\)-arch [^ ]\+/DARWIN\1/g' \; ··· 60 echo "substitute hardcoded /usr/bin/ld with ${cctools}/bin/ld" 61 substituteInPlace coregrind/link_tool_exe_darwin.in \ 62 --replace /usr/bin/ld ${cctools}/bin/ld 63 - ''; 64 65 configureFlags = 66 stdenv.lib.optional (stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "x86_64-darwin") "--enable-only64bit";
··· 31 in '' 32 echo "Don't derive our xnu version using uname -r." 33 substituteInPlace configure --replace "uname -r" "echo ${OSRELEASE}" 34 35 + # Apple's GCC doesn't recognize `-arch' (as of version 4.2.1, build 5666). 36 echo "getting rid of the \`-arch' GCC option..." 37 find -name Makefile\* -exec \ 38 sed -i {} -e's/DARWIN\(.*\)-arch [^ ]\+/DARWIN\1/g' \; ··· 56 echo "substitute hardcoded /usr/bin/ld with ${cctools}/bin/ld" 57 substituteInPlace coregrind/link_tool_exe_darwin.in \ 58 --replace /usr/bin/ld ${cctools}/bin/ld 59 + ''); 60 + 61 + # To prevent rebuild on linux when moving darwin's postPatch fixes to preConfigure 62 + postPatch = ""; 63 64 configureFlags = 65 stdenv.lib.optional (stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "x86_64-darwin") "--enable-only64bit";