lol

Revert "Merge pull request #28557 from obsidiansystems/binutils-wrapper"

This reverts commit 0a944b345e89ca0096974d168f49e1c6830c3fc2, reversing
changes made to 61733ed6ccde3427016720f2e0cd191d3d95152c.

I dislike these massive stdenv changes with unclear motivation,
especially when they involve gratuitous mass renames like NIX_CC ->
NIX_BINUTILS. The previous such rename (NIX_GCC -> NIX_CC) caused
months of pain, so let's not do that again.

+568 -901
+13 -37
doc/stdenv.xml
··· 1 + 1 2 <chapter xmlns="http://docbook.org/ns/docbook" 2 3 xmlns:xlink="http://www.w3.org/1999/xlink" 3 4 xml:id="chap-stdenv"> ··· 1342 1343 <variablelist> 1343 1344 1344 1345 <varlistentry> 1345 - <term>Binutils Wrapper</term> 1346 + <term>CC Wrapper</term> 1346 1347 <listitem> 1347 1348 <para> 1348 - Binutils Wrapper wraps the binary utilities for a bunch of miscellaneous purposes. 1349 - Specifically, GNU Binutils (for Linux, but a mix of cctools and GNU Binutils for Darwin), and a C standard library (glibc or Darwin's libSystem, just for the dynamic loader) are all fed in, and dependency finding, hardening (see below), and purity checks for each are handled by Binutils Wrapper. 1350 - Packages typically depend on CC Wrapper, which in turn (at run time) depends on binutils-wrapper. 1349 + CC Wrapper wraps a C toolchain for a bunch of miscellaneous purposes. 1350 + Specifically, a C compiler (GCC or Clang), Binutils (or the CCTools + binutils mashup when targetting Darwin), and a C standard library (glibc or Darwin's libSystem) are all fed in, and dependency finding, hardening (see below), and purity checks for each are handled by CC Wrapper. 1351 + Packages typically depend on only CC Wrapper, instead of those 3 inputs directly. 1351 1352 </para> 1352 1353 <para> 1353 - Binutils Wrapper was only just recently split off from CC Wrapper, so the division of labor is still being worked out. 1354 - For example, it shouldn't care about about the C standard library, but just take a derivation with the dynamic loader (which happens to be the glibc on linux). 1355 - Dependency finding however is a task both wrappers will continue to need to share, and probably the most important to understand. 1354 + Dependency finding is undoubtedly the main task of CC wrapper. 1356 1355 It is currently accomplished by collecting directories of host-platform dependencies (i.e. <varname>buildInputs</varname> and <varname>nativeBuildInputs</varname>) in environment variables. 1357 - Binutils Wrapper's setup hook causes any <filename>lib</filename> and <filename>lib64</filename> subdirectories to <envar>NIX_LDFLAGS</envar>. 1358 - Sine CC Wrapper and Binutils Wrapper use the same strategy, most of the Binutils Wrapper code is sparsely commented and refers to CC Wrapper. 1359 - But CC Wrapper's code, by contrast, has quite lengthy comments. 1360 - Binutils Wrapper merely cites those, rather than repeating them, to avoid falling out of sync. 1356 + CC wrapper's setup hook causes any <filename>include</filename> subdirectory of such a dependency to be added to <envar>NIX_CFLAGS_COMPILE</envar>, and any <filename>lib</filename> and <filename>lib64</filename> subdirectories to <envar>NIX_LDFLAGS</envar>. 1357 + The setup hook itself contains some lengthy comments describing the exact convoluted mechanism by which this is accomplished. 1361 1358 </para> 1362 1359 <para> 1363 1360 A final task of the setup hook is defining a number of standard environment variables to tell build systems which executables full-fill which purpose. 1364 - They are defined to just be the base name of the tools, under the assumption that Binutils Wrapper's binaries will be on the path. 1361 + They are defined to just be the base name of the tools, under the assumption that CC Wrapper's binaries will be on the path. 1365 1362 Firstly, this helps poorly-written packages, e.g. ones that look for just <command>gcc</command> when <envar>CC</envar> isn't defined yet <command>clang</command> is to be used. 1366 - Secondly, this helps packages not get confused when cross-compiling, in which case multiple Binutils Wrappers may be simultaneous in use (targeting different platforms). 1367 - <envar>BUILD_</envar>- and <envar>TARGET_</envar>-prefixed versions of the normal environment variable are defined for the additional Binutils Wrappers, properly disambiguating them. 1363 + Secondly, this helps packages not get confused when cross-compiling, in which case multiple CC wrappers may be simultaneous in use (targeting different platforms). 1364 + <envar>BUILD_</envar>- and <envar>TARGET_</envar>-prefixed versions of the normal environment variable are defined for the additional CC Wrappers, properly disambiguating them. 1368 1365 </para> 1369 1366 <para> 1370 - A problem with this final task is that Binutils Wrapper is honest and defines <envar>LD</envar> as <command>ld</command>. 1367 + A problem with this final task is that CC Wrapper is honest and defines <envar>LD</envar> as <command>ld</command>. 1371 1368 Most packages, however, firstly use the C compiler for linking, secondly use <envar>LD</envar> anyways, defining it as the C compiler, and thirdly, only so define <envar>LD</envar> when it is undefined as a fallback. 1372 - This triple-threat means Binutils Wrapper will break those packages, as LD is already defined as the actually linker which the package won't override yet doesn't want to use. 1369 + This triple-threat means CC Wrapper will break those packages, as LD is already defined as the actually linker which the package won't override yet doesn't want to use. 1373 1370 The workaround is to define, just for the problematic package, <envar>LD</envar> as the C compiler. 1374 1371 A good way to do this would be <command>preConfigure = "LD=$CC"</command>. 1375 - </para> 1376 - </listitem> 1377 - </varlistentry> 1378 - 1379 - <varlistentry> 1380 - <term>CC Wrapper</term> 1381 - <listitem> 1382 - <para> 1383 - CC Wrapper wraps a C toolchain for a bunch of miscellaneous purposes. 1384 - Specifically, a C compiler (GCC or Clang), Binutils (or the CCTools + binutils mashup when targetting Darwin), and a C standard library (glibc or Darwin's libSystem, just for the dynamic loader) are all fed in, and dependency finding, hardening (see below), and purity checks for each are handled by Binutils Wrapper. 1385 - Packages typically depend on CC Wrapper, which in turn (at run time) depends on Binutils Wrapper. 1386 - </para> 1387 - <para> 1388 - Dependency finding is undoubtedly the main task of CC Wrapper. 1389 - This works just like Binutils Wrapper, except the any <filename>include</filename> subdirectory of any relevant dependency is added to <envar>NIX_CFLAGS_COMPILE</envar>. 1390 - The setup hook itself contains some lengthy comments describing the exact convoluted mechanism by which this is accomplished. 1391 - </para> 1392 - <para> 1393 - CC Wrapper also like Binutils Wrapper defines standard environment variables with the names of the tools it wraps, for the same reasons described above. 1394 - Importantly, while it includes a <command>cc</command> symlink to the c compiler for portability, the <envar>CC</envar> will be defined using the compiler's "real name" (i.e. <command>gcc</command> or <command>clang</command>). 1395 - This helps lousy build systems that inspect on the name of the compiler rather than run it. 1396 1372 </para> 1397 1373 </listitem> 1398 1374 </varlistentry>
+1 -1
pkgs/applications/audio/google-musicmanager/default.nix
··· 35 35 36 36 buildPhase = '' 37 37 patchelf \ 38 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 38 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 39 39 --set-rpath "$out/opt/google/musicmanager:${stdenv.lib.makeLibraryPath [ readline ncurses stdenv.cc.libc.out qt48 stdenv.cc.cc libidn expat flac libvorbis ]}" opt/google/musicmanager/MusicManager 40 40 ''; 41 41
+1 -1
pkgs/applications/audio/google-play-music-desktop-player/default.nix
··· 61 61 cp -r ./usr/share $out 62 62 cp -r ./usr/bin $out 63 63 64 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 64 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 65 65 "$out/share/google-play-music-desktop-player/Google Play Music Desktop Player" 66 66 67 67 wrapProgram $out/bin/google-play-music-desktop-player \
+1 -1
pkgs/applications/audio/renoise/default.nix
··· 49 49 mkdir $out/bin 50 50 ln -s $out/renoise $out/bin/renoise 51 51 52 - patchelf --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) --set-rpath $out/lib $out/renoise 52 + patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) --set-rpath $out/lib $out/renoise 53 53 ''; 54 54 55 55 meta = {
+1 -1
pkgs/applications/audio/spotify/default.nix
··· 89 89 rpath="$out/share/spotify:$libdir" 90 90 91 91 patchelf \ 92 - --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 92 + --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 93 93 --set-rpath $rpath $out/share/spotify/spotify 94 94 95 95 librarypath="${stdenv.lib.makeLibraryPath deps}:$libdir"
+2 -2
pkgs/applications/editors/atom/default.nix
··· 25 25 26 26 fixupPhase 27 27 28 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 28 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 29 29 --set-rpath "${atomEnv.libPath}:$out/share/atom" \ 30 30 $out/share/atom/atom 31 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 31 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 32 32 --set-rpath "${atomEnv.libPath}" \ 33 33 $out/share/atom/resources/app/apm/bin/node 34 34
+2 -2
pkgs/applications/editors/brackets/default.nix
··· 36 36 ''; 37 37 38 38 postFixup = '' 39 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 39 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 40 40 --set-rpath "${bracketsLibs}:$out/opt/brackets/lib" \ 41 41 $out/opt/brackets/Brackets 42 42 43 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 43 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 44 44 --set-rpath "${bracketsLibs}" \ 45 45 $out/opt/brackets/Brackets-node 46 46
+1 -1
pkgs/applications/editors/jetbrains/default.nix
··· 35 35 ln -s ${cmake} bin/cmake 36 36 37 37 lldbLibPath=$out/clion-${version}/bin/lldb/lib 38 - interp="$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" 38 + interp="$(cat $NIX_CC/nix-support/dynamic-linker)" 39 39 ln -s ${ncurses.out}/lib/libncurses.so $lldbLibPath/libtinfo.so.5 40 40 41 41 patchelf --set-interpreter $interp \
+7 -7
pkgs/applications/editors/kodestudio/default.nix
··· 50 50 postFixup = lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") '' 51 51 # Patch Binaries 52 52 patchelf \ 53 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 53 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 54 54 --set-rpath "$out:${atomEnv.libPath}" \ 55 55 $out/kodestudio 56 56 patchelf \ 57 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 57 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 58 58 --set-rpath ".:${stdenv.cc.libc}/lib:${xorg.libXinerama}/lib:${xorg.libX11}/lib:${alsaLib}/lib:${mesa}/lib:${openssl.out}/lib" \ 59 59 $out/resources/app/extensions/krom/Krom/linux/Krom 60 60 patchelf \ 61 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 61 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 62 62 --set-rpath ".:${stdenv.cc.libc}/lib" \ 63 63 $out/resources/app/extensions/kha/Kha/Kore/Tools/krafix/krafix-linux64 64 64 patchelf \ 65 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 65 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 66 66 --set-rpath ".:${stdenv.cc.libc}/lib" \ 67 67 $out/resources/app/extensions/kha/Kha/Kore/Tools/kraffiti/kraffiti-linux64 68 68 patchelf \ 69 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 69 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 70 70 --set-rpath ".:${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib" \ 71 71 $out/resources/app/extensions/kha/Kha/Tools/kravur/kravur-linux64 72 72 patchelf \ 73 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 73 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 74 74 --set-rpath ".:${stdenv.cc.libc}/lib:${zlib}/lib" \ 75 75 $out/resources/app/extensions/kha/Kha/Tools/haxe/haxe-linux64 76 76 patchelf \ 77 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 77 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 78 78 --set-rpath ".:${stdenv.cc.libc}/lib:${libvorbis}/lib:${libogg}/lib:${flac.out}/lib" \ 79 79 $out/resources/app/extensions/kha/Kha/Tools/oggenc/oggenc-linux64 80 80
+1 -1
pkgs/applications/editors/lighttable/default.nix
··· 39 39 mv ./${name}-linux/* $out/share/LightTable 40 40 41 41 patchelf \ 42 - --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 42 + --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 43 43 --set-rpath ${libPath}:${libPath}/lib64:$out/share/LightTable \ 44 44 $out/share/LightTable/LightTable 45 45
+1 -1
pkgs/applications/editors/sublime/default.nix
··· 28 28 29 29 echo ${libPath} 30 30 patchelf \ 31 - --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 31 + --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 32 32 --set-rpath ${libPath}:${stdenv.cc.cc.lib}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \ 33 33 $out/sublime/sublime_text 34 34
+1 -1
pkgs/applications/editors/sublime3/default.nix
··· 50 50 buildPhase = '' 51 51 for i in sublime_text plugin_host crash_reporter; do 52 52 patchelf \ 53 - --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 53 + --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 54 54 --set-rpath ${libPath}:${stdenv.cc.cc.lib}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \ 55 55 $i 56 56 done
+1 -1
pkgs/applications/editors/typora/default.nix
··· 66 66 67 67 postFixup = '' 68 68 patchelf \ 69 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 69 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 70 70 --set-rpath "$out/share/typora:${rpath}" "$out/share/typora/Typora" 71 71 72 72 ln -s "$out/share/typora/Typora" "$out/bin/typora"
+1 -1
pkgs/applications/editors/vscode/default.nix
··· 72 72 73 73 postFixup = lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") '' 74 74 patchelf \ 75 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 75 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 76 76 --set-rpath "${rpath}" \ 77 77 $out/lib/vscode/code 78 78 '';
+1 -1
pkgs/applications/graphics/draftsight/default.nix
··· 26 26 mkdir $out/bin 27 27 for exe in DraftSight dsHttpApiController dsHttpApiService FxCrashRptApp HelpGuide; do 28 28 echo "Patching $exe..." 29 - patchelf --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 29 + patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 30 30 --set-rpath $libPath:\$ORIGIN/../Libraries \ 31 31 $out/draftsight/opt/dassault-systemes/DraftSight/Linux/$exe 32 32 makeWrapper $out/draftsight/opt/dassault-systemes/DraftSight/Linux/$exe \
+1 -1
pkgs/applications/misc/adobe-reader/builder.sh
··· 17 17 # More pointless files. 18 18 rm $p/bin/UNINSTALL 19 19 20 - patchelf --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 20 + patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 21 21 --set-rpath $libPath \ 22 22 $p/Reader/intellinux/bin/acroread 23 23
+1 -1
pkgs/applications/misc/googleearth/default.nix
··· 58 58 rm $out/bin/google-earth $out/opt/google/earth/free/google-earth 59 59 ln -s $out/opt/google/earth/free/googleearth $out/bin/google-earth 60 60 61 - patchelf --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 61 + patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 62 62 --set-rpath "${fullPath}:\$ORIGIN" \ 63 63 $out/opt/google/earth/free/googleearth-bin 64 64
+1 -1
pkgs/applications/misc/houdini/runtime.nix
··· 67 67 echo "export QT_XKB_CONFIG_ROOT="${xkeyboardconfig}/share/X11/xkb"" >> $out/houdini/sbin/app_init.sh 68 68 ''; 69 69 postFixup = '' 70 - INTERPRETER="$(cat "$NIX_BINUTILS/nix-support/dynamic-linker")" 70 + INTERPRETER="$(cat "$NIX_CC"/nix-support/dynamic-linker)" 71 71 for BIN in $(find $out/bin -type f -executable); do 72 72 if patchelf $BIN 2>/dev/null ; then 73 73 echo "Patching ELF $BIN"
+1 -1
pkgs/applications/misc/hyper/default.nix
··· 28 28 mkdir -p "$out/bin" 29 29 mv opt "$out/" 30 30 ln -s "$out/opt/Hyper/hyper" "$out/bin/hyper" 31 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" --set-rpath "${libPath}:\$ORIGIN" "$out/opt/Hyper/hyper" 31 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "${libPath}:\$ORIGIN" "$out/opt/Hyper/hyper" 32 32 mv usr/* "$out/" 33 33 ''; 34 34 dontPatchELF = true;
+2 -2
pkgs/applications/misc/ipmiview/default.nix
··· 17 17 buildPhase = with xorg; '' 18 18 patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ libX11 libXext libXrender libXtst libXi ]}" ./jre/lib/amd64/xawt/libmawt.so 19 19 patchelf --set-rpath "${gcc.cc}/lib" ./libiKVM64.so 20 - patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ libXcursor libX11 libXext libXrender libXtst libXi ]}" --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" ./jre/bin/javaws 21 - patchelf --set-rpath "${gcc.cc}/lib:$out/jre/lib/amd64/jli" --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" ./jre/bin/java 20 + patchelf --set-rpath "${stdenv.lib.makeLibraryPath [ libXcursor libX11 libXext libXrender libXtst libXi ]}" --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./jre/bin/javaws 21 + patchelf --set-rpath "${gcc.cc}/lib:$out/jre/lib/amd64/jli" --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./jre/bin/java 22 22 ''; 23 23 24 24 installPhase = ''
+1 -1
pkgs/applications/misc/kdbplus/default.nix
··· 30 30 mkdir -p $out/bin $out/libexec 31 31 32 32 patchelf \ 33 - --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 33 + --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 34 34 --set-rpath ${libPath} \ 35 35 ./q/l32/q 36 36 mv ./q/l32/q $out/libexec/q
+1 -1
pkgs/applications/misc/kiwix/default.nix
··· 88 88 postInstall = '' 89 89 cp -r src/dependencies/xulrunner $out/lib/kiwix 90 90 91 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" $out/lib/kiwix/xulrunner/xulrunner 91 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/lib/kiwix/xulrunner/xulrunner 92 92 93 93 rm $out/bin/kiwix 94 94 makeWrapper $out/lib/kiwix/kiwix-launcher $out/bin/kiwix \
+1 -1
pkgs/applications/misc/rescuetime/default.nix
··· 33 33 cp usr/bin/rescuetime $out/bin 34 34 35 35 ${patchelf}/bin/patchelf \ 36 - --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 36 + --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 37 37 $out/bin/rescuetime 38 38 39 39 wrapProgram $out/bin/rescuetime \
+1 -1
pkgs/applications/misc/simplenote/default.nix
··· 47 47 48 48 fixupPhase 49 49 50 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 50 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 51 51 --set-rpath "${libPath}:$out/share/simplenote" \ 52 52 $out/share/simplenote/simplenote 53 53
+1 -1
pkgs/applications/networking/bittorrentsync/generic.nix
··· 27 27 28 28 installPhase = '' 29 29 install -D btsync "$out/bin/btsync" 30 - patchelf --interpreter "$(< $NIX_BINUTILS/nix-support/dynamic-linker)" --set-rpath ${libPath} "$out/bin/btsync" 30 + patchelf --interpreter "$(< $NIX_CC/nix-support/dynamic-linker)" --set-rpath ${libPath} "$out/bin/btsync" 31 31 ''; 32 32 33 33 meta = {
+1 -1
pkgs/applications/networking/browsers/firefox-bin/default.nix
··· 152 152 updater crashreporter webapprt-stub 153 153 do 154 154 if [ -e "$out/usr/lib/firefox-bin-${version}/$executable" ]; then 155 - patchelf --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 155 + patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 156 156 "$out/usr/lib/firefox-bin-${version}/$executable" 157 157 fi 158 158 done
+1 -1
pkgs/applications/networking/browsers/google-chrome/default.nix
··· 130 130 131 131 for elf in $out/share/google/$appname/{chrome,chrome-sandbox,nacl_helper}; do 132 132 patchelf --set-rpath $rpath $elf 133 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" $elf 133 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $elf 134 134 done 135 135 ''; 136 136
+1 -1
pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix
··· 118 118 $out/lib${lib_suffix}/kde4/kcm_adobe_flash_player.so 119 119 120 120 patchelf \ 121 - --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) \ 121 + --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 122 122 --set-rpath "$rpath" \ 123 123 $out/bin/flash-player-properties 124 124 '';
+1 -1
pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/standalone.nix
··· 84 84 cp -pv flashplayer${lib.optionalString debug "debugger"} $out/bin 85 85 86 86 patchelf \ 87 - --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) \ 87 + --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 88 88 --set-rpath "$rpath" \ 89 89 $out/bin/flashplayer${lib.optionalString debug "debugger"} 90 90 '';
+1 -1
pkgs/applications/networking/browsers/mozilla-plugins/google-talk-plugin/default.nix
··· 88 88 cp -prd opt/google/talkplugin/{data,GoogleTalkPlugin,locale,remoting24x24.png,windowpicker.glade} $out/libexec/google/talkplugin/ 89 89 90 90 patchelf \ 91 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 91 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 92 92 --set-rpath "${rpathProgram}:${stdenv.cc.cc.lib}/lib64" \ 93 93 $out/libexec/google/talkplugin/GoogleTalkPlugin 94 94
+1 -1
pkgs/applications/networking/browsers/opera/default.nix
··· 114 114 | while read f 115 115 do 116 116 patchelf \ 117 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 117 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 118 118 --set-rpath "$out/lib:${rpath}" \ 119 119 "$f" 120 120 done
+1 -1
pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix
··· 129 129 buildCommand = '' 130 130 # For convenience ... 131 131 TBB_IN_STORE=$out/share/tor-browser 132 - interp=$(< $NIX_BINUTILS/nix-support/dynamic-linker) 132 + interp=$(< $NIX_CC/nix-support/dynamic-linker) 133 133 134 134 # Unpack & enter 135 135 mkdir -p "$TBB_IN_STORE"
+1 -1
pkgs/applications/networking/browsers/vivaldi/default.nix
··· 43 43 buildPhase = '' 44 44 echo "Patching Vivaldi binaries" 45 45 patchelf \ 46 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 46 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 47 47 --set-rpath "${libPath}" \ 48 48 opt/vivaldi/vivaldi-bin 49 49 '' + stdenv.lib.optionalString proprietaryCodecs ''
+1 -1
pkgs/applications/networking/cluster/hadoop/default.nix
··· 16 16 sed -i $n -e "s|#!/usr/bin/env bash|#! ${bash}/bin/bash|" 17 17 done 18 18 '' + stdenv.lib.optionalString (!stdenv.isDarwin) '' 19 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" bin/container-executor; 19 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" bin/container-executor; 20 20 ''; 21 21 22 22 installPhase = ''
+1 -1
pkgs/applications/networking/dropbox/default.nix
··· 108 108 ''; 109 109 110 110 preFixup = '' 111 - INTERP=$(cat $NIX_BINUTILS/nix-support/dynamic-linker) 111 + INTERP=$(cat $NIX_CC/nix-support/dynamic-linker) 112 112 RPATH="${ldpath}:$out/${appdir}" 113 113 getType='s/ *Type: *\([A-Z]*\) (.*/\1/' 114 114 find "$out/${appdir}" -type f -print | while read obj; do
+1 -1
pkgs/applications/networking/instant-messengers/discord/default.nix
··· 30 30 31 31 # Copying how adobe-reader does it, 32 32 # see pkgs/applications/misc/adobe-reader/builder.sh 33 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 33 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 34 34 --set-rpath "$out/opt/discord:$libPath" \ 35 35 $out/opt/discord/Discord 36 36
+1 -1
pkgs/applications/networking/instant-messengers/franz/default.nix
··· 44 44 ''; 45 45 46 46 installPhase = '' 47 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" Franz 47 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" Franz 48 48 patchelf --set-rpath "$out/opt/franz:${stdenv.lib.makeLibraryPath deps}" Franz 49 49 50 50 mkdir -p $out/bin $out/opt/franz
+1 -1
pkgs/applications/networking/instant-messengers/hipchat/default.nix
··· 68 68 mv usr/share $out 69 69 70 70 for file in $(find $d -type f); do 71 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" $file || true 71 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $file || true 72 72 patchelf --set-rpath ${rpath}:$out/libexec/hipchat/lib:\$ORIGIN $file || true 73 73 done 74 74
+1 -1
pkgs/applications/networking/instant-messengers/messenger-for-desktop/default.nix
··· 72 72 73 73 # patch the binaries 74 74 for file in $(find $out -type f \( -perm /0111 -o -name \*.so\* \) ); do 75 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" "$file" || true 75 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file" || true 76 76 patchelf --set-rpath ${rpath}:$out/libexec $file || true 77 77 done 78 78
+1 -1
pkgs/applications/networking/instant-messengers/rambox/default.nix
··· 44 44 dontPatchELF = true; 45 45 46 46 installPhase = '' 47 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" rambox 47 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" rambox 48 48 patchelf --set-rpath "$out/opt/rambox:${stdenv.lib.makeLibraryPath deps}" rambox 49 49 50 50 mkdir -p $out/bin $out/opt/rambox
+1 -1
pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix
··· 78 78 79 79 postFixup = '' 80 80 patchelf \ 81 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 81 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 82 82 --set-rpath "$out/share/skypeforlinux:${rpath}" "$out/share/skypeforlinux/skypeforlinux" 83 83 84 84 ln -s "$out/share/skypeforlinux/skypeforlinux" "$out/bin/skypeforlinux"
+1 -1
pkgs/applications/networking/instant-messengers/slack/default.nix
··· 68 68 chmod -R g-w $out 69 69 70 70 for file in $(find $out -type f \( -perm /0111 -o -name \*.so\* \) ); do 71 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" "$file" || true 71 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file" || true 72 72 patchelf --set-rpath ${rpath}:$out/lib/slack $file || true 73 73 done 74 74
+1 -1
pkgs/applications/networking/instant-messengers/teamspeak/client.nix
··· 62 62 mv ts3client_linux_${arch} ts3client 63 63 echo "patching ts3client..." 64 64 patchelf \ 65 - --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 65 + --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 66 66 --set-rpath ${stdenv.lib.makeLibraryPath deps}:$(cat $NIX_CC/nix-support/orig-cc)/${libDir} \ 67 67 --force-rpath \ 68 68 ts3client
+2 -2
pkgs/applications/networking/instant-messengers/teamspeak/server.nix
··· 25 25 '' 26 26 echo "patching ts3server" 27 27 patchelf \ 28 - --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 28 + --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 29 29 --set-rpath $(cat $NIX_CC/nix-support/orig-cc)/${libDir} \ 30 30 --force-rpath \ 31 31 ts3server 32 32 cp tsdns/tsdnsserver tsdnsserver 33 33 patchelf \ 34 - --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 34 + --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 35 35 --set-rpath $(cat $NIX_CC/nix-support/orig-cc)/${libDir} \ 36 36 --force-rpath \ 37 37 tsdnsserver
+1 -1
pkgs/applications/networking/instant-messengers/viber/default.nix
··· 72 72 chmod -R g-w $out 73 73 74 74 for file in $(find $out -type f \( -perm /0111 -o -name \*.so\* \) ); do 75 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" "$file" || true 75 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file" || true 76 76 patchelf --set-rpath $libPath:$out/opt/viber/lib $file || true 77 77 done 78 78
+4 -4
pkgs/applications/networking/instant-messengers/zoom-us/default.nix
··· 65 65 mkdir -p $out/bin 66 66 cp -ar * $packagePath 67 67 68 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" $packagePath/zoom 69 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" $packagePath/QtWebEngineProcess 70 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" $packagePath/qtdiag 71 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" $packagePath/zopen 68 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $packagePath/zoom 69 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $packagePath/QtWebEngineProcess 70 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $packagePath/qtdiag 71 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $packagePath/zopen 72 72 # included from https://github.com/NixOS/nixpkgs/commit/fc218766333a05c9352b386e0cbb16e1ae84bf53 73 73 # it works for me without it, but, well... 74 74 paxmark m $packagePath/zoom
+1 -1
pkgs/applications/networking/insync/default.nix
··· 15 15 buildInputs = [ makeWrapper ]; 16 16 17 17 postPatch = '' 18 - patchelf --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" client/insync-portable 18 + patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" client/insync-portable 19 19 ''; 20 20 21 21 installPhase = ''
+2 -2
pkgs/applications/networking/mailreaders/nylas-mail-bin/default.nix
··· 107 107 108 108 # Patch binaries 109 109 binrp=$(patchelf --print-rpath $out/share/nylas-mail/nylas) 110 - patchelf --interpreter $(cat "$NIX_BINUTILS/nix-support/dynamic-linker") \ 110 + patchelf --interpreter $(cat "$NIX_CC"/nix-support/dynamic-linker) \ 111 111 --set-rpath $binrp:$out/lib:${stdenv.cc.cc.lib}/lib:${lib.makeLibraryPath propagatedBuildInputs } \ 112 112 $out/share/nylas-mail/nylas 113 113 ··· 119 119 120 120 wrapProgram $out/share/nylas-mail/resources/apm/bin/apm \ 121 121 --set PATH "${coreutils}/bin" 122 - patchelf --interpreter $(cat "$NIX_BINUTILS/nix-support/dynamic-linker") \ 122 + patchelf --interpreter $(cat "$NIX_CC"/nix-support/dynamic-linker) \ 123 123 --set-rpath ${gcc-unwrapped.lib}/lib $out/share/nylas-mail/resources/apm/bin/node 124 124 ''; 125 125
+1 -1
pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix
··· 134 134 for executable in \ 135 135 thunderbird crashreporter thunderbird-bin plugin-container updater 136 136 do 137 - patchelf --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 137 + patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 138 138 "$out/usr/lib/thunderbird-bin-${version}/$executable" 139 139 done 140 140
+1 -1
pkgs/applications/networking/remote/anydesk/default.nix
··· 41 41 42 42 postFixup = '' 43 43 patchelf \ 44 - --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) \ 44 + --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 45 45 --set-rpath "${libPath}" \ 46 46 $out/bin/anydesk 47 47
+1 -1
pkgs/applications/networking/remote/citrix-receiver/default.nix
··· 131 131 echo "Patching ELF intrepreter and rpath for $f" 132 132 chmod u+w "$f" 133 133 patchelf \ 134 - --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) \ 134 + --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 135 135 --set-rpath "$ICAInstDir:$libPath" "$f" 136 136 done 137 137
+1 -1
pkgs/applications/networking/resilio-sync/default.nix
··· 25 25 installPhase = '' 26 26 install -D rslsync "$out/bin/rslsync" 27 27 patchelf \ 28 - --interpreter "$(< $NIX_BINUTILS/nix-support/dynamic-linker)" \ 28 + --interpreter "$(< $NIX_CC/nix-support/dynamic-linker)" \ 29 29 --set-rpath ${libPath} "$out/bin/rslsync" 30 30 ''; 31 31
+1 -1
pkgs/applications/office/marp/default.nix
··· 17 17 ''; 18 18 19 19 postFixup = '' 20 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 20 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 21 21 --set-rpath "${atomEnv.libPath}:${stdenv.lib.makeLibraryPath [ libXScrnSaver ]}:$out/lib/marp" \ 22 22 $out/bin/Marp 23 23 '';
+2 -2
pkgs/applications/office/moneyplex/default.nix
··· 78 78 ${coreutils}/bin/cp "\$MDIR/moneyplex" "\$MDIR/moneyplex.patched" 79 79 ${coreutils}/bin/chmod 0755 "\$MDIR/moneyplex.patched" 80 80 fi 81 - if [ ! \`${patchelf}/bin/patchelf --print-interpreter \$MDIR/moneyplex.patched\` = $(cat $NIX_BINUTILS/nix-support/dynamic-linker) ] || 81 + if [ ! \`${patchelf}/bin/patchelf --print-interpreter \$MDIR/moneyplex.patched\` = $(cat $NIX_CC/nix-support/dynamic-linker) ] || 82 82 [ ! \`${patchelf}/bin/patchelf --print-rpath \$MDIR/moneyplex.patched\` = "${libPath}" ]; then 83 - ${patchelf}/bin/patchelf --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) --set-rpath "${libPath}" "\$MDIR/moneyplex.patched" 83 + ${patchelf}/bin/patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) --set-rpath "${libPath}" "\$MDIR/moneyplex.patched" 84 84 fi 85 85 86 86 exec \$MDIR/moneyplex.patched
+1 -1
pkgs/applications/office/wpsoffice/default.nix
··· 53 53 mkdir $out/bin 54 54 for i in wps wpp et; do 55 55 patchelf \ 56 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 56 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 57 57 --force-rpath --set-rpath "$prefix/office6:$libPath" \ 58 58 $prefix/office6/$i 59 59
+1 -1
pkgs/applications/science/electronics/eagle/default.nix
··· 69 69 gcc -shared -fPIC -DEAGLE_PATH=\"$out/eagle-${version}\" ${./eagle_fixer.c} -o "$out"/lib/eagle_fixer.so -ldl 70 70 71 71 # Make wrapper script 72 - dynlinker="$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" 72 + dynlinker="$(cat $NIX_CC/nix-support/dynamic-linker)" 73 73 mkdir -p "$out"/bin 74 74 cat > "$out"/bin/eagle << EOF 75 75 #!${stdenv.shell}
+1 -1
pkgs/applications/science/logic/saw-tools/default.nix
··· 44 44 45 45 fixupPhase = '' 46 46 for x in bin/bcdump bin/extcore-info bin/jss bin/llvm-disasm bin/lss bin/saw; do 47 - patchelf --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 47 + patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 48 48 --set-rpath "$out/lib:${libPath}" $out/$x; 49 49 done 50 50 '';
+1 -1
pkgs/applications/science/logic/tptp/default.nix
··· 27 27 substituteInPlace $sharedir/TPTP2X/tptp2X_install --replace /bin/mv mv 28 28 tcsh $sharedir/TPTP2X/tptp2X_install -default 29 29 30 - patchelf --interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) $sharedir/Scripts/tptp4X 30 + patchelf --interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $sharedir/Scripts/tptp4X 31 31 32 32 mkdir -p $out/bin 33 33 ln -s $sharedir/TPTP2X/tptp2X $out/bin
+1 -1
pkgs/applications/science/logic/verifast/default.nix
··· 10 10 ] + ":${stdenv.cc.cc.lib}/lib64"; 11 11 12 12 patchExe = x: '' 13 - patchelf --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 13 + patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 14 14 --set-rpath ${libPath} ${x} 15 15 ''; 16 16 in
+1 -1
pkgs/applications/science/math/mathematica/10.nix
··· 106 106 echo "patching $f executable <<" 107 107 patchelf --shrink-rpath "$f" 108 108 patchelf \ 109 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 109 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 110 110 --set-rpath "$(patchelf --print-rpath "$f"):${ldpath}" \ 111 111 "$f" \ 112 112 && patchelf --shrink-rpath "$f" \
+1 -1
pkgs/applications/science/math/mathematica/9.nix
··· 93 93 elif [ "$type" == "EXEC" ]; then 94 94 echo "patching $f executable <<" 95 95 patchelf \ 96 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 96 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 97 97 --set-rpath "${ldpath}" \ 98 98 "$f" 99 99 patchelf --shrink-rpath "$f"
+1 -1
pkgs/applications/science/math/mathematica/default.nix
··· 114 114 echo "patching $f executable <<" 115 115 patchelf --shrink-rpath "$f" 116 116 patchelf \ 117 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 117 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 118 118 --set-rpath "$(patchelf --print-rpath "$f"):${ldpath}" \ 119 119 "$f" \ 120 120 && patchelf --shrink-rpath "$f" \
+1 -1
pkgs/applications/science/math/scilab-bin/default.nix
··· 51 51 fullLibPath="$sci/lib/scilab:$sci/lib/thirdparty:$libPath" 52 52 fullLibPath="$fullLibPath:$sci/lib/thirdparty/redist" 53 53 54 - patchelf --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) \ 54 + patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 55 55 --set-rpath "$fullLibPath" bin/scilab-bin 56 56 find . -name '*.so' -type f | while read file; do 57 57 patchelf --set-rpath "$fullLibPath" "$file" 2>/dev/null
+2 -2
pkgs/applications/science/medicine/aliza/default.nix
··· 29 29 libs = stdenv.lib.makeLibraryPath [ qt4 zlib stdenv.cc.cc libSM libICE libX11 libXext libXt mesa ]; 30 30 in '' 31 31 ${patchelf}/bin/patchelf \ 32 - --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 32 + --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 33 33 $out/bin/aliza 34 34 35 35 ${patchelf}/bin/patchelf \ 36 - --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 36 + --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 37 37 $out/bin/aliza-vtkvol 38 38 39 39 wrapProgram $out/bin/aliza \
+1 -1
pkgs/applications/science/programming/fdr/default.nix
··· 33 33 34 34 for b in fdr4 _fdr4 refines _refines cspmprofiler cspmexplorerprof 35 35 do 36 - patchelf --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) \ 36 + patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 37 37 --set-rpath "$libPath:$out/lib" \ 38 38 "$out/bin/$b" 39 39 done
+1 -1
pkgs/applications/taxes/aangifte-2006/builder.sh
··· 3 3 buildPhase() { 4 4 for i in bin/*; do 5 5 patchelf \ 6 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 6 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 7 7 --set-rpath $libX11/lib:$libXext/lib \ 8 8 $i 9 9 done
+1 -1
pkgs/applications/taxes/aangifte-2007/builder.sh
··· 5 5 buildPhase() { 6 6 for i in bin/*; do 7 7 patchelf \ 8 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 8 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 9 9 --set-rpath $libX11/lib:$libXext/lib:$libSM/lib:$(cat $NIX_CC/nix-support/orig-cc)/lib \ 10 10 $i 11 11 done
+1 -1
pkgs/applications/taxes/aangifte-2008/builder.sh
··· 5 5 buildPhase() { 6 6 for i in bin/*; do 7 7 patchelf \ 8 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 8 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 9 9 --set-rpath $libX11/lib:$libXext/lib:$libSM/lib:$(cat $NIX_CC/nix-support/orig-cc)/lib \ 10 10 $i 11 11 done
+1 -1
pkgs/applications/taxes/aangifte-2009/default.nix
··· 17 17 '' 18 18 for i in bin/*; do 19 19 patchelf \ 20 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 20 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 21 21 --set-rpath ${stdenv.lib.makeLibraryPath [ libX11 libXext libSM ]}:$(cat $NIX_CC/nix-support/orig-cc)/lib \ 22 22 $i 23 23 done
+1 -1
pkgs/applications/taxes/aangifte-2010/default.nix
··· 17 17 '' 18 18 for i in bin/*; do 19 19 patchelf \ 20 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 20 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 21 21 --set-rpath ${stdenv.lib.makeLibraryPath [ libX11 libXext libSM ]}:$(cat $NIX_CC/nix-support/orig-cc)/lib \ 22 22 $i 23 23 done
+1 -1
pkgs/applications/taxes/aangifte-2011/default.nix
··· 17 17 '' 18 18 for i in bin/*; do 19 19 patchelf \ 20 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 20 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 21 21 --set-rpath ${stdenv.lib.makeLibraryPath [ libX11 libXext libSM ]}:$(cat $NIX_CC/nix-support/orig-cc)/lib \ 22 22 $i 23 23 done
+1 -1
pkgs/applications/taxes/aangifte-2012/default.nix
··· 17 17 '' 18 18 for i in bin/*; do 19 19 patchelf \ 20 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 20 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 21 21 --set-rpath ${stdenv.lib.makeLibraryPath [ libX11 libXext libSM ]}:$(cat $NIX_CC/nix-support/orig-cc)/lib \ 22 22 $i 23 23 done
+1 -1
pkgs/applications/taxes/aangifte-2013-wa/default.nix
··· 17 17 '' 18 18 for i in bin/*; do 19 19 patchelf \ 20 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 20 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 21 21 --set-rpath ${stdenv.lib.makeLibraryPath [ libX11 libXext libSM ]}:$(cat $NIX_CC/nix-support/orig-cc)/lib \ 22 22 $i 23 23 done
+1 -1
pkgs/applications/taxes/aangifte-2013/default.nix
··· 17 17 '' 18 18 for i in bin/*; do 19 19 patchelf \ 20 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 20 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 21 21 --set-rpath ${stdenv.lib.makeLibraryPath [ libX11 libXext libSM ]}:$(cat $NIX_CC/nix-support/orig-cc)/lib \ 22 22 $i 23 23 done
+1 -1
pkgs/applications/taxes/aangifte-2014-wa/default.nix
··· 17 17 '' 18 18 for i in bin/*; do 19 19 patchelf \ 20 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 20 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 21 21 --set-rpath ${stdenv.lib.makeLibraryPath [ libX11 libXext libSM ]}:$(cat $NIX_CC/nix-support/orig-cc)/lib \ 22 22 $i 23 23 done
+1 -1
pkgs/applications/taxes/aangifte-2014/default.nix
··· 17 17 '' 18 18 for i in bin/*; do 19 19 patchelf \ 20 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 20 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 21 21 --set-rpath ${stdenv.lib.makeLibraryPath [ libX11 libXext libSM ]}:$(cat $NIX_CC/nix-support/orig-cc)/lib \ 22 22 $i 23 23 done
+1 -1
pkgs/applications/version-management/gitkraken/default.nix
··· 80 80 ''; 81 81 82 82 postFixup = '' 83 - patchelf --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) \ 83 + patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 84 84 --set-rpath "$libPath:$out/opt/gitkraken" "$out/opt/gitkraken/gitkraken" 85 85 wrapProgram $out/opt/gitkraken/gitkraken \ 86 86 --prefix LD_PRELOAD : "${makeLibraryPath [ curl ]}/libcurl.so.4" \
+1 -1
pkgs/applications/video/makemkv/builder.sh
··· 27 27 28 28 for i in ${bin} ; do 29 29 patchelf \ 30 - --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 30 + --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 31 31 --set-rpath $libPath \ 32 32 ${i} 33 33 done
-40
pkgs/build-support/binutils-wrapper/add-flags.sh
··· 1 - # See cc-wrapper for comments. 2 - var_templates_list=( 3 - NIX+IGNORE_LD_THROUGH_GCC 4 - NIX+LDFLAGS 5 - NIX+LDFLAGS_BEFORE 6 - NIX+LDFLAGS_AFTER 7 - NIX+LDFLAGS_HARDEN 8 - ) 9 - var_templates_bool=( 10 - NIX+SET_BUILD_ID 11 - NIX+DONT_SET_RPATH 12 - ) 13 - 14 - declare -a role_infixes=() 15 - if [ "${NIX_BINUTILS_WRAPPER_@infixSalt@_TARGET_BUILD:-}" ]; then 16 - role_infixes+=(_BUILD_) 17 - fi 18 - if [ "${NIX_BINUTILS_WRAPPER_@infixSalt@_TARGET_HOST:-}" ]; then 19 - role_infixes+=(_) 20 - fi 21 - if [ "${NIX_BINUTILS_WRAPPER_@infixSalt@_TARGET_TARGET:-}" ]; then 22 - role_infixes+=(_TARGET_) 23 - fi 24 - 25 - for var in "${var_templates_list[@]}"; do 26 - mangleVarList "$var" "${role_infixes[@]}" 27 - done 28 - for var in "${var_templates_bool[@]}"; do 29 - mangleVarBool "$var" "${role_infixes[@]}" 30 - done 31 - 32 - if [ -e @out@/nix-support/libc-ldflags ]; then 33 - NIX_@infixSalt@_LDFLAGS+=" $(< @out@/nix-support/libc-ldflags)" 34 - fi 35 - 36 - if [ -e @out@/nix-support/libc-ldflags-before ]; then 37 - NIX_@infixSalt@_LDFLAGS_BEFORE="$(< @out@/nix-support/libc-ldflags-before) $NIX_@infixSalt@_LDFLAGS_BEFORE" 38 - fi 39 - 40 - export NIX_BINUTILS_WRAPPER_@infixSalt@_FLAGS_SET=1
-53
pkgs/build-support/binutils-wrapper/add-hardening.sh
··· 1 - hardeningFlags=(relro bindnow) 2 - # Intentionally word-split in case 'hardeningEnable' is defined in 3 - # Nix. Also, our bootstrap tools version of bash is old enough that 4 - # undefined arrays trip `set -u`. 5 - if [[ -v hardeningEnable[@] ]]; then 6 - hardeningFlags+=(${hardeningEnable[@]}) 7 - fi 8 - hardeningLDFlags=() 9 - 10 - declare -A hardeningDisableMap 11 - 12 - # Intentionally word-split in case 'hardeningDisable' is defined in Nix. 13 - for flag in ${hardeningDisable[@]:-IGNORED_KEY} @hardening_unsupported_flags@ 14 - do 15 - hardeningDisableMap[$flag]=1 16 - done 17 - 18 - if [[ -n "${NIX_DEBUG:-}" ]]; then 19 - printf 'HARDENING: disabled flags:' >&2 20 - (( "${#hardeningDisableMap[@]}" )) && printf ' %q' "${!hardeningDisableMap[@]}" >&2 21 - echo >&2 22 - fi 23 - 24 - if [[ -z "${hardeningDisableMap[all]:-}" ]]; then 25 - if [[ -n "${NIX_DEBUG:-}" ]]; then 26 - echo 'HARDENING: Is active (not completely disabled with "all" flag)' >&2; 27 - fi 28 - for flag in "${hardeningFlags[@]}" 29 - do 30 - if [[ -z "${hardeningDisableMap[$flag]:-}" ]]; then 31 - case $flag in 32 - pie) 33 - if [[ ! ("$*" =~ " -shared " || "$*" =~ " -static ") ]]; then 34 - if [[ -n "${NIX_DEBUG:-}" ]]; then echo HARDENING: enabling LDFlags -pie >&2; fi 35 - hardeningLDFlags+=('-pie') 36 - fi 37 - ;; 38 - relro) 39 - if [[ -n "${NIX_DEBUG:-}" ]]; then echo HARDENING: enabling relro >&2; fi 40 - hardeningLDFlags+=('-z' 'relro') 41 - ;; 42 - bindnow) 43 - if [[ -n "${NIX_DEBUG:-}" ]]; then echo HARDENING: enabling bindnow >&2; fi 44 - hardeningLDFlags+=('-z' 'now') 45 - ;; 46 - *) 47 - # Ignore unsupported. Checked in Nix that at least *some* 48 - # tool supports each flag. 49 - ;; 50 - esac 51 - fi 52 - done 53 - fi
-288
pkgs/build-support/binutils-wrapper/default.nix
··· 1 - # The Nixpkgs CC is not directly usable, since it doesn't know where 2 - # the C library and standard header files are. Therefore the compiler 3 - # produced by that package cannot be installed directly in a user 4 - # environment and used from the command line. So we use a wrapper 5 - # script that sets up the right environment variables so that the 6 - # compiler and the linker just "work". 7 - 8 - { name ? "", stdenv, nativeTools, noLibc ? false, nativeLibc, nativePrefix ? "" 9 - , binutils ? null, libc ? null 10 - , coreutils ? null, shell ? stdenv.shell, gnugrep ? null 11 - , extraPackages ? [], extraBuildCommands ? "" 12 - , buildPackages ? {} 13 - , useMacosReexportHack ? false 14 - }: 15 - 16 - with stdenv.lib; 17 - 18 - assert nativeTools -> nativePrefix != ""; 19 - assert !nativeTools -> 20 - binutils != null && coreutils != null && gnugrep != null; 21 - assert !(nativeLibc && noLibc); 22 - assert (noLibc || nativeLibc) == (libc == null); 23 - 24 - let 25 - inherit (stdenv) hostPlatform targetPlatform; 26 - 27 - # Prefix for binaries. Customarily ends with a dash separator. 28 - # 29 - # TODO(@Ericson2314) Make unconditional, or optional but always true by 30 - # default. 31 - prefix = stdenv.lib.optionalString (targetPlatform != hostPlatform) 32 - (targetPlatform.config + "-"); 33 - 34 - binutilsVersion = (builtins.parseDrvName binutils.name).version; 35 - binutilsName = (builtins.parseDrvName binutils.name).name; 36 - 37 - libc_bin = if libc == null then null else getBin libc; 38 - libc_dev = if libc == null then null else getDev libc; 39 - libc_lib = if libc == null then null else getLib libc; 40 - binutils_bin = if nativeTools then "" else getBin binutils; 41 - # The wrapper scripts use 'cat' and 'grep', so we may need coreutils. 42 - coreutils_bin = if nativeTools then "" else getBin coreutils; 43 - 44 - dashlessTarget = stdenv.lib.replaceStrings ["-"] ["_"] targetPlatform.config; 45 - 46 - # See description in cc-wrapper. 47 - infixSalt = dashlessTarget; 48 - 49 - # The dynamic linker has different names on different platforms. This is a 50 - # shell glob that ought to match it. 51 - dynamicLinker = 52 - /**/ if libc == null then null 53 - else if targetPlatform.system == "i686-linux" then "${libc_lib}/lib/ld-linux.so.2" 54 - else if targetPlatform.system == "x86_64-linux" then "${libc_lib}/lib/ld-linux-x86-64.so.2" 55 - # ARM with a wildcard, which can be "" or "-armhf". 56 - else if targetPlatform.isArm then "${libc_lib}/lib/ld-linux*.so.3" 57 - else if targetPlatform.system == "aarch64-linux" then "${libc_lib}/lib/ld-linux-aarch64.so.1" 58 - else if targetPlatform.system == "powerpc-linux" then "${libc_lib}/lib/ld.so.1" 59 - else if targetPlatform.system == "mips64el-linux" then "${libc_lib}/lib/ld.so.1" 60 - else if targetPlatform.system == "x86_64-darwin" then "/usr/lib/dyld" 61 - else if stdenv.lib.hasSuffix "pc-gnu" targetPlatform.config then "ld.so.1" 62 - else null; 63 - 64 - expand-response-params = 65 - if buildPackages.stdenv.cc or null != null && buildPackages.stdenv.cc != "/dev/null" 66 - then import ../expand-response-params { inherit (buildPackages) stdenv; } 67 - else ""; 68 - 69 - in 70 - 71 - stdenv.mkDerivation { 72 - name = prefix 73 - + (if name != "" then name else "${binutilsName}-wrapper") 74 - + (stdenv.lib.optionalString (binutils != null && binutilsVersion != "") "-${binutilsVersion}"); 75 - 76 - preferLocalBuild = true; 77 - 78 - inherit binutils_bin shell libc_bin libc_dev libc_lib coreutils_bin; 79 - gnugrep_bin = if nativeTools then "" else gnugrep; 80 - 81 - binPrefix = prefix; 82 - inherit infixSalt; 83 - 84 - outputs = [ "out" "man" ]; 85 - 86 - passthru = { 87 - inherit binutils libc nativeTools nativeLibc nativePrefix prefix; 88 - 89 - emacsBufferSetup = pkgs: '' 90 - ; We should handle propagation here too 91 - (mapc 92 - (lambda (arg) 93 - (when (file-directory-p (concat arg "/lib")) 94 - (setenv "NIX_${infixSalt}_LDFLAGS" (concat (getenv "NIX_${infixSalt}_LDFLAGS") " -L" arg "/lib"))) 95 - (when (file-directory-p (concat arg "/lib64")) 96 - (setenv "NIX_${infixSalt}_LDFLAGS" (concat (getenv "NIX_${infixSalt}_LDFLAGS") " -L" arg "/lib64")))) 97 - '(${concatStringsSep " " (map (pkg: "\"${pkg}\"") pkgs)})) 98 - ''; 99 - }; 100 - 101 - dontBuild = true; 102 - dontConfigure = true; 103 - 104 - unpackPhase = '' 105 - src=$PWD 106 - ''; 107 - 108 - installPhase = 109 - '' 110 - set -u 111 - 112 - mkdir -p $out/bin $out/nix-support $man/nix-support 113 - 114 - wrap() { 115 - local dst="$1" 116 - local wrapper="$2" 117 - export prog="$3" 118 - set +u 119 - substituteAll "$wrapper" "$out/bin/$dst" 120 - set -u 121 - chmod +x "$out/bin/$dst" 122 - } 123 - '' 124 - 125 - + (if nativeTools then '' 126 - echo ${nativePrefix} > $out/nix-support/orig-binutils 127 - 128 - ldPath="${nativePrefix}/bin" 129 - '' else '' 130 - echo $binutils_bin > $out/nix-support/orig-binutils 131 - 132 - ldPath="${binutils_bin}/bin" 133 - '' 134 - 135 - + optionalString (targetPlatform.isSunOS && nativePrefix != "") '' 136 - # Solaris needs an additional ld wrapper. 137 - ldPath="${nativePrefix}/bin" 138 - exec="$ldPath/${prefix}ld" 139 - wrap ld-solaris ${./ld-solaris-wrapper.sh} 140 - '') 141 - 142 - + '' 143 - # Create a symlink to as (the assembler). 144 - if [ -e $ldPath/${prefix}as ]; then 145 - ln -s $ldPath/${prefix}as $out/bin/${prefix}as 146 - fi 147 - 148 - '' + (if !useMacosReexportHack then '' 149 - wrap ${prefix}ld ${./ld-wrapper.sh} ''${ld:-$ldPath/${prefix}ld} 150 - '' else '' 151 - ldInner="${prefix}ld-reexport-delegate" 152 - wrap "$ldInner" ${./macos-sierra-reexport-hack.bash} ''${ld:-$ldPath/${prefix}ld} 153 - wrap "${prefix}ld" ${./ld-wrapper.sh} "$out/bin/$ldInner" 154 - unset ldInner 155 - '') + '' 156 - 157 - if [ -e ${binutils_bin}/bin/${prefix}ld.gold ]; then 158 - wrap ${prefix}ld.gold ${./ld-wrapper.sh} ${binutils_bin}/bin/${prefix}ld.gold 159 - fi 160 - 161 - if [ -e ${binutils_bin}/bin/ld.bfd ]; then 162 - wrap ${prefix}ld.bfd ${./ld-wrapper.sh} ${binutils_bin}/bin/${prefix}ld.bfd 163 - fi 164 - 165 - set +u 166 - ''; 167 - 168 - propagatedBuildInputs = extraPackages; 169 - 170 - setupHook = ./setup-hook.sh; 171 - 172 - postFixup = 173 - '' 174 - set -u 175 - '' 176 - 177 - + optionalString (libc != null) ('' 178 - ## 179 - ## General libc support 180 - ## 181 - 182 - echo "-L${libc_lib}/lib" > $out/nix-support/libc-ldflags 183 - 184 - echo "${libc_lib}" > $out/nix-support/orig-libc 185 - echo "${libc_dev}" > $out/nix-support/orig-libc-dev 186 - 187 - ## 188 - ## Dynamic linker support 189 - ## 190 - 191 - if [[ -z ''${dynamicLinker+x} ]]; then 192 - echo "Don't know the name of the dynamic linker for platform '${targetPlatform.config}', so guessing instead." >&2 193 - local dynamicLinker="${libc_lib}/lib/ld*.so.?" 194 - fi 195 - 196 - # Expand globs to fill array of options 197 - dynamicLinker=($dynamicLinker) 198 - 199 - case ''${#dynamicLinker[@]} in 200 - 0) echo "No dynamic linker found for platform '${targetPlatform.config}'." >&2;; 201 - 1) echo "Using dynamic linker: '$dynamicLinker'" >&2;; 202 - *) echo "Multiple dynamic linkers found for platform '${targetPlatform.config}'." >&2;; 203 - esac 204 - 205 - if [ -n "$dynamicLinker" ]; then 206 - echo $dynamicLinker > $out/nix-support/dynamic-linker 207 - 208 - '' + (if targetPlatform.isDarwin then '' 209 - printf "export LD_DYLD_PATH=%q\n" "$dynamicLinker" >> $out/nix-support/setup-hook 210 - '' else '' 211 - if [ -e ${libc_lib}/lib/32/ld-linux.so.2 ]; then 212 - echo ${libc_lib}/lib/32/ld-linux.so.2 > $out/nix-support/dynamic-linker-m32 213 - fi 214 - 215 - local ldflagsBefore=(-dynamic-linker "$dynamicLinker") 216 - '') + '' 217 - fi 218 - 219 - # The dynamic linker is passed in `ldflagsBefore' to allow 220 - # explicit overrides of the dynamic linker by callers to ld 221 - # (the *last* value counts, so ours should come first). 222 - printWords "''${ldflagsBefore[@]}" > $out/nix-support/libc-ldflags-before 223 - '') 224 - 225 - + optionalString (!nativeTools) '' 226 - 227 - ## 228 - ## User env support 229 - ## 230 - 231 - # Propagate the underling unwrapped binutils so that if you 232 - # install the wrapper, you get tools like objdump, the manpages, 233 - # etc. as well (same for any binaries of libc). 234 - printWords ${binutils_bin} ${if libc == null then "" else libc_bin} > $out/nix-support/propagated-user-env-packages 235 - '' 236 - 237 - + '' 238 - 239 - ## 240 - ## Hardening support 241 - ## 242 - 243 - # some linkers on some platforms don't support specific -z flags 244 - export hardening_unsupported_flags="" 245 - if [[ "$($ldPath/${prefix}ld -z now 2>&1 || true)" =~ un(recognized|known)\ option ]]; then 246 - hardening_unsupported_flags+=" bindnow" 247 - fi 248 - if [[ "$($ldPath/${prefix}ld -z relro 2>&1 || true)" =~ un(recognized|known)\ option ]]; then 249 - hardening_unsupported_flags+=" relro" 250 - fi 251 - '' 252 - 253 - + optionalString hostPlatform.isCygwin '' 254 - hardening_unsupported_flags+=" pic" 255 - '' 256 - 257 - + '' 258 - set +u 259 - substituteAll ${./add-flags.sh} $out/nix-support/add-flags.sh 260 - substituteAll ${./add-hardening.sh} $out/nix-support/add-hardening.sh 261 - substituteAll ${../cc-wrapper/utils.sh} $out/nix-support/utils.sh 262 - 263 - ## 264 - ## Extra custom steps 265 - ## 266 - 267 - '' 268 - + extraBuildCommands; 269 - 270 - inherit dynamicLinker expand-response-params; 271 - 272 - # for substitution in utils.sh 273 - expandResponseParams = "${expand-response-params}/bin/expand-response-params"; 274 - 275 - crossAttrs = { 276 - shell = shell.crossDrv + shell.crossDrv.shellPath; 277 - }; 278 - 279 - meta = 280 - let binutils_ = if binutils != null then binutils else {}; in 281 - (if binutils_ ? meta then removeAttrs binutils.meta ["priority"] else {}) // 282 - { description = 283 - stdenv.lib.attrByPath ["meta" "description"] "System binary utilities" binutils_ 284 - + " (wrapper script)"; 285 - } // optionalAttrs useMacosReexportHack { 286 - platforms = stdenv.lib.platforms.darwin; 287 - }; 288 - }
-25
pkgs/build-support/binutils-wrapper/ld-solaris-wrapper.sh
··· 1 - #!@shell@ 2 - set -eu -o pipefail 3 - shopt -s nullglob 4 - 5 - declare -a args=("$@") 6 - # I've also tried adding -z direct and -z lazyload, but it gave too many problems with C++ exceptions :'( 7 - # Also made sure libgcc would not be lazy-loaded, as suggested here: https://www.illumos.org/issues/2534#note-3 8 - # but still no success. 9 - declare -a argsBefore=(-z ignore) argsAfter=() 10 - 11 - # This loop makes sure all -L arguments are before -l arguments, or ld may complain it cannot find a library. 12 - # GNU binutils does not have this problem: 13 - # http://stackoverflow.com/questions/5817269/does-the-order-of-l-and-l-options-in-the-gnu-linker-matter 14 - while (( $# )); do 15 - case "${args[$i]}" in 16 - -L) argsBefore+=("$1" "$2"); shift ;; 17 - -L?*) argsBefore+=("$1") ;; 18 - *) argsAfter+=("$1") ;; 19 - esac 20 - shift 21 - done 22 - 23 - # Trace: 24 - set -x 25 - exec "@ld@" "${argsBefore[@]}" "${argsAfter[@]}"
+3 -18
pkgs/build-support/binutils-wrapper/ld-wrapper.sh pkgs/build-support/cc-wrapper/ld-wrapper.sh
··· 10 10 PATH="@coreutils_bin@/bin" 11 11 fi 12 12 13 - source @out@/nix-support/utils.sh 14 - 15 - if [ -z "${NIX_BINUTILS_WRAPPER_@infixSalt@_FLAGS_SET:-}" ]; then 13 + if [ -z "${NIX_CC_WRAPPER_@infixSalt@_FLAGS_SET:-}" ]; then 16 14 source @out@/nix-support/add-flags.sh 17 15 fi 16 + 17 + source @out@/nix-support/utils.sh 18 18 19 19 20 20 # Optionally filter out paths not refering to the store. ··· 62 62 fi 63 63 64 64 extraAfter+=($NIX_@infixSalt@_LDFLAGS_AFTER) 65 - 66 - # Choose 32-bit dynamic linker if needed 67 - if [ -e @out@/nix-support/dynamic-linker-m32 ]; then 68 - prev= 69 - for p in ${params+"${params[@]}"}; do 70 - if [[ "$prev" = "-m" && "$p" = "elf_i386" ]]; then 71 - extraAfter+=( 72 - '-dynamic-linker' 73 - "$(< @out@/nix-support/dynamic-linker-m32)" 74 - ) 75 - break 76 - fi 77 - prev="$p" 78 - done 79 - fi 80 65 81 66 declare -a libDirs 82 67 declare -A libs
-63
pkgs/build-support/binutils-wrapper/setup-hook.sh
··· 1 - # Binutils Wrapper hygiene 2 - # 3 - # See comments in cc-wrapper's setup hook. This works exactly the same way. 4 - 5 - binutilsWrapper_addLDVars () { 6 - case $depOffset in 7 - -1) local role='BUILD_' ;; 8 - 0) local role='' ;; 9 - 1) local role='TARGET_' ;; 10 - *) echo "binutils-wrapper: Error: Cannot be used with $depOffset-offset deps, " >2; 11 - return 1 ;; 12 - esac 13 - 14 - if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then 15 - export NIX_${role}LDFLAGS+=" -L$1/lib64" 16 - fi 17 - 18 - if [[ -d "$1/lib" ]]; then 19 - export NIX_${role}LDFLAGS+=" -L$1/lib" 20 - fi 21 - } 22 - 23 - if [ -n "${crossConfig:-}" ]; then 24 - export NIX_BINUTILS_WRAPPER_@infixSalt@_TARGET_BUILD=1 25 - role="BUILD_" 26 - else 27 - export NIX_BINUTILS_WRAPPER_@infixSalt@_TARGET_HOST=1 28 - role="" 29 - fi 30 - 31 - envHooks+=(binutilsWrapper_addLDVars) 32 - 33 - # shellcheck disable=SC2157 34 - if [ -n "@binutils_bin@" ]; then 35 - addToSearchPath _PATH @binutils_bin@/bin 36 - fi 37 - 38 - # shellcheck disable=SC2157 39 - if [ -n "@libc_bin@" ]; then 40 - addToSearchPath _PATH @libc_bin@/bin 41 - fi 42 - 43 - # shellcheck disable=SC2157 44 - if [ -n "@coreutils_bin@" ]; then 45 - addToSearchPath _PATH @coreutils_bin@/bin 46 - fi 47 - 48 - # Export tool environment variables so various build systems use the right ones. 49 - 50 - export NIX_${role}BINUTILS=@out@ 51 - 52 - for CMD in \ 53 - ar as nm objcopy ranlib strip strings size ld windres 54 - do 55 - if 56 - PATH=$_PATH type -p "@binPrefix@$CMD" > /dev/null 57 - then 58 - export "${role}$(echo "$CMD" | tr "[:lower:]" "[:upper:]")=@binPrefix@${CMD}"; 59 - fi 60 - done 61 - 62 - # No local scope in sourced file 63 - unset role
+27 -12
pkgs/build-support/cc-wrapper/add-flags.sh
··· 4 4 # that case, it is cheaper/better to not repeat this step and let the forked 5 5 # wrapped binary just inherit the work of the forker's wrapper script. 6 6 7 - var_templates_list=( 7 + var_templates=( 8 8 NIX+CFLAGS_COMPILE 9 9 NIX+CFLAGS_LINK 10 10 NIX+CXXSTDLIB_COMPILE 11 11 NIX+CXXSTDLIB_LINK 12 12 NIX+GNATFLAGS_COMPILE 13 - ) 14 - var_templates_bool=( 13 + NIX+IGNORE_LD_THROUGH_GCC 14 + NIX+LDFLAGS 15 + NIX+LDFLAGS_BEFORE 16 + NIX+LDFLAGS_AFTER 17 + 18 + NIX+SET_BUILD_ID 19 + NIX+DONT_SET_RPATH 15 20 NIX+ENFORCE_NO_NATIVE 16 21 ) 17 22 ··· 30 35 31 36 # We need to mangle names for hygiene, but also take parameters/overrides 32 37 # from the environment. 33 - for var in "${var_templates_list[@]}"; do 34 - mangleVarList "$var" "${role_infixes[@]}" 35 - done 36 - for var in "${var_templates_bool[@]}"; do 37 - mangleVarBool "$var" "${role_infixes[@]}" 38 + for var in "${var_templates[@]}"; do 39 + outputVar="${var/+/_@infixSalt@_}" 40 + export ${outputVar}+='' 41 + # For each role we serve, we accumulate the input parameters into our own 42 + # cc-wrapper-derivation-specific environment variables. 43 + for infix in "${role_infixes[@]}"; do 44 + inputVar="${var/+/${infix}}" 45 + if [ -v "$inputVar" ]; then 46 + export ${outputVar}+="${!outputVar:+ }${!inputVar}" 47 + fi 48 + done 38 49 done 39 50 40 51 # `-B@out@/bin' forces cc to use ld-wrapper.sh when calling ld. ··· 55 66 NIX_@infixSalt@_GNATFLAGS_COMPILE="$(< @out@/nix-support/gnat-cflags) $NIX_@infixSalt@_GNATFLAGS_COMPILE" 56 67 fi 57 68 69 + if [ -e @out@/nix-support/libc-ldflags ]; then 70 + NIX_@infixSalt@_LDFLAGS+=" $(< @out@/nix-support/libc-ldflags)" 71 + fi 72 + 58 73 if [ -e @out@/nix-support/cc-ldflags ]; then 59 - # We don't import this above, but just tack this on know. binutils-wrapper's 60 - # add-flags will not clobber it. 61 - # 62 - # TODO(@Ericson2314): Consider `NIX_@infixSalt@_CFLAGS_LINK` instead 63 74 NIX_@infixSalt@_LDFLAGS+=" $(< @out@/nix-support/cc-ldflags)" 75 + fi 76 + 77 + if [ -e @out@/nix-support/libc-ldflags-before ]; then 78 + NIX_@infixSalt@_LDFLAGS_BEFORE="$(< @out@/nix-support/libc-ldflags-before) $NIX_@infixSalt@_LDFLAGS_BEFORE" 64 79 fi 65 80 66 81 # That way forked processes will not extend these environment variables again.
+10
pkgs/build-support/cc-wrapper/add-hardening.sh
··· 6 6 hardeningFlags+=(${hardeningEnable[@]}) 7 7 fi 8 8 hardeningCFlags=() 9 + hardeningLDFlags=() 9 10 10 11 declare -A hardeningDisableMap 11 12 ··· 43 44 if [[ ! ("$*" =~ " -shared " || "$*" =~ " -static ") ]]; then 44 45 if [[ -n "${NIX_DEBUG:-}" ]]; then echo HARDENING: enabling LDFlags -pie >&2; fi 45 46 hardeningCFlags+=('-pie') 47 + hardeningLDFlags+=('-pie') 46 48 fi 47 49 ;; 48 50 pic) ··· 56 58 format) 57 59 if [[ -n "${NIX_DEBUG:-}" ]]; then echo HARDENING: enabling format >&2; fi 58 60 hardeningCFlags+=('-Wformat' '-Wformat-security' '-Werror=format-security') 61 + ;; 62 + relro) 63 + if [[ -n "${NIX_DEBUG:-}" ]]; then echo HARDENING: enabling relro >&2; fi 64 + hardeningLDFlags+=('-z' 'relro') 65 + ;; 66 + bindnow) 67 + if [[ -n "${NIX_DEBUG:-}" ]]; then echo HARDENING: enabling bindnow >&2; fi 68 + hardeningLDFlags+=('-z' 'now') 59 69 ;; 60 70 *) 61 71 # Ignore unsupported. Checked in Nix that at least *some*
+6 -8
pkgs/build-support/cc-wrapper/cc-wrapper.sh
··· 11 11 PATH="@coreutils_bin@/bin:@gnugrep_bin@/bin" 12 12 fi 13 13 14 - source @out@/nix-support/utils.sh 15 - 16 - # Flirting with a layer violation here. 17 - if [ -z "${NIX_BINUTILS_WRAPPER_@infixSalt@_FLAGS_SET:-}" ]; then 18 - source @binutils@/nix-support/add-flags.sh 19 - fi 20 - 21 - # Put this one second so libc ldflags take priority. 22 14 if [ -z "${NIX_CC_WRAPPER_@infixSalt@_FLAGS_SET:-}" ]; then 23 15 source @out@/nix-support/add-flags.sh 24 16 fi 17 + 18 + source @out@/nix-support/utils.sh 25 19 26 20 27 21 # Parse command line options and set several variables. ··· 63 57 cppInclude=0 64 58 elif [ "${p:0:1}" != - ]; then 65 59 nonFlagArgs=1 60 + elif [ "$p" = -m32 ]; then 61 + if [ -e @out@/nix-support/dynamic-linker-m32 ]; then 62 + NIX_@infixSalt@_LDFLAGS+=" -dynamic-linker $(< @out@/nix-support/dynamic-linker-m32)" 63 + fi 66 64 fi 67 65 n+=1 68 66 done
+114 -17
pkgs/build-support/cc-wrapper/default.nix
··· 6 6 # compiler and the linker just "work". 7 7 8 8 { name ? "", stdenv, nativeTools, noLibc ? false, nativeLibc, nativePrefix ? "" 9 - , cc ? null, libc ? null, binutils, coreutils ? null, shell ? stdenv.shell 9 + , cc ? null, libc ? null, binutils ? null, coreutils ? null, shell ? stdenv.shell 10 10 , zlib ? null, extraPackages ? [], extraBuildCommands ? "" 11 11 , isGNU ? false, isClang ? cc.isClang or false, gnugrep ? null 12 12 , buildPackages ? {} 13 + , useMacosReexportHack ? false 13 14 }: 14 15 15 16 with stdenv.lib; 16 17 17 18 assert nativeTools -> nativePrefix != ""; 18 19 assert !nativeTools -> 19 - cc != null && coreutils != null && gnugrep != null; 20 + cc != null && binutils != null && coreutils != null && gnugrep != null; 20 21 assert !(nativeLibc && noLibc); 21 22 assert (noLibc || nativeLibc) == (libc == null); 22 23 24 + assert stdenv.targetPlatform != stdenv.hostPlatform -> runCommand != null; 25 + 23 26 # For ghdl (the vhdl language provider to gcc) we need zlib in the wrapper. 24 27 assert cc.langVhdl or false -> zlib != null; 25 28 ··· 40 43 libc_dev = if libc == null then null else getDev libc; 41 44 libc_lib = if libc == null then null else getLib libc; 42 45 cc_solib = getLib cc; 46 + binutils_bin = if nativeTools then "" else getBin binutils; 43 47 # The wrapper scripts use 'cat' and 'grep', so we may need coreutils. 44 48 coreutils_bin = if nativeTools then "" else getBin coreutils; 45 49 ··· 55 59 # unstable implementation detail, however. 56 60 infixSalt = dashlessTarget; 57 61 62 + # The dynamic linker has different names on different platforms. This is a 63 + # shell glob that ought to match it. 64 + dynamicLinker = 65 + /**/ if libc == null then null 66 + else if targetPlatform.system == "i686-linux" then "${libc_lib}/lib/ld-linux.so.2" 67 + else if targetPlatform.system == "x86_64-linux" then "${libc_lib}/lib/ld-linux-x86-64.so.2" 68 + # ARM with a wildcard, which can be "" or "-armhf". 69 + else if targetPlatform.isArm then "${libc_lib}/lib/ld-linux*.so.3" 70 + else if targetPlatform.system == "aarch64-linux" then "${libc_lib}/lib/ld-linux-aarch64.so.1" 71 + else if targetPlatform.system == "powerpc-linux" then "${libc_lib}/lib/ld.so.1" 72 + else if targetPlatform.system == "mips64el-linux" then "${libc_lib}/lib/ld.so.1" 73 + else if targetPlatform.system == "x86_64-darwin" then "/usr/lib/dyld" 74 + else if stdenv.lib.hasSuffix "pc-gnu" targetPlatform.config then "ld.so.1" 75 + else null; 76 + 58 77 expand-response-params = 59 78 if buildPackages.stdenv.cc or null != null && buildPackages.stdenv.cc != "/dev/null" 60 79 then import ../expand-response-params { inherit (buildPackages) stdenv; } ··· 69 88 70 89 preferLocalBuild = true; 71 90 72 - inherit cc shell libc_bin libc_dev libc_lib binutils coreutils_bin; 91 + inherit cc shell libc_bin libc_dev libc_lib binutils_bin coreutils_bin; 73 92 gnugrep_bin = if nativeTools then "" else gnugrep; 74 93 75 94 binPrefix = prefix; ··· 83 102 84 103 emacsBufferSetup = pkgs: '' 85 104 ; We should handle propagation here too 86 - (mapc 87 - (lambda (arg) 88 - (when (file-directory-p (concat arg "/include")) 89 - (setenv "NIX_${infixSalt}_CFLAGS_COMPILE" (concat (getenv "NIX_${infixSalt}_CFLAGS_COMPILE") " -isystem " arg "/include")))) 90 - '(${concatStringsSep " " (map (pkg: "\"${pkg}\"") pkgs)})) 105 + (mapc (lambda (arg) 106 + (when (file-directory-p (concat arg "/include")) 107 + (setenv "NIX_${infixSalt}_CFLAGS_COMPILE" (concat (getenv "NIX_${infixSalt}_CFLAGS_COMPILE") " -isystem " arg "/include"))) 108 + (when (file-directory-p (concat arg "/lib")) 109 + (setenv "NIX_${infixSalt}_LDFLAGS" (concat (getenv "NIX_${infixSalt}_LDFLAGS") " -L" arg "/lib"))) 110 + (when (file-directory-p (concat arg "/lib64")) 111 + (setenv "NIX_${infixSalt}_LDFLAGS" (concat (getenv "NIX_${infixSalt}_LDFLAGS") " -L" arg "/lib64")))) '(${concatStringsSep " " (map (pkg: "\"${pkg}\"") pkgs)})) 91 112 ''; 92 113 }; 93 114 ··· 117 138 echo ${if targetPlatform.isDarwin then cc else nativePrefix} > $out/nix-support/orig-cc 118 139 119 140 ccPath="${if targetPlatform.isDarwin then cc else nativePrefix}/bin" 141 + ldPath="${nativePrefix}/bin" 120 142 '' else '' 121 143 echo $cc > $out/nix-support/orig-cc 122 144 123 145 ccPath="${cc}/bin" 146 + ldPath="${binutils_bin}/bin" 147 + '' 148 + 149 + + optionalString (targetPlatform.isSunOS && nativePrefix != "") '' 150 + # Solaris needs an additional ld wrapper. 151 + ldPath="${nativePrefix}/bin" 152 + exec="$ldPath/${prefix}ld" 153 + wrap ld-solaris ${./ld-solaris-wrapper.sh} 124 154 '') 125 155 126 156 + '' 127 - # Create symlinks to everything in the binutils wrapper. 128 - for bbin in $binutils/bin/*; do 129 - mkdir -p "$out/bin" 130 - ln -s "$bbin" "$out/bin/$(basename $bbin)" 131 - done 157 + # Create a symlink to as (the assembler). This is useful when a 158 + # cc-wrapper is installed in a user environment, as it ensures that 159 + # the right assembler is called. 160 + if [ -e $ldPath/${prefix}as ]; then 161 + ln -s $ldPath/${prefix}as $out/bin/${prefix}as 162 + fi 163 + 164 + '' + (if !useMacosReexportHack then '' 165 + wrap ${prefix}ld ${./ld-wrapper.sh} ''${ld:-$ldPath/${prefix}ld} 166 + '' else '' 167 + ldInner="${prefix}ld-reexport-delegate" 168 + wrap "$ldInner" ${./macos-sierra-reexport-hack.bash} ''${ld:-$ldPath/${prefix}ld} 169 + wrap "${prefix}ld" ${./ld-wrapper.sh} "$out/bin/$ldInner" 170 + unset ldInner 171 + '') + '' 172 + 173 + if [ -e ${binutils_bin}/bin/${prefix}ld.gold ]; then 174 + wrap ${prefix}ld.gold ${./ld-wrapper.sh} ${binutils_bin}/bin/${prefix}ld.gold 175 + fi 176 + 177 + if [ -e ${binutils_bin}/bin/ld.bfd ]; then 178 + wrap ${prefix}ld.bfd ${./ld-wrapper.sh} ${binutils_bin}/bin/${prefix}ld.bfd 179 + fi 132 180 133 181 # We export environment variables pointing to the wrapped nonstandard 134 182 # cmds, lest some lousy configure script use those to guess compiler ··· 188 236 ln -s $ccPath/${prefix}ghdl $out/bin/${prefix}ghdl 189 237 ''; 190 238 191 - propagatedBuildInputs = [ binutils ] ++ extraPackages; 239 + propagatedBuildInputs = extraPackages; 192 240 193 241 setupHook = ./setup-hook.sh; 194 242 ··· 197 245 set -u 198 246 '' 199 247 200 - + optionalString (libc != null) '' 248 + + optionalString (libc != null) ('' 201 249 ## 202 250 ## General libc support 203 251 ## ··· 215 263 # another -idirafter is necessary to add that directory again. 216 264 echo "-B${libc_lib}/lib/ -idirafter ${libc_dev}/include -idirafter ${cc}/lib/gcc/*/*/include-fixed" > $out/nix-support/libc-cflags 217 265 266 + echo "-L${libc_lib}/lib" > $out/nix-support/libc-ldflags 267 + 218 268 echo "${libc_lib}" > $out/nix-support/orig-libc 219 269 echo "${libc_dev}" > $out/nix-support/orig-libc-dev 220 - '' 270 + 271 + ## 272 + ## Dynamic linker support 273 + ## 274 + 275 + if [[ -z ''${dynamicLinker+x} ]]; then 276 + echo "Don't know the name of the dynamic linker for platform '${targetPlatform.config}', so guessing instead." >&2 277 + local dynamicLinker="${libc_lib}/lib/ld*.so.?" 278 + fi 279 + 280 + # Expand globs to fill array of options 281 + dynamicLinker=($dynamicLinker) 282 + 283 + case ''${#dynamicLinker[@]} in 284 + 0) echo "No dynamic linker found for platform '${targetPlatform.config}'." >&2;; 285 + 1) echo "Using dynamic linker: '$dynamicLinker'" >&2;; 286 + *) echo "Multiple dynamic linkers found for platform '${targetPlatform.config}'." >&2;; 287 + esac 288 + 289 + if [ -n "$dynamicLinker" ]; then 290 + echo $dynamicLinker > $out/nix-support/dynamic-linker 291 + 292 + '' + (if targetPlatform.isDarwin then '' 293 + printf "export LD_DYLD_PATH=%q\n" "$dynamicLinker" >> $out/nix-support/setup-hook 294 + '' else '' 295 + if [ -e ${libc_lib}/lib/32/ld-linux.so.2 ]; then 296 + echo ${libc_lib}/lib/32/ld-linux.so.2 > $out/nix-support/dynamic-linker-m32 297 + fi 298 + 299 + local ldflagsBefore=(-dynamic-linker "$dynamicLinker") 300 + '') + '' 301 + fi 302 + 303 + # The dynamic linker is passed in `ldflagsBefore' to allow 304 + # explicit overrides of the dynamic linker by callers to gcc/ld 305 + # (the *last* value counts, so ours should come first). 306 + printWords "''${ldflagsBefore[@]}" > $out/nix-support/libc-ldflags-before 307 + '') 221 308 222 309 + optionalString (!nativeTools) '' 223 310 ··· 258 345 # Propagate the wrapped cc so that if you install the wrapper, 259 346 # you get tools like gcov, the manpages, etc. as well (including 260 347 # for binutils and Glibc). 348 + printWords ${cc} ${binutils_bin} ${if libc == null then "" else libc_bin} > $out/nix-support/propagated-user-env-packages 261 349 printWords ${cc.man or ""} > $man/nix-support/propagated-user-env-packages 262 350 '' 263 351 ··· 267 355 ## Hardening support 268 356 ## 269 357 358 + # some linkers on some platforms don't support specific -z flags 270 359 export hardening_unsupported_flags="" 360 + if [[ "$($ldPath/${prefix}ld -z now 2>&1 || true)" =~ un(recognized|known)\ option ]]; then 361 + hardening_unsupported_flags+=" bindnow" 362 + fi 363 + if [[ "$($ldPath/${prefix}ld -z relro 2>&1 || true)" =~ un(recognized|known)\ option ]]; then 364 + hardening_unsupported_flags+=" relro" 365 + fi 271 366 '' 272 367 273 368 + optionalString hostPlatform.isCygwin '' ··· 286 381 '' 287 382 + extraBuildCommands; 288 383 289 - inherit expand-response-params; 384 + inherit dynamicLinker expand-response-params; 290 385 291 386 # for substitution in utils.sh 292 387 expandResponseParams = "${expand-response-params}/bin/expand-response-params"; ··· 301 396 { description = 302 397 stdenv.lib.attrByPath ["meta" "description"] "System C compiler" cc_ 303 398 + " (wrapper script)"; 399 + } // optionalAttrs useMacosReexportHack { 400 + platforms = stdenv.lib.platforms.darwin; 304 401 }; 305 402 }
+2 -2
pkgs/build-support/cc-wrapper/gnat-wrapper.sh
··· 13 13 PATH="@coreutils_bin@/bin" 14 14 fi 15 15 16 - source @out@/nix-support/utils.sh 17 - 18 16 if [ -z "${NIX_@infixSalt@_GNAT_WRAPPER_FLAGS_SET:-}" ]; then 19 17 source @out@/nix-support/add-flags.sh 20 18 fi 19 + 20 + source @out@/nix-support/utils.sh 21 21 22 22 23 23 # Figure out if linker flags should be passed. GCC prints annoying
+25
pkgs/build-support/cc-wrapper/ld-solaris-wrapper.sh
··· 1 + #!@shell@ 2 + set -eu -o pipefail 3 + shopt -s nullglob 4 + 5 + declare -a args=("$@") 6 + # I've also tried adding -z direct and -z lazyload, but it gave too many problems with C++ exceptions :'( 7 + # Also made sure libgcc would not be lazy-loaded, as suggested here: https://www.illumos.org/issues/2534#note-3 8 + # but still no success. 9 + declare -a argsBefore=(-z ignore) argsAfter=() 10 + 11 + # This loop makes sure all -L arguments are before -l arguments, or ld may complain it cannot find a library. 12 + # GNU binutils does not have this problem: 13 + # http://stackoverflow.com/questions/5817269/does-the-order-of-l-and-l-options-in-the-gnu-linker-matter 14 + while (( $# )); do 15 + case "${args[$i]}" in 16 + -L) argsBefore+=("$1" "$2"); shift ;; 17 + -L?*) argsBefore+=("$1") ;; 18 + *) argsAfter+=("$1") ;; 19 + esac 20 + shift 21 + done 22 + 23 + # Trace: 24 + set -x 25 + exec "@ld@" "${argsBefore[@]}" "${argsAfter[@]}"
+106
pkgs/build-support/cc-wrapper/macos-sierra-reexport-hack.bash
··· 1 + #! @shell@ 2 + 3 + set -eu -o pipefail 4 + 5 + path_backup="$PATH" 6 + if [ -n "@coreutils_bin@" ]; then 7 + PATH="@coreutils_bin@/bin" 8 + fi 9 + 10 + declare -r recurThreshold=300 11 + 12 + declare overflowCount=0 13 + for ((n=0; n < $#; ++n)); do 14 + case "${!n}" in 15 + -l*) let overflowCount+=1 ;; 16 + -reexport-l*) let overflowCount+=1 ;; 17 + *) ;; 18 + esac 19 + done 20 + 21 + declare -a allArgs=() 22 + 23 + if (( "$overflowCount" <= "$recurThreshold" )); then 24 + allArgs=("$@") 25 + else 26 + declare -a childrenLookup=() childrenLink=() 27 + 28 + while (( $# )); do 29 + case "$1" in 30 + -L/*) 31 + childrenLookup+=("$1") 32 + allArgs+=("$1") 33 + ;; 34 + -L) 35 + echo "cctools LD does not support '-L foo' or '-l foo'" >&2 36 + exit 1 37 + ;; 38 + -l) 39 + echo "cctools LD does not support '-L foo' or '-l foo'" >&2 40 + exit 1 41 + ;; 42 + -lazy_library | -lazy_framework | -lto_library) 43 + # We aren't linking any "azy_library", "to_library", etc. 44 + allArgs+=("$1") 45 + ;; 46 + -lazy-l | -weak-l) allArgs+=("$1") ;; 47 + # We can't so easily prevent header issues from these. 48 + -lSystem) allArgs+=("$1") ;; 49 + # Special case as indirection seems like a bad idea for something 50 + # so fundamental. Can be removed for simplicity. 51 + -l?* | -reexport-l?*) childrenLink+=("$1") ;; 52 + *) allArgs+=("$1") ;; 53 + esac 54 + 55 + shift 56 + done 57 + 58 + declare n=0 59 + while (( $n < "${#childrenLink[@]}" )); do 60 + if [[ "${childrenLink[n]}" = -l* ]]; then 61 + childrenLink[n]="-reexport${childrenLink[n]}" 62 + fi 63 + let ++n 64 + done 65 + unset n 66 + 67 + declare -r outputNameLibless=$(basename $( \ 68 + if [[ -z "${outputName:+isUndefined}" ]]; then 69 + echo unnamed 70 + elif [[ "${outputName:0:3}" = lib ]]; then 71 + echo "${outputName:3}" 72 + else 73 + echo "${outputName}" 74 + fi)) 75 + declare -ra children=("$outputNameLibless-reexport-delegate-0" \ 76 + "$outputNameLibless-reexport-delegate-1") 77 + 78 + mkdir -p "$out/lib" 79 + 80 + PATH="$PATH:@out@/bin" 81 + 82 + symbolBloatObject=$outputNameLibless-symbol-hack.o 83 + if [[ ! -e $symbolBloatObject ]]; then 84 + printf '.private_extern _______child_hack_foo\nchild_hack_foo:\n' \ 85 + | @binPrefix@as -- -o $symbolBloatObject 86 + fi 87 + 88 + # first half of libs 89 + @binPrefix@ld -macosx_version_min $MACOSX_DEPLOYMENT_TARGET -arch x86_64 -dylib \ 90 + -o "$out/lib/lib${children[0]}.dylib" \ 91 + -install_name "$out/lib/lib${children[0]}.dylib" \ 92 + "${childrenLookup[@]}" "$symbolBloatObject" \ 93 + "${childrenLink[@]:0:$((${#childrenLink[@]} / 2 ))}" 94 + 95 + # second half of libs 96 + @binPrefix@ld -macosx_version_min $MACOSX_DEPLOYMENT_TARGET -arch x86_64 -dylib \ 97 + -o "$out/lib/lib${children[1]}.dylib" \ 98 + -install_name "$out/lib/lib${children[1]}.dylib" \ 99 + "${childrenLookup[@]}" "$symbolBloatObject" \ 100 + "${childrenLink[@]:$((${#childrenLink[@]} / 2 ))}" 101 + 102 + allArgs+=("-L$out/lib" "-l${children[0]}" "-l${children[1]}") 103 + fi 104 + 105 + PATH="$path_backup" 106 + exec @prog@ "${allArgs[@]}"
+23
pkgs/build-support/cc-wrapper/setup-hook.sh
··· 74 74 export NIX_${role}CFLAGS_COMPILE+=" ${ccIncludeFlag:--isystem} $1/include" 75 75 fi 76 76 77 + if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then 78 + export NIX_${role}LDFLAGS+=" -L$1/lib64" 79 + fi 80 + 81 + if [[ -d "$1/lib" ]]; then 82 + export NIX_${role}LDFLAGS+=" -L$1/lib" 83 + fi 84 + 77 85 if [[ -d "$1/Library/Frameworks" ]]; then 78 86 export NIX_${role}CFLAGS_COMPILE+=" -F$1/Library/Frameworks" 79 87 fi ··· 109 117 fi 110 118 111 119 # shellcheck disable=SC2157 120 + if [ -n "@binutils_bin@" ]; then 121 + addToSearchPath _PATH @binutils_bin@/bin 122 + fi 123 + 124 + # shellcheck disable=SC2157 112 125 if [ -n "@libc_bin@" ]; then 113 126 addToSearchPath _PATH @libc_bin@/bin 114 127 fi ··· 124 137 125 138 export ${role}CC=@named_cc@ 126 139 export ${role}CXX=@named_cxx@ 140 + 141 + for CMD in \ 142 + ar as nm objcopy ranlib strip strings size ld windres 143 + do 144 + if 145 + PATH=$_PATH type -p "@binPrefix@$CMD" > /dev/null 146 + then 147 + export "${role}$(echo "$CMD" | tr "[:lower:]" "[:upper:]")=@binPrefix@${CMD}"; 148 + fi 149 + done 127 150 128 151 # No local scope in sourced file 129 152 unset role
-32
pkgs/build-support/cc-wrapper/utils.sh
··· 1 - mangleVarList() { 2 - local var="$1" 3 - shift 4 - local -a role_infixes=("$@") 5 - 6 - local outputVar="${var/+/_@infixSalt@_}" 7 - declare -gx ${outputVar}+='' 8 - # For each role we serve, we accumulate the input parameters into our own 9 - # cc-wrapper-derivation-specific environment variables. 10 - for infix in "${role_infixes[@]}"; do 11 - local inputVar="${var/+/${infix}}" 12 - if [ -v "$inputVar" ]; then 13 - export ${outputVar}+="${!outputVar:+ }${!inputVar}" 14 - fi 15 - done 16 - } 17 - 18 - mangleVarBool() { 19 - local var="$1" 20 - shift 21 - local -a role_infixes=("$@") 22 - 23 - local outputVar="${var/+/_@infixSalt@_}" 24 - declare -gxi ${outputVar}+='' 25 - for infix in "${role_infixes[@]}"; do 26 - local inputVar="${var/+/${infix}}" 27 - if [ -v "$inputVar" ]; then 28 - let "${outputVar} |= ${!inputVar}" 29 - fi 30 - done 31 - } 32 - 33 1 skip () { 34 2 if [ -n "${NIX_DEBUG:-}" ]; then 35 3 echo "skipping impure path $1" >&2
+1 -1
pkgs/desktops/maxx/default.nix
··· 59 59 60 60 while IFS= read -r -d ''$'\0' i; do 61 61 if isELF "$i"; then 62 - bin=`patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" "$i"; echo $?` 62 + bin=`patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$i"; echo $?` 63 63 patchelf --set-rpath "${stdenv.lib.makeLibraryPath deps}" "$i" 64 64 if [ "$bin" -eq 0 ]; then 65 65 wrapProgram "$i" \
+3 -3
pkgs/development/arduino/arduino-core/default.nix
··· 135 135 cp ${teensyduino_src} ./TeensyduinoInstall.${teensy_architecture} 136 136 chmod +w ./TeensyduinoInstall.${teensy_architecture} 137 137 upx -d ./TeensyduinoInstall.${teensy_architecture} 138 - patchelf --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) \ 138 + patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 139 139 --set-rpath "${teensy_libpath}" \ 140 140 ./TeensyduinoInstall.${teensy_architecture} 141 141 chmod +x ./TeensyduinoInstall.${teensy_architecture} ··· 181 181 182 182 preFixup = '' 183 183 for file in $(find $out -type f \( -perm /0111 -o -name \*.so\* \) ); do 184 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" "$file" || true 184 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file" || true 185 185 patchelf --set-rpath ${rpath}:$out/lib $file || true 186 186 done 187 187 ··· 203 203 ${stdenv.lib.optionalString withTeensyduino '' 204 204 # Patch the Teensy loader binary 205 205 patchelf --debug \ 206 - --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) \ 206 + --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 207 207 --set-rpath "${teensy_libpath}" \ 208 208 $out/share/arduino/hardware/tools/teensy 209 209 ''}
+1 -1
pkgs/development/compilers/cmucl/binary.nix
··· 24 24 buildCommand = '' 25 25 mkdir -p $out 26 26 tar -C $out -xjf ${dist} 27 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 27 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 28 28 $out/bin/lisp 29 29 ''; 30 30
+1 -1
pkgs/development/compilers/crystal/default.nix
··· 50 50 --suffix DYLD_LIBRARY_PATH : $libPath 51 51 '' 52 52 else '' 53 - patchelf --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) \ 53 + patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 54 54 crystal-${version}-1/embedded/bin/crystal 55 55 patchelf --set-rpath ${ stdenv.lib.makeLibraryPath [ stdenv.cc.cc ] } \ 56 56 crystal-${version}-1/embedded/bin/crystal
+1 -1
pkgs/development/compilers/cudatoolkit/default.nix
··· 49 49 echo "patching $i..." 50 50 if [[ ! $i =~ \.so ]]; then 51 51 patchelf \ 52 - --set-interpreter "''$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" $i 52 + --set-interpreter "''$(cat $NIX_CC/nix-support/dynamic-linker)" $i 53 53 fi 54 54 rpath2=$rpath:$lib/lib:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64 55 55 patchelf --set-rpath $rpath2 --force-rpath $i
+1 -1
pkgs/development/compilers/gcc/builder.sh
··· 25 25 # Figure out what extra flags to pass to the gcc compilers 26 26 # being generated to make sure that they use our glibc. 27 27 extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)" 28 - extraLDFlags="$(cat $NIX_BINUTILS/nix-support/libc-ldflags) $(cat $NIX_BINUTILS/nix-support/libc-ldflags-before || true)" 28 + extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before || true)" 29 29 30 30 # Use *real* header files, otherwise a limits.h is generated 31 31 # that does not include Glibc's limits.h (notably missing
+1 -1
pkgs/development/compilers/ghc/6.10.2-binary.nix
··· 39 39 # find editline/gmp. 40 40 (if stdenv.isLinux then '' 41 41 find . -type f -perm -0100 \ 42 - -exec patchelf --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 42 + -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 43 43 --set-rpath "${lib.makeLibraryPath [ libedit ncurses5 gmp ]}" {} \; 44 44 for prog in ld ar gcc strip ranlib; do 45 45 find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \;
+1 -1
pkgs/development/compilers/ghc/7.0.4-binary.nix
··· 61 61 # find editline/gmp. 62 62 stdenv.lib.optionalString stdenv.isLinux '' 63 63 find . -type f -perm -0100 \ 64 - -exec patchelf --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 64 + -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 65 65 --set-rpath "${stdenv.lib.makeLibraryPath [ ncurses5 gmp ]}" {} \; 66 66 sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2 67 67 sed -i "s|/usr/bin/gcc|gcc\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
+1 -1
pkgs/development/compilers/ghc/7.4.2-binary.nix
··· 63 63 mkdir -p "$out/lib" 64 64 ln -sv "${ncurses5.out}/lib/libncurses.so" "$out/lib/libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.5" 65 65 find . -type f -perm -0100 \ 66 - -exec patchelf --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 66 + -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 67 67 --set-rpath "${stdenv.lib.makeLibraryPath [ "$out" gmp ]}" {} \; 68 68 69 69 paxmark m ./ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
+1 -1
pkgs/development/compilers/gnatboot/default.nix
··· 21 21 cp -R * $out 22 22 set +e 23 23 for a in $out/bin/* ; do 24 - patchelf --interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) \ 24 + patchelf --interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 25 25 --set-rpath $(cat $NIX_CC/nix-support/orig-libc)/lib:$(cat $NIX_CC/nix-support/orig-cc)/lib64:$(cat $NIX_CC/nix-support/orig-cc)/lib $a 26 26 done 27 27 set -e
+1 -1
pkgs/development/compilers/llvm/3.4/llvm.nix
··· 50 50 "-DLLVM_BUILD_TESTS=ON" 51 51 "-DLLVM_ENABLE_FFI=ON" 52 52 "-DLLVM_REQUIRES_RTTI=1" 53 - "-DLLVM_BINUTILS_INCDIR=${binutils.binutils.dev or binutils.binutils}/include" 53 + "-DLLVM_BINUTILS_INCDIR=${binutils.dev or binutils}/include" 54 54 "-DCMAKE_CXX_FLAGS=-std=c++11" 55 55 ] ++ stdenv.lib.optional (!stdenv.isDarwin) "-DBUILD_SHARED_LIBS=ON"; 56 56
+1 -1
pkgs/development/compilers/llvm/3.5/llvm.nix
··· 47 47 ] ++ stdenv.lib.optional enableSharedLibraries 48 48 "-DBUILD_SHARED_LIBS=ON" 49 49 ++ stdenv.lib.optional (!isDarwin) 50 - "-DLLVM_BINUTILS_INCDIR=${binutils.binutils.dev}/include" 50 + "-DLLVM_BINUTILS_INCDIR=${binutils.dev}/include" 51 51 ++ stdenv.lib.optionals ( isDarwin) [ 52 52 "-DCMAKE_CXX_FLAGS=-stdlib=libc++" 53 53 "-DCAN_TARGET_i386=false"
+1 -1
pkgs/development/compilers/llvm/3.7/llvm.nix
··· 67 67 ] ++ stdenv.lib.optional enableSharedLibraries 68 68 "-DBUILD_SHARED_LIBS=ON" 69 69 ++ stdenv.lib.optional (!isDarwin) 70 - "-DLLVM_BINUTILS_INCDIR=${binutils.binutils.dev}/include" 70 + "-DLLVM_BINUTILS_INCDIR=${binutils.dev}/include" 71 71 ++ stdenv.lib.optionals ( isDarwin) [ 72 72 "-DLLVM_ENABLE_LIBCXX=ON" 73 73 "-DCAN_TARGET_i386=false"
+1 -1
pkgs/development/compilers/llvm/3.8/llvm.nix
··· 62 62 ] ++ stdenv.lib.optional enableSharedLibraries [ 63 63 "-DLLVM_LINK_LLVM_DYLIB=ON" 64 64 ] ++ stdenv.lib.optional (!isDarwin) 65 - "-DLLVM_BINUTILS_INCDIR=${binutils.binutils.dev}/include" 65 + "-DLLVM_BINUTILS_INCDIR=${binutils.dev}/include" 66 66 ++ stdenv.lib.optionals ( isDarwin) [ 67 67 "-DLLVM_ENABLE_LIBCXX=ON" 68 68 "-DCAN_TARGET_i386=false"
+1 -1
pkgs/development/compilers/llvm/3.9/llvm.nix
··· 106 106 ] ++ stdenv.lib.optional enableSharedLibraries [ 107 107 "-DLLVM_LINK_LLVM_DYLIB=ON" 108 108 ] ++ stdenv.lib.optional (!isDarwin) 109 - "-DLLVM_BINUTILS_INCDIR=${binutils.binutils.dev}/include" 109 + "-DLLVM_BINUTILS_INCDIR=${binutils.dev}/include" 110 110 ++ stdenv.lib.optionals (isDarwin) [ 111 111 "-DLLVM_ENABLE_LIBCXX=ON" 112 112 "-DCAN_TARGET_i386=false"
+1 -1
pkgs/development/compilers/llvm/4/llvm.nix
··· 90 90 "-DSPHINX_WARNINGS_AS_ERRORS=OFF" 91 91 ] 92 92 ++ stdenv.lib.optional (!isDarwin) 93 - "-DLLVM_BINUTILS_INCDIR=${binutils.binutils.dev}/include" 93 + "-DLLVM_BINUTILS_INCDIR=${binutils.dev}/include" 94 94 ++ stdenv.lib.optionals (isDarwin) [ 95 95 "-DLLVM_ENABLE_LIBCXX=ON" 96 96 "-DCAN_TARGET_i386=false"
+1 -1
pkgs/development/compilers/mentor/default.nix
··· 18 18 tar --strip-components=1 -xjf "$src" -C "$out" 19 19 20 20 # Patch binaries 21 - interpreter="$(cat "$NIX_BINUTILS/nix-support/dynamic-linker")" 21 + interpreter="$(cat "$NIX_CC"/nix-support/dynamic-linker)" 22 22 for file in "$out"/bin/* "$out"/libexec/gcc/*/*/* "$out"/*/bin/*; do 23 23 # Skip non-executable files 24 24 case "$file" in
+1 -1
pkgs/development/compilers/mono/llvm.nix
··· 42 42 43 43 cmakeFlags = with stdenv; [ 44 44 "-DLLVM_ENABLE_FFI=ON" 45 - "-DLLVM_BINUTILS_INCDIR=${binutils.binutils.dev}/include" 45 + "-DLLVM_BINUTILS_INCDIR=${binutils.dev}/include" 46 46 "-DCMAKE_CXX_FLAGS=-std=c++11" 47 47 ] ++ stdenv.lib.optional (!isDarwin) "-DBUILD_SHARED_LIBS=ON"; 48 48
+1 -1
pkgs/development/compilers/mozart/binary.nix
··· 39 39 tar xvf $src -C $out --strip-components=1 40 40 41 41 for exe in $out/bin/{ozemulator,ozwish} ; do 42 - patchelf --set-interpreter $(< $NIX_BINUTILS/nix-support/dynamic-linker) \ 42 + patchelf --set-interpreter $(< $NIX_CC/nix-support/dynamic-linker) \ 43 43 --set-rpath $libPath \ 44 44 $exe 45 45 done
+1 -1
pkgs/development/compilers/opendylan/bin.nix
··· 21 21 mkdir -p "$out" 22 22 tar --strip-components=1 -xjf "$src" -C "$out" 23 23 24 - interpreter="$(cat "$NIX_BINUTILS/nix-support/dynamic-linker")" 24 + interpreter="$(cat "$NIX_CC"/nix-support/dynamic-linker)" 25 25 for a in "$out"/bin/*; do 26 26 patchelf --set-interpreter "$interpreter" "$a" 27 27 patchelf --set-rpath "$out/lib:${boehmgc.out}/lib" "$a"
+2 -2
pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh
··· 5 5 6 6 # set the dynamic linker of unpack200, necessary for construct script 7 7 echo "patching unpack200" 8 - patchelf --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" --set-rpath "" */bin/unpack200 8 + patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "" */bin/unpack200 9 9 10 10 echo "constructing JDK and JRE installations" 11 11 if test -z "$installjdk"; then ··· 46 46 47 47 # set all the dynamic linkers 48 48 find $out -type f -perm -0100 \ 49 - -exec patchelf --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 49 + -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 50 50 --set-rpath "$rpath" {} \; 51 51 52 52 find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
+1 -1
pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
··· 179 179 180 180 # set all the dynamic linkers 181 181 find $out -type f -perm -0100 \ 182 - -exec patchelf --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 182 + -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 183 183 --set-rpath "$rpath" {} \; 184 184 185 185 find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
+4 -4
pkgs/development/compilers/rust/binaryBuild.nix
··· 42 42 43 43 ${optionalString (needsPatchelf && bootstrapping) '' 44 44 patchelf \ 45 - --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) \ 45 + --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 46 46 "$out/bin/rustdoc" 47 47 patchelf \ 48 48 --set-rpath "${stdenv.lib.makeLibraryPath [ curl zlib ]}" \ 49 - --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) \ 49 + --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 50 50 "$out/bin/cargo" 51 51 ''} 52 52 53 53 ${optionalString needsPatchelf '' 54 54 patchelf \ 55 - --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) \ 55 + --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 56 56 "$out/bin/rustc" 57 57 58 58 # Do NOT, I repeat, DO NOT use `wrapProgram` on $out/bin/rustc ··· 88 88 ${optionalString needsPatchelf '' 89 89 patchelf \ 90 90 --set-rpath "${stdenv.lib.makeLibraryPath [ curl zlib ]}" \ 91 - --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) \ 91 + --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 92 92 "$out/bin/cargo" 93 93 ''} 94 94
+1 -1
pkgs/development/compilers/sbcl/bootstrap.nix
··· 66 66 ''; 67 67 68 68 postFixup = stdenv.lib.optionalString (!stdenv.isArm && stdenv.isLinux) '' 69 - patchelf --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) $out/share/sbcl/sbcl 69 + patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $out/share/sbcl/sbcl 70 70 ''; 71 71 72 72 meta = with stdenv.lib; {
+1 -1
pkgs/development/compilers/tinycc/default.nix
··· 30 30 echo ${version} > VERSION 31 31 32 32 configureFlagsArray+=("--cc=cc") 33 - configureFlagsArray+=("--elfinterp=$(< $NIX_BINUTILS/nix-support/dynamic-linker)") 33 + configureFlagsArray+=("--elfinterp=$(< $NIX_CC/nix-support/dynamic-linker)") 34 34 configureFlagsArray+=("--crtprefix=${getLib stdenv.cc.libc}/lib") 35 35 configureFlagsArray+=("--sysincludepaths=${getDev stdenv.cc.libc}/include:{B}/include") 36 36 configureFlagsArray+=("--libpaths=${getLib stdenv.cc.libc}/lib")
+1 -1
pkgs/development/compilers/zulu/default.nix
··· 48 48 49 49 # set all the dynamic linkers 50 50 find $out -type f -perm -0100 \ 51 - -exec patchelf --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 51 + -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 52 52 --set-rpath "$rpath" {} \; 53 53 54 54 find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
+1 -1
pkgs/development/interpreters/dart/default.nix
··· 26 26 mkdir -p $out 27 27 cp -R * $out/ 28 28 echo $libPath 29 - patchelf --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 29 + patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 30 30 --set-rpath $libPath \ 31 31 $out/bin/dart 32 32 '';
+1 -1
pkgs/development/interpreters/rebol/default.nix
··· 21 21 configurePhase = '' 22 22 cp ${r3} make/r3-make 23 23 chmod 777 make/r3-make 24 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" ./make/r3-make 24 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./make/r3-make 25 25 cd make 26 26 perl -pi -e 's#-m32##g' makefile 27 27 perl -pi -e 's#sudo .*#echo#g' makefile
+1 -4
pkgs/development/libraries/libstdc++5/default.nix
··· 62 62 # being generated to make sure that they use our glibc. 63 63 EXTRA_FLAGS="-I$NIX_FIXINC_DUMMY $(cat $NIX_CC/nix-support/libc-cflags) -O2" 64 64 65 - extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir" 66 - extraLDFlags+=" $(cat $NIX_BINUTILS/nix-support/libc-ldflags)" 67 - extraLDFlags+=" $(cat $NIX_BINUTILS/nix-support/libc-ldflags-before)" 68 - 65 + extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)" 69 66 for i in $extraLDFlags; do 70 67 EXTRA_FLAGS="$EXTRA_FLAGS -Wl,$i" 71 68 done
+1 -1
pkgs/development/libraries/oracle-instantclient/default.nix
··· 67 67 done 68 68 69 69 for exe in $out/bin/sqlplus; do 70 - patchelf --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) \ 70 + patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 71 71 --force-rpath --set-rpath "$out/lib:${libaio}/lib" \ 72 72 $exe 73 73 done
+1 -1
pkgs/development/libraries/wtk/builder.sh
··· 22 22 rpath=$rpath${rpath:+:}$i/lib 23 23 done 24 24 find $out -type f -perm -0100 \ 25 - -exec patchelf --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" {} \; 25 + -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" {} \; 26 26 find $out -type f -perm -0100 \ 27 27 -exec patchelf --set-rpath "$rpath" {} \;
+1 -1
pkgs/development/misc/amdapp-sdk/default.nix
··· 87 87 } 88 88 89 89 # Create wrappers 90 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" $out/bin/clinfo 90 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/bin/clinfo 91 91 patchelf --set-rpath ${stdenv.cc.cc.lib}/lib64:${stdenv.cc.cc.lib}/lib $out/bin/clinfo 92 92 93 93 # Fix modes
+1 -1
pkgs/development/mobile/flashtool/default.nix
··· 36 36 ln -s ${libusb1.out}/lib/libusb-1.0.so.0 ./x10flasher_lib/linux/lib32/libusbx-1.0.so 37 37 38 38 chmod +x x10flasher_lib/unyaffs.linux.x86 x10flasher_lib/bin2elf x10flasher_lib/bin2sin 39 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" x10flasher_lib/unyaffs.linux.x86 39 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" x10flasher_lib/unyaffs.linux.x86 40 40 ln -sf unyaffs.linux.x86 x10flasher_lib/unyaffs.linux 41 41 42 42 ln -s swt32.jar x10flasher_lib/swtlin/swt.jar
+1 -1
pkgs/development/mobile/genymotion/default.nix
··· 40 40 41 41 fixupPhase = '' 42 42 patchInterpreter() { 43 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 43 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 44 44 "$out/libexec/genymotion/$1" 45 45 } 46 46
+1 -1
pkgs/development/tools/electron/default.nix
··· 31 31 fixupPhase 32 32 33 33 patchelf \ 34 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 34 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 35 35 --set-rpath "${atomEnv.libPath}:$out/lib/electron" \ 36 36 $out/lib/electron/electron 37 37
+1 -1
pkgs/development/tools/misc/saleae-logic/default.nix
··· 62 62 cp -r * "$out" 63 63 64 64 # Patch it 65 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" "$out/Logic" 65 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/Logic" 66 66 patchelf --set-rpath "${stdenv.cc.cc.lib}/lib:${stdenv.cc.cc.lib}/lib64:${libPath}:\$ORIGIN/Analyzers:\$ORIGIN" "$out/Logic" 67 67 68 68 # Build the LD_PRELOAD library that makes Logic work from a read-only directory
+2 -2
pkgs/development/tools/node-webkit/nw11.nix
··· 34 34 mkdir -p $out/share/node-webkit 35 35 cp -R * $out/share/node-webkit 36 36 37 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" $out/share/node-webkit/nw 38 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" $out/share/node-webkit/nwsnapshot 37 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/node-webkit/nw 38 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/node-webkit/nwsnapshot 39 39 40 40 ln -s ${systemd.lib}/lib/libudev.so $out/share/node-webkit/libudev.so.0 41 41
+2 -2
pkgs/development/tools/node-webkit/nw12.nix
··· 36 36 mkdir -p $out/share/nwjs 37 37 cp -R * $out/share/nwjs 38 38 39 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" $out/share/nwjs/nw 40 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" $out/share/nwjs/nwjc 39 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/nwjs/nw 40 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/nwjs/nwjc 41 41 42 42 ln -s ${systemd.lib}/lib/libudev.so $out/share/nwjs/libudev.so.0 43 43
+2 -2
pkgs/development/tools/node-webkit/nw9.nix
··· 32 32 mkdir -p $out/share/node-webkit 33 33 cp -R * $out/share/node-webkit 34 34 35 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" $out/share/node-webkit/nw 36 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" $out/share/node-webkit/nwsnapshot 35 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/node-webkit/nw 36 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/node-webkit/nwsnapshot 37 37 38 38 ln -s ${systemd.lib}/lib/libudev.so $out/share/node-webkit/libudev.so.0 39 39
+1 -1
pkgs/development/tools/phantomjs/default.nix
··· 34 34 35 35 buildPhase = lib.optionalString (!stdenv.isDarwin) '' 36 36 patchelf \ 37 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 37 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 38 38 --set-rpath "${stdenv.lib.makeLibraryPath [ freetype fontconfig stdenv.cc.cc stdenv.cc.cc openssl ]}" \ 39 39 bin/phantomjs 40 40 '';
+1 -1
pkgs/development/tools/sauce-connect/default.nix
··· 23 23 24 24 patchPhase = stdenv.lib.optionalString stdenv.isLinux '' 25 25 patchelf \ 26 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 26 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 27 27 --set-rpath "$out/lib:${makeLibraryPath [zlib]}" \ 28 28 bin/sc 29 29 '';
+1 -1
pkgs/development/tools/thrust/default.nix
··· 30 30 mkdir -p $out/bin 31 31 mkdir -p $out/libexec/thrust 32 32 unzip -d $out/libexec/thrust/ $src 33 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 33 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 34 34 $out/libexec/thrust/thrust_shell 35 35 wrapProgram $out/libexec/thrust/thrust_shell \ 36 36 --prefix "LD_LIBRARY_PATH" : "${thrustEnv}/lib:${thrustEnv}/lib64"
+2 -2
pkgs/development/tools/unity3d/default.nix
··· 99 99 if [[ "$ftype" =~ LSB\ .*dynamically\ linked ]]; then 100 100 if [[ "$ftype" =~ 32-bit ]]; then 101 101 rpath="${libPath32}" 102 - intp="$(cat $NIX_BINUTILS/nix-support/dynamic-linker-m32)" 102 + intp="$(cat $NIX_CC/nix-support/dynamic-linker-m32)" 103 103 else 104 104 rpath="${libPath64}" 105 - intp="$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" 105 + intp="$(cat $NIX_CC/nix-support/dynamic-linker)" 106 106 fi 107 107 108 108 oldRpath="$(patchelf --print-rpath "$1")"
+1 -1
pkgs/games/adom/default.nix
··· 36 36 done 37 37 38 38 ${patchelf}/bin/patchelf \ 39 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 39 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 40 40 --set-rpath "$out/lib:${lpath}" \ 41 41 $out/adom 42 42
+1 -1
pkgs/games/andyetitmoves/default.nix
··· 48 48 49 49 binName=${if commercialVersion then "AndYetItMoves" else "AndYetItMovesDemo"} 50 50 51 - patchelf --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) --set-rpath $fullPath $out/opt/andyetitmoves/lib/$binName 51 + patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) --set-rpath $fullPath $out/opt/andyetitmoves/lib/$binName 52 52 cat > $out/bin/$binName << EOF 53 53 #!/bin/sh 54 54 cd $out/opt/andyetitmoves
+1 -1
pkgs/games/factorio/default.nix
··· 82 82 cp -a data $out/share/factorio 83 83 cp -a bin/${arch.inTar}/factorio $out/bin/factorio 84 84 patchelf \ 85 - --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) \ 85 + --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 86 86 $out/bin/factorio 87 87 ''; 88 88
+1 -1
pkgs/games/oilrush/default.nix
··· 25 25 cd bin 26 26 for f in launcher_$arch libQtCoreUnigine_$arch.so.4 OilRush_$arch 27 27 do 28 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" $f 28 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $f 29 29 done 30 30 patchelf --set-rpath ${stdenv.cc.cc.lib}/lib64:${makeLibraryPath [ stdenv.cc.cc libX11 libXext libXrender fontconfig freetype ]}\ 31 31 launcher_$arch
+1 -1
pkgs/games/openarena/default.nix
··· 14 14 15 15 installPhase = let 16 16 gameDir = "$out/openarena-$version"; 17 - interpreter = "$(< \"$NIX_BINUTILS/nix-support/dynamic-linker\")"; 17 + interpreter = "$(< \"$NIX_CC/nix-support/dynamic-linker\")"; 18 18 libPath = stdenv.lib.makeLibraryPath [ SDL libogg libvorbis ]; 19 19 in '' 20 20 mkdir -pv $out/bin
+2 -2
pkgs/games/planetaryannihilation/default.nix
··· 33 33 34 34 ln -s ${systemd}/lib/libudev.so.1 $out/lib/libudev.so.0 35 35 36 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" "$out/PA" 37 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" --set-rpath "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc.lib xorg.libXdamage xorg.libXfixes gtk2 glib stdenv.glibc.out "$out" xorg.libXext pango udev xorg.libX11 xorg.libXcomposite alsaLib atk nspr fontconfig cairo pango nss freetype gnome3.gconf gdk_pixbuf xorg.libXrender ]}:{stdenv.cc.cc.lib}/lib64:${stdenv.glibc.out}/lib64" "$out/host/CoherentUI_Host" 36 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/PA" 37 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc.lib xorg.libXdamage xorg.libXfixes gtk2 glib stdenv.glibc.out "$out" xorg.libXext pango udev xorg.libX11 xorg.libXcomposite alsaLib atk nspr fontconfig cairo pango nss freetype gnome3.gconf gdk_pixbuf xorg.libXrender ]}:{stdenv.cc.cc.lib}/lib64:${stdenv.glibc.out}/lib64" "$out/host/CoherentUI_Host" 38 38 39 39 wrapProgram $out/PA --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc.lib stdenv.glibc.out xorg.libX11 xorg.libXcursor gtk2 glib curl "$out" ]}:${stdenv.cc.cc.lib}/lib64:${stdenv.glibc.out}/lib64" 40 40
+1 -1
pkgs/games/scrolls/default.nix
··· 35 35 cp -r ../Scrolls_Data "$out/opt/Scrolls/" 36 36 chmod +x "$out/opt/Scrolls/Scrolls" 37 37 38 - patchelf --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) \ 38 + patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 39 39 --set-rpath "$libPath" "$out/opt/Scrolls/Scrolls" 40 40 41 41 mkdir "$out/bin"
+1 -1
pkgs/games/sdlmame/default.nix
··· 22 22 23 23 installPhase = '' 24 24 patchelf \ 25 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 25 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 26 26 --set-rpath "${stdenv.lib.makeLibraryPath [ alsaLib qt48 SDL fontconfig freetype SDL_ttf xorg.libX11 xorg.libXinerama stdenv.cc.cc ]}" \ 27 27 share/sdlmame/sdlmame 28 28
+2 -2
pkgs/games/terraria-server/default.nix
··· 21 21 # Fix "/lib64/ld-linux-x86-64.so.2" like references in ELF executables. 22 22 find "$out" | while read filepath; do 23 23 if file "$filepath" | grep -q "ELF.*executable"; then 24 - echo "setting interpreter $(cat "$NIX_BINUTILS/nix-support/dynamic-linker") in $filepath" 25 - patchelf --set-interpreter "$(cat "$NIX_BINUTILS/nix-support/dynamic-linker")" "$filepath" 24 + echo "setting interpreter $(cat "$NIX_CC"/nix-support/dynamic-linker) in $filepath" 25 + patchelf --set-interpreter "$(cat "$NIX_CC"/nix-support/dynamic-linker)" "$filepath" 26 26 test $? -eq 0 || { echo "patchelf failed to process $filepath"; exit 1; } 27 27 fi 28 28 done
+2 -2
pkgs/games/vessel/default.nix
··· 35 35 echo @@@ 36 36 37 37 # if we call ld.so $(bin) we don't need to set the ELF interpreter, and save a patchelf step. 38 - LD_PRELOAD=./isatty.so $(cat $NIX_BINUTILS/nix-support/dynamic-linker) $src << IM_A_BOT 38 + LD_PRELOAD=./isatty.so $(cat $NIX_CC/nix-support/dynamic-linker) $src << IM_A_BOT 39 39 n 40 40 $out/libexec/strangeloop/vessel/ 41 41 IM_A_BOT ··· 47 47 # props to Ethan Lee (the Vessel porter) for understanding 48 48 # how $ORIGIN works in rpath. There is hope for humanity. 49 49 patchelf \ 50 - --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 50 + --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 51 51 --set-rpath $libPath:$out/libexec/strangeloop/vessel/x86/ \ 52 52 $out/libexec/strangeloop/vessel/x86/vessel.x86 53 53
+1 -1
pkgs/games/worldofgoo/default.nix
··· 53 53 mkdir -p $out/libexec/2dboy/WorldOfGoo/ 54 54 mkdir -p $out/bin 55 55 56 - patchelf --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" --set-rpath $libPath ./WorldOfGoo.bin64 56 + patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath $libPath ./WorldOfGoo.bin64 57 57 58 58 cp -r * $out/libexec/2dboy/WorldOfGoo/ 59 59
+1 -1
pkgs/misc/cups/drivers/kyocera/default.nix
··· 28 28 install -Dm755 English/rastertokpsl $out/lib/cups/filter/rastertokpsl 29 29 patchelf \ 30 30 --set-rpath ${libPath} \ 31 - --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) \ 31 + --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 32 32 $out/lib/cups/filter/rastertokpsl 33 33 34 34 mkdir -p $out/share/cups/model/Kyocera
+1 -1
pkgs/misc/cups/drivers/mfcl2700dnlpr/default.nix
··· 28 28 coreutils ghostscript gnugrep gnused which 29 29 ]} 30 30 31 - interpreter=$(cat $NIX_BINUTILS/nix-support/dynamic-linker) 31 + interpreter=$(cat $NIX_CC/nix-support/dynamic-linker) 32 32 patchelf --set-interpreter "$interpreter" $dir/inf/braddprinter 33 33 patchelf --set-interpreter "$interpreter" $dir/lpd/brprintconflsr3 34 34 patchelf --set-interpreter "$interpreter" $dir/lpd/rawtobr3
+1 -1
pkgs/misc/cups/drivers/samsung/4.00.39/builder.sh
··· 27 27 cd $out/lib/cups/filter 28 28 for i in $(ls); do 29 29 echo "Patching $i..." 30 - patchelf --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) $i || 30 + patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $i || 31 31 echo "Couldn't set interpreter!" 32 32 patchelf --set-rpath $cups/lib:$gcc/lib:$glibc/lib $i # This might not be necessary. 33 33 done
+1 -1
pkgs/misc/cups/drivers/samsung/4.01.17.nix
··· 43 43 echo "Patching $exe" 44 44 patchelf \ 45 45 --set-rpath ${libPath} \ 46 - --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) \ 46 + --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 47 47 $exe 48 48 done 49 49 unset GLOBIGNORE
+1 -1
pkgs/misc/cups/drivers/samsung/default.nix
··· 69 69 70 70 preFixup = '' 71 71 for bin in "$out/bin/"*; do 72 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" "$bin" 72 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$bin" 73 73 patchelf --set-rpath "$out/lib:${stdenv.lib.getLib cups}/lib" "$bin" 74 74 done 75 75
+1 -1
pkgs/misc/drivers/gutenprint/bin.nix
··· 53 53 $out/cups/lib/backend/{canon,epson} \ 54 54 $out/sbin/cups-genppd.5.0 \ 55 55 ; do 56 - patchelf --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 56 + patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 57 57 --set-rpath $libPath $p 58 58 done 59 59
+1 -1
pkgs/misc/drivers/sundtek/default.nix
··· 34 34 35 35 postFixup = '' 36 36 find $out -type f -exec \ 37 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" {} \ 37 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" {} \ 38 38 patchelf --set-rpath ${rpath} {} \; 39 39 ''; 40 40
+1 -1
pkgs/misc/foldingathome/default.nix
··· 23 23 installPhase = '' 24 24 BINFILES="fah6 mpiexec"; 25 25 for a in $BINFILES; do 26 - patchelf --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) $a 26 + patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $a 27 27 done 28 28 mkdir -p $out/bin 29 29 cp $BINFILES $out/bin
+6 -9
pkgs/os-specific/darwin/binutils/default.nix
··· 2 2 , hostPlatform, targetPlatform 3 3 }: 4 4 5 - # despite the name, binutils-raw is in fact wrapped. 6 - let binutils-unwrapped = binutils-raw.binutils; in 7 - 8 5 # Make sure both underlying packages claim to have prepended their binaries 9 6 # with the same prefix. 10 - assert binutils-unwrapped.prefix == cctools.prefix; 7 + assert binutils-raw.prefix == cctools.prefix; 11 8 12 9 let 13 - inherit (binutils-unwrapped) prefix; 10 + inherit (binutils-raw) prefix; 14 11 cmds = [ 15 12 "ar" "ranlib" "as" "dsymutil" "install_name_tool" 16 13 "ld" "strip" "otool" "lipo" "nm" "strings" "size" ··· 23 20 buildCommand = '' 24 21 mkdir -p $out/bin $out/include 25 22 26 - ln -s ${binutils-unwrapped.out}/bin/${prefix}c++filt $out/bin/${prefix}c++filt 23 + ln -s ${binutils-raw.out}/bin/${prefix}c++filt $out/bin/${prefix}c++filt 27 24 28 25 # We specifically need: 29 26 # - ld: binutils doesn't provide it on darwin ··· 40 37 ln -sf "${cctools}/bin/$i" "$out/bin/$i" 41 38 done 42 39 43 - for i in ${binutils-unwrapped.dev or binutils-unwrapped.out}/include/*.h; do 40 + for i in ${binutils-raw.dev or binutils-raw.out}/include/*.h; do 44 41 ln -s "$i" "$out/include/$(basename $i)" 45 42 done 46 43 ··· 49 46 done 50 47 51 48 # FIXME: this will give us incorrect man pages for bits of cctools 52 - ln -s ${binutils-unwrapped.out}/share $out/share 53 - ln -s ${binutils-unwrapped.out}/lib $out/lib 49 + ln -s ${binutils-raw.out}/share $out/share 50 + ln -s ${binutils-raw.out}/lib $out/lib 54 51 55 52 ln -s ${cctools}/libexec $out/libexec 56 53 '';
+1 -1
pkgs/os-specific/linux/amdgpu-pro/default.nix
··· 131 131 "install -Dm444 usr/src/amdgpu-pro-${build}/${m}.xz $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/gpu/drm/${m}.xz\n") modules) 132 132 + '' 133 133 mv $out/etc/vulkan $out/share 134 - interpreter="$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" 134 + interpreter="$(cat $NIX_CC/nix-support/dynamic-linker)" 135 135 libPath="$out/lib:$out/lib/gbm:$depLibPath" 136 136 '' + optionalString (!stdenv.is64bit) '' 137 137 for prog in clinfo modetest vbltest kms-universal-planes kms-steal-crtc modeprint amdgpu_test kmstest proptest; do
+1 -1
pkgs/os-specific/linux/dmtcp/default.nix
··· 16 16 postPatch = '' 17 17 substituteInPlace configure \ 18 18 --replace '#define ELF_INTERPRETER "$interp"' \ 19 - "#define ELF_INTERPRETER \"$(cat $NIX_BINUTILS/nix-support/dynamic-linker)\"" 19 + "#define ELF_INTERPRETER \"$(cat $NIX_CC/nix-support/dynamic-linker)\"" 20 20 ''; 21 21 22 22 preConfigure = ''
+1 -1
pkgs/os-specific/linux/firmware/raspberrypi/default.nix
··· 21 21 22 22 for f in $out/bin/*; do 23 23 if isELF "$f"; then 24 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" "$f" 24 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$f" 25 25 patchelf --set-rpath "$out/lib" "$f" 26 26 fi 27 27 done
+1 -1
pkgs/os-specific/linux/nvidia-x11/builder-legacy173.sh
··· 81 81 82 82 for i in nvidia-settings nvidia-xconfig; do 83 83 cp usr/bin/$i $out/bin/$i 84 - patchelf --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 84 + patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 85 85 --set-rpath $out/lib:$programPath:$glPath $out/bin/$i 86 86 done 87 87
+1 -1
pkgs/os-specific/linux/nvidia-x11/builder.sh
··· 111 111 for i in nvidia-cuda-mps-control nvidia-cuda-mps-server nvidia-smi nvidia-debugdump; do 112 112 if [ -e "$i" ]; then 113 113 install -Dm755 $i $bin/bin/$i 114 - patchelf --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 114 + patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 115 115 --set-rpath $out/lib:$libPath $bin/bin/$i 116 116 fi 117 117 done
+1 -1
pkgs/os-specific/linux/prl-tools/default.nix
··· 122 122 123 123 for i in $out/bin/* $out/sbin/*; do 124 124 patchelf \ 125 - --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 125 + --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 126 126 --set-rpath "$out/lib:$libPath" \ 127 127 $i 128 128 done
+1 -1
pkgs/servers/mattermost/default.nix
··· 16 16 ''; 17 17 18 18 postFixup = '' 19 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" $out/bin/platform 19 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/bin/platform 20 20 ''; 21 21 22 22 meta = with stdenv.lib; {
+3 -3
pkgs/servers/meteor/default.nix
··· 39 39 patch -p1 < ${./main.patch} 40 40 popd 41 41 substituteInPlace $out/tools/cli/main.js \ 42 - --replace "@INTERPRETER@" "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 42 + --replace "@INTERPRETER@" "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 43 43 --replace "@RPATH@" "${lib.makeLibraryPath [ stdenv.cc.cc zlib ]}" \ 44 44 --replace "@PATCHELF@" "${patchelf}/bin/patchelf" 45 45 46 46 # Patch node. 47 47 node=$devBundle/bin/node 48 48 patchelf \ 49 - --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) \ 49 + --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 50 50 --set-rpath "$(patchelf --print-rpath $node):${stdenv.cc.cc.lib}/lib" \ 51 51 $node 52 52 53 53 # Patch mongo. 54 54 for p in $devBundle/mongodb/bin/mongo{,d}; do 55 55 patchelf \ 56 - --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) \ 56 + --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 57 57 --set-rpath "$(patchelf --print-rpath $p):${lib.makeLibraryPath [ stdenv.cc.cc zlib ]}" \ 58 58 $p 59 59 done
+1 -1
pkgs/servers/monitoring/newrelic-sysmond/default.nix
··· 12 12 installPhase = '' 13 13 mkdir -p $out/bin 14 14 install -v -m755 daemon/nrsysmond.x64 $out/bin/nrsysmond 15 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 15 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 16 16 $out/bin/nrsysmond 17 17 ''; 18 18
+1 -1
pkgs/servers/sql/oracle-xe/default.nix
··· 54 54 \( -name '*.sh' \ 55 55 -o -path "$basedir/bin/*" \ 56 56 \) -print -exec "${patchelf}/bin/patchelf" \ 57 - --interpreter "$(cat "$NIX_BINUTILS/nix-support/dynamic-linker")" \ 57 + --interpreter "$(cat "$NIX_CC/nix-support/dynamic-linker")" \ 58 58 --set-rpath "${libs}:$out/libexec/oracle/lib" \ 59 59 --force-rpath '{}' \; 60 60 '';
+20 -35
pkgs/stdenv/darwin/default.nix
··· 63 63 extraBuildInputs, 64 64 allowedRequisites ? null}: 65 65 let 66 - buildPackages = lib.optionalAttrs (last ? stdenv) { 67 - inherit (last) stdenv; 68 - }; 69 - 70 - coreutils = { name = "coreutils-9.9.9"; outPath = bootstrapTools; }; 71 - gnugrep = { name = "gnugrep-9.9.9"; outPath = bootstrapTools; }; 72 - 73 - binutils = import ../../build-support/binutils-wrapper { 74 - inherit shell; 75 - inherit (last) stdenv; 76 - 77 - nativeTools = false; 78 - nativeLibc = false; 79 - inherit buildPackages coreutils gnugrep; 80 - libc = last.pkgs.darwin.Libsystem; 81 - binutils = { name = "binutils-9.9.9"; outPath = bootstrapTools; }; 82 - }; 83 - 84 - cc = if isNull last then "/dev/null" else import ../../build-support/cc-wrapper { 85 - inherit shell; 86 - inherit (last) stdenv; 87 - 88 - nativeTools = false; 89 - nativeLibc = false; 90 - inherit buildPackages coreutils gnugrep binutils; 91 - libc = last.pkgs.darwin.Libsystem; 92 - isClang = true; 93 - cc = { name = "clang-9.9.9"; outPath = bootstrapTools; }; 94 - }; 95 - 96 66 thisStdenv = import ../generic { 97 67 inherit config shell extraNativeBuildInputs extraBuildInputs; 98 68 allowedRequisites = if allowedRequisites == null then null else allowedRequisites ++ [ 99 - cc.expand-response-params cc.binutils 69 + thisStdenv.cc.expand-response-params 100 70 ]; 101 71 102 72 name = "stdenv-darwin-boot-${toString step}"; ··· 105 75 hostPlatform = localSystem; 106 76 targetPlatform = localSystem; 107 77 108 - inherit cc; 78 + cc = if isNull last then "/dev/null" else import ../../build-support/cc-wrapper { 79 + inherit shell; 80 + inherit (last) stdenv; 81 + 82 + nativeTools = false; 83 + nativeLibc = false; 84 + buildPackages = lib.optionalAttrs (last ? stdenv) { 85 + inherit (last) stdenv; 86 + }; 87 + libc = last.pkgs.darwin.Libsystem; 88 + isClang = true; 89 + cc = { name = "clang-9.9.9"; outPath = bootstrapTools; }; 90 + binutils = { name = "binutils-9.9.9"; outPath = bootstrapTools; }; 91 + coreutils = { name = "coreutils-9.9.9"; outPath = bootstrapTools; }; 92 + gnugrep = { name = "gnugrep-9.9.9"; outPath = bootstrapTools; }; 93 + }; 109 94 110 - preHook = lib.optionalString (shell == "${bootstrapTools}/bin/bash") '' 95 + preHook = stage0.stdenv.lib.optionalString (shell == "${bootstrapTools}/bin/bash") '' 111 96 # Don't patch #!/interpreter because it leads to retained 112 97 # dependencies on the bootstrapTools in the final stdenv. 113 98 dontPatchShebangs=1 ··· 365 350 xz.out xz.bin libcxx libcxxabi gmp.out gnumake findutils bzip2.out 366 351 bzip2.bin llvmPackages.llvm llvmPackages.llvm.lib zlib.out zlib.dev libffi.out coreutils ed diffutils gnutar 367 352 gzip ncurses.out ncurses.dev ncurses.man gnused bash gawk 368 - gnugrep llvmPackages.clang-unwrapped patch pcre.out gettext 369 - binutils-raw.binutils.out binutils-raw.binutils.dev binutils binutils.binutils 353 + gnugrep llvmPackages.clang-unwrapped patch pcre.out binutils-raw.out 354 + binutils-raw.dev binutils gettext 370 355 cc.expand-response-params 371 356 ]) ++ (with pkgs.darwin; [ 372 357 dyld Libsystem CF cctools ICU libiconv locale
+6 -29
pkgs/stdenv/linux/default.nix
··· 143 143 ''; 144 144 }; 145 145 gcc-unwrapped = bootstrapTools; 146 - binutils = import ../../build-support/binutils-wrapper { 147 - nativeTools = false; 148 - nativeLibc = false; 149 - buildPackages = { }; 150 - libc = self.glibc; 151 - inherit (self) coreutils gnugrep; 152 - binutils = bootstrapTools; 153 - name = "bootstrap-binutils-wrapper"; 154 - stdenv = self.stdenv; 155 - }; 146 + binutils = bootstrapTools; 156 147 coreutils = bootstrapTools; 157 148 gnugrep = bootstrapTools; 158 149 }; ··· 174 165 175 166 # Rebuild binutils to use from stage2 onwards. 176 167 overrides = self: super: { 177 - binutils = super.binutils_nogold; 168 + binutils = super.binutils.override { gold = false; }; 178 169 inherit (prevStage) 179 170 ccWrapperStdenv 180 171 glibc gcc-unwrapped coreutils gnugrep; ··· 197 188 overrides = self: super: { 198 189 inherit (prevStage) 199 190 ccWrapperStdenv 200 - gcc-unwrapped coreutils gnugrep 191 + binutils gcc-unwrapped coreutils gnugrep 201 192 perl paxctl gnum4 bison; 202 193 # This also contains the full, dynamically linked, final Glibc. 203 - binutils = prevStage.binutils.override { 204 - # Rewrap the binutils with the new glibc, so both the next 205 - # stage's wrappers use it. 206 - libc = self.glibc; 207 - }; 208 194 }; 209 195 }) 210 196 ··· 249 235 # other purposes (binutils and top-level pkgs) too. 250 236 inherit (prevStage) gettext gnum4 bison gmp perl glibc zlib linuxHeaders; 251 237 252 - binutils = super.binutils.override { 253 - # Don't use stdenv's shell but our own 254 - shell = self.bash + "/bin/bash"; 255 - # Build expand-response-params with last stage like below 256 - buildPackages = { 257 - inherit (prevStage) stdenv; 258 - }; 259 - }; 260 - 261 238 gcc = lib.makeOverridable (import ../../build-support/cc-wrapper) { 262 239 nativeTools = false; 263 240 nativeLibc = false; ··· 322 299 allowedRequisites = with prevStage; with lib; 323 300 # Simple executable tools 324 301 concatMap (p: [ (getBin p) (getLib p) ]) 325 - [ gzip bzip2 xz bash binutils.binutils coreutils diffutils findutils 326 - gawk gnumake gnused gnutar gnugrep gnupatch patchelf ed paxctl 302 + [ gzip bzip2 xz bash binutils coreutils diffutils findutils gawk 303 + gnumake gnused gnutar gnugrep gnupatch patchelf ed paxctl 327 304 ] 328 305 # Library dependencies 329 306 ++ map getLib ( ··· 333 310 # More complicated cases 334 311 ++ [ 335 312 glibc.out glibc.dev glibc.bin/*propagated from .dev*/ linuxHeaders 336 - binutils gcc gcc.cc gcc.cc.lib gcc.expand-response-params 313 + gcc gcc.cc gcc.cc.lib gcc.expand-response-params 337 314 ] 338 315 ++ lib.optionals (system == "aarch64-linux") 339 316 [ prevStage.updateAutotoolsGnuConfigScriptsHook prevStage.gnu-config ];
+1 -1
pkgs/tools/filesystems/yandex-disk/default.nix
··· 42 42 $out/etc/bash_completion.d/yandex-disk-completion.bash 43 43 44 44 ${patchelf}/bin/patchelf \ 45 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 45 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 46 46 --set-rpath "${zlib.out}/lib:${p.gcclib}" \ 47 47 $out/bin/yandex-disk 48 48 '';
+1 -1
pkgs/tools/misc/megacli/default.nix
··· 22 22 cd $out 23 23 unzip ${src} 24 24 rpmextract linux/MegaCli-8.07.07-1.noarch.rpm 25 - ${patchelf}/bin/patchelf --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" --set-rpath ${libPath}:$out/opt/lsi/3rdpartylibs/x86_64:$out/opt/lsi/3rdpartylibs:${stdenv.cc.cc.lib}/lib64:${stdenv.cc.cc.lib}/lib opt/MegaRAID/MegaCli/MegaCli64 25 + ${patchelf}/bin/patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath ${libPath}:$out/opt/lsi/3rdpartylibs/x86_64:$out/opt/lsi/3rdpartylibs:${stdenv.cc.cc.lib}/lib64:${stdenv.cc.cc.lib}/lib opt/MegaRAID/MegaCli/MegaCli64 26 26 wrapProgram $out/opt/MegaRAID/MegaCli/MegaCli64 --set LD_LIBRARY_PATH $out/opt/lsi/3rdpartylibs/x86_64 27 27 ln -s $out/opt/MegaRAID/MegaCli/MegaCli64 $out/bin/MegaCli64 28 28 eval fixupPhase
+1 -1
pkgs/tools/misc/ocz-ssd-guru/default.nix
··· 32 32 cp ${system}/SSDGuru $out/bin/ 33 33 rm -rf linux{32,64} 34 34 patchelf \ 35 - --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 35 + --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 36 36 --set-rpath $libPath:$out \ 37 37 $out/bin/SSDGuru 38 38
+1 -1
pkgs/tools/misc/sam-ba/default.nix
··· 25 25 mkdir -p "$out/bin/" \ 26 26 "$out/opt/sam-ba/" 27 27 cp -a . "$out/opt/sam-ba/" 28 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" "$out/opt/sam-ba/sam-ba${maybe64}" 28 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/opt/sam-ba/sam-ba${maybe64}" 29 29 cat > "$out/bin/sam-ba" << EOF 30 30 export LD_LIBRARY_PATH="${libPath}" 31 31 exec "$out/opt/sam-ba/sam-ba${maybe64}"
+1 -1
pkgs/tools/misc/staruml/default.nix
··· 35 35 mv opt/staruml $out/bin 36 36 37 37 ${patchelf}/bin/patchelf \ 38 - --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" \ 38 + --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 39 39 $out/bin/StarUML 40 40 41 41 mkdir -p $out/lib
+1 -1
pkgs/tools/misc/xflux/default.nix
··· 22 22 cp xflux "$out/bin" 23 23 ''; 24 24 postFixup = '' 25 - patchelf --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) --set-rpath "$libPath" "$out/bin/xflux" 25 + patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) --set-rpath "$libPath" "$out/bin/xflux" 26 26 ''; 27 27 meta = { 28 28 description = "Adjusts your screen to emit warmer light at night";
+2 -7
pkgs/tools/package-management/rpm/default.nix
··· 13 13 14 14 buildInputs = [ cpio zlib bzip2 file libarchive nspr nss db xz python lua pkgconfig autoreconfHook ]; 15 15 16 - # rpm/rpmlib.h includes popt.h, and then the pkg-config file mentions these as 17 - # linkage requirements 18 - # 19 - # Binutils.binutils for headers 20 - propagatedBuildInputs = [ 21 - popt elfutils nss db bzip2 libarchive binutils binutils.binutils 22 - ]; 16 + # rpm/rpmlib.h includes popt.h, and then the pkg-config file mentions these as linkage requirements 17 + propagatedBuildInputs = [ popt elfutils nss db bzip2 libarchive binutils ]; 23 18 24 19 NIX_CFLAGS_COMPILE = "-I${nspr.dev}/include/nspr -I${nss.dev}/include/nss"; 25 20
+1 -1
pkgs/tools/security/encryptr/default.nix
··· 38 38 cp -v lib* $out/lib 39 39 ln -sv ${systemd.lib}/lib/libudev.so.1 $out/lib/libudev.so.0 40 40 41 - patchelf --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) \ 41 + patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 42 42 --set-rpath $out/lib:${rpath} \ 43 43 $out/bin/encryptr 44 44 '';
+1 -1
pkgs/tools/security/enpass/default.nix
··· 73 73 $out/share/applications/enpass.desktop 74 74 75 75 for i in $out/bin/{Enpass,EnpassHelper/EnpassHelper}; do 76 - patchelf --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) $i 76 + patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $i 77 77 done 78 78 79 79 # The helper's sha256 sum must match, hence the use of libredirect.
+1 -1
pkgs/tools/security/fprot/default.nix
··· 21 21 cp f-prot.conf.default $out/opt/f-prot/f-prot.conf 22 22 ln -s $out/opt/f-prot/fpupdate $out/bin/fpupdate 23 23 24 - patchelf --interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" $out/opt/f-prot/fpupdate 24 + patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/opt/f-prot/fpupdate 25 25 26 26 mkdir -p $out/share/man/ 27 27 mkdir -p $out/share/man/man1
+1 -1
pkgs/tools/security/gorilla-bin/default.nix
··· 19 19 ''; 20 20 21 21 installPhase = let 22 - interpreter = "$(< \"$NIX_BINUTILS/nix-support/dynamic-linker\")"; 22 + interpreter = "$(< \"$NIX_CC/nix-support/dynamic-linker\")"; 23 23 libPath = stdenv.lib.makeLibraryPath [ libXft libX11 freetype fontconfig libXrender libXScrnSaver libXext ]; 24 24 in '' 25 25 mkdir -p $out/opt/password-gorilla
+1 -1
pkgs/tools/security/keybase-gui/default.nix
··· 80 80 chmod +x $out/bin/keybase-gui 81 81 ''; 82 82 postFixup = '' 83 - patchelf --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) --set-rpath "${libPath}:\$ORIGIN" "$out/share/keybase/Keybase" 83 + patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) --set-rpath "${libPath}:\$ORIGIN" "$out/share/keybase/Keybase" 84 84 ''; 85 85 86 86 meta = with stdenv.lib; {
+1 -1
pkgs/tools/text/xidel/default.nix
··· 34 34 installPhase = '' 35 35 mkdir -p "$out/bin" 36 36 cp -a usr/* "$out/" 37 - patchelf --set-interpreter "$(cat $NIX_BINUTILS/nix-support/dynamic-linker)" "$out/bin/xidel" 37 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/bin/xidel" 38 38 ''; 39 39 40 40 meta = with stdenv.lib; {
+10 -28
pkgs/top-level/all-packages.nix
··· 1809 1809 emscripten = callPackage ../development/compilers/emscripten { }; 1810 1810 1811 1811 emscriptenfastcomp-unwrapped = callPackage ../development/compilers/emscripten-fastcomp { }; 1812 - emscriptenfastcomp-wrapped = wrapCCWith stdenv.cc.libc stdenv.cc.binutils '' 1812 + emscriptenfastcomp-wrapped = wrapCCWith stdenv.cc.libc '' 1813 1813 # hardening flags break WASM support 1814 1814 cat > $out/nix-support/add-hardening.sh 1815 1815 '' emscriptenfastcomp-unwrapped; ··· 5259 5259 5260 5260 clang-sierraHack = clang.override { 5261 5261 name = "clang-wrapper-with-reexport-hack"; 5262 - binutils = clang.binutils.override { 5263 - useMacosReexportHack = true; 5264 - }; 5262 + useMacosReexportHack = true; 5265 5263 }; 5266 5264 5267 5265 clang_4 = llvmPackages_4.clang; ··· 5353 5351 extraBuildCommands = '' 5354 5352 echo "dontMoveLib64=1" >> $out/nix-support/setup-hook 5355 5353 ''; 5356 - # Binutils with glibc multi 5357 - binutils = cc.binutils.override { 5358 - libc = glibc_multi; 5359 - }; 5360 - in wrapCCWith glibc_multi binutils extraBuildCommands (cc.cc.override { 5361 - stdenv = overrideCC stdenv (wrapCCWith glibc_multi binutils "" cc.cc); 5354 + in wrapCCWith glibc_multi extraBuildCommands (cc.cc.override { 5355 + stdenv = overrideCC stdenv (wrapCCWith glibc_multi "" cc.cc); 5362 5356 profiledCompiler = false; 5363 5357 enableMultilib = true; 5364 5358 })) ··· 6160 6154 6161 6155 wla-dx = callPackage ../development/compilers/wla-dx { }; 6162 6156 6163 - wrapCCWith = libc: binutils: extraBuildCommands: baseCC: ccWrapperFun { 6157 + wrapCCWith = libc: extraBuildCommands: baseCC: ccWrapperFun { 6164 6158 nativeTools = stdenv.cc.nativeTools or false; 6165 6159 nativeLibc = stdenv.cc.nativeLibc or false; 6166 6160 nativePrefix = stdenv.cc.nativePrefix or ""; 6167 6161 cc = baseCC; 6168 6162 isGNU = baseCC.isGNU or false; 6169 6163 isClang = baseCC.isClang or false; 6170 - inherit libc binutils extraBuildCommands; 6164 + inherit libc extraBuildCommands; 6171 6165 }; 6172 6166 6173 6167 ccWrapperFun = callPackage ../build-support/cc-wrapper; 6174 - binutilsWrapperFun = callPackage ../build-support/binutils-wrapper; 6175 6168 6176 - wrapCC = wrapCCWith stdenv.cc.libc stdenv.cc.binutils ""; 6169 + wrapCC = wrapCCWith stdenv.cc.libc ""; 6177 6170 # legacy version, used for gnat bootstrapping 6178 6171 wrapGCC-old = baseGCC: callPackage ../build-support/gcc-wrapper-old { 6179 6172 nativeTools = stdenv.cc.nativeTools or false; ··· 6196 6189 6197 6190 inherit cc binutils libc shell name; 6198 6191 }; 6199 - 6200 - wrapBinutils = baseBinutils: binutilsWrapperFun { 6201 - nativeTools = stdenv.cc.nativeTools or false; 6202 - nativeLibc = stdenv.cc.nativeLibc or false; 6203 - nativePrefix = stdenv.cc.nativePrefix or ""; 6204 - libc = stdenv.cc.libc; 6205 - binutils = baseBinutils; 6206 - extraBuildCommands = ""; 6207 - }; 6208 6192 6209 6193 # prolog 6210 6194 yap = callPackage ../development/compilers/yap { }; ··· 6766 6750 then darwin.binutils 6767 6751 else binutils-raw; 6768 6752 6769 - binutils-raw = wrapBinutils (callPackage ../development/tools/misc/binutils { 6753 + binutils-raw = callPackage ../development/tools/misc/binutils { 6770 6754 # FHS sys dirs presumably only have stuff for the build platform 6771 6755 noSysDirs = (targetPlatform != buildPlatform) || noSysDirs; 6772 - }); 6756 + }; 6773 6757 6774 6758 binutils_nogold = lowPrio (binutils-raw.override { 6775 - binutils = binutils-raw.binutils.override { 6776 - gold = false; 6777 - }; 6759 + gold = false; 6778 6760 }); 6779 6761 6780 6762 bison2 = callPackage ../development/tools/parsing/bison/2.x.nix { };
+2 -2
pkgs/top-level/darwin-packages.nix
··· 10 10 11 11 apple_sdk = callPackage ../os-specific/darwin/apple-sdk { }; 12 12 13 - binutils = pkgs.wrapBinutils (callPackage ../os-specific/darwin/binutils { 13 + binutils = callPackage ../os-specific/darwin/binutils { 14 14 inherit (darwin) cctools; 15 - }); 15 + }; 16 16 17 17 cctools = callPackage ../os-specific/darwin/cctools/port.nix { 18 18 inherit (darwin) libobjc maloader;
+1 -1
pkgs/top-level/haxe-packages.nix
··· 67 67 postFixup = '' 68 68 for f in $out/lib/haxe/${withCommas libname}/${withCommas version}/{,project/libs/nekoapi/}bin/Linux{,64}/*; do 69 69 chmod +w "$f" 70 - patchelf --set-interpreter $(cat $NIX_BINUTILS/nix-support/dynamic-linker) "$f" || true 70 + patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) "$f" || true 71 71 patchelf --set-rpath ${ stdenv.lib.makeLibraryPath [ stdenv.cc.cc ] } "$f" || true 72 72 done 73 73 '';