diff --git a/pkgs/applications/editors/ed/default.nix b/pkgs/applications/editors/ed/default.nix index 9d5848f02637..ee5afe500efe 100644 --- a/pkgs/applications/editors/ed/default.nix +++ b/pkgs/applications/editors/ed/default.nix @@ -29,8 +29,8 @@ stdenv.mkDerivation rec { installFlags = [ "DESTDIR=$(out)" ]; configureFlags = [ - "--exec-prefix=${stdenv.cc.prefix}" - "CC=${stdenv.cc.prefix}cc" + "--exec-prefix=${stdenv.cc.targetPrefix}" + "CC=${stdenv.cc.targetPrefix}cc" ]; meta = { diff --git a/pkgs/applications/video/omxplayer/default.nix b/pkgs/applications/video/omxplayer/default.nix index 29345f7548d5..825bfe7955a8 100644 --- a/pkgs/applications/video/omxplayer/default.nix +++ b/pkgs/applications/video/omxplayer/default.nix @@ -49,7 +49,7 @@ let crossAttrs = { configurePlatforms = []; configureFlags = configureFlags ++ [ - "--cross-prefix=${stdenv.cc.prefix}" + "--cross-prefix=${stdenv.cc.targetPrefix}" "--enable-cross-compile" "--target_os=linux" "--arch=${hostPlatform.arch}" diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 8d8b8a42fe9f..b79697b33f0c 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -32,8 +32,8 @@ let # # TODO(@Ericson2314) Make unconditional, or optional but always true by # default. - prefix = stdenv.lib.optionalString (targetPlatform != hostPlatform) - (targetPlatform.config + "-"); + targetPrefix = stdenv.lib.optionalString (targetPlatform != hostPlatform) + (targetPlatform.config + "-"); ccVersion = (builtins.parseDrvName cc.name).version; ccName = (builtins.parseDrvName cc.name).name; @@ -81,7 +81,7 @@ let in stdenv.mkDerivation { - name = prefix + name = targetPrefix + (if name != "" then name else "${ccName}-wrapper") + (stdenv.lib.optionalString (cc != null && ccVersion != "") "-${ccVersion}"); @@ -91,8 +91,7 @@ stdenv.mkDerivation { shell = getBin shell + shell.shellPath or ""; gnugrep_bin = if nativeTools then "" else gnugrep; - binPrefix = prefix; - inherit infixSalt; + inherit targetPrefix infixSalt; outputs = [ "out" "man" ]; @@ -102,8 +101,7 @@ stdenv.mkDerivation { # Binutils, and Apple's "cctools"; "binutils" as an attempt to find an # unused middle-ground name that evokes both. bintools = binutils_bin; - inherit libc nativeTools nativeLibc nativePrefix isGNU isClang default_cxx_stdlib_compile - prefix; + inherit libc nativeTools nativeLibc nativePrefix isGNU isClang default_cxx_stdlib_compile; emacsBufferSetup = pkgs: '' ; We should handle propagation here too @@ -154,7 +152,7 @@ stdenv.mkDerivation { + optionalString (targetPlatform.isSunOS && nativePrefix != "") '' # Solaris needs an additional ld wrapper. ldPath="${nativePrefix}/bin" - exec="$ldPath/${prefix}ld" + exec="$ldPath/${targetPrefix}ld" wrap ld-solaris ${./ld-solaris-wrapper.sh} '') @@ -162,83 +160,83 @@ stdenv.mkDerivation { # Create a symlink to as (the assembler). This is useful when a # cc-wrapper is installed in a user environment, as it ensures that # the right assembler is called. - if [ -e $ldPath/${prefix}as ]; then - ln -s $ldPath/${prefix}as $out/bin/${prefix}as + if [ -e $ldPath/${targetPrefix}as ]; then + ln -s $ldPath/${targetPrefix}as $out/bin/${targetPrefix}as fi '' + (if !useMacosReexportHack then '' - wrap ${prefix}ld ${./ld-wrapper.sh} ''${ld:-$ldPath/${prefix}ld} + wrap ${targetPrefix}ld ${./ld-wrapper.sh} ''${ld:-$ldPath/${targetPrefix}ld} '' else '' - ldInner="${prefix}ld-reexport-delegate" - wrap "$ldInner" ${./macos-sierra-reexport-hack.bash} ''${ld:-$ldPath/${prefix}ld} - wrap "${prefix}ld" ${./ld-wrapper.sh} "$out/bin/$ldInner" + ldInner="${targetPrefix}ld-reexport-delegate" + wrap "$ldInner" ${./macos-sierra-reexport-hack.bash} ''${ld:-$ldPath/${targetPrefix}ld} + wrap "${targetPrefix}ld" ${./ld-wrapper.sh} "$out/bin/$ldInner" unset ldInner '') + '' - if [ -e ${binutils_bin}/bin/${prefix}ld.gold ]; then - wrap ${prefix}ld.gold ${./ld-wrapper.sh} ${binutils_bin}/bin/${prefix}ld.gold + if [ -e ${binutils_bin}/bin/${targetPrefix}ld.gold ]; then + wrap ${targetPrefix}ld.gold ${./ld-wrapper.sh} ${binutils_bin}/bin/${targetPrefix}ld.gold fi if [ -e ${binutils_bin}/bin/ld.bfd ]; then - wrap ${prefix}ld.bfd ${./ld-wrapper.sh} ${binutils_bin}/bin/${prefix}ld.bfd + wrap ${targetPrefix}ld.bfd ${./ld-wrapper.sh} ${binutils_bin}/bin/${targetPrefix}ld.bfd fi # We export environment variables pointing to the wrapped nonstandard # cmds, lest some lousy configure script use those to guess compiler # version. - export named_cc=${prefix}cc - export named_cxx=${prefix}c++ + export named_cc=${targetPrefix}cc + export named_cxx=${targetPrefix}c++ export default_cxx_stdlib_compile="${default_cxx_stdlib_compile}" - if [ -e $ccPath/${prefix}gcc ]; then - wrap ${prefix}gcc ${./cc-wrapper.sh} $ccPath/${prefix}gcc - ln -s ${prefix}gcc $out/bin/${prefix}cc - export named_cc=${prefix}gcc - export named_cxx=${prefix}g++ + if [ -e $ccPath/${targetPrefix}gcc ]; then + wrap ${targetPrefix}gcc ${./cc-wrapper.sh} $ccPath/${targetPrefix}gcc + ln -s ${targetPrefix}gcc $out/bin/${targetPrefix}cc + export named_cc=${targetPrefix}gcc + export named_cxx=${targetPrefix}g++ elif [ -e $ccPath/clang ]; then - wrap ${prefix}clang ${./cc-wrapper.sh} $ccPath/clang - ln -s ${prefix}clang $out/bin/${prefix}cc - export named_cc=${prefix}clang - export named_cxx=${prefix}clang++ + wrap ${targetPrefix}clang ${./cc-wrapper.sh} $ccPath/clang + ln -s ${targetPrefix}clang $out/bin/${targetPrefix}cc + export named_cc=${targetPrefix}clang + export named_cxx=${targetPrefix}clang++ fi - if [ -e $ccPath/${prefix}g++ ]; then - wrap ${prefix}g++ ${./cc-wrapper.sh} $ccPath/${prefix}g++ - ln -s ${prefix}g++ $out/bin/${prefix}c++ + if [ -e $ccPath/${targetPrefix}g++ ]; then + wrap ${targetPrefix}g++ ${./cc-wrapper.sh} $ccPath/${targetPrefix}g++ + ln -s ${targetPrefix}g++ $out/bin/${targetPrefix}c++ elif [ -e $ccPath/clang++ ]; then - wrap ${prefix}clang++ ${./cc-wrapper.sh} $ccPath/clang++ - ln -s ${prefix}clang++ $out/bin/${prefix}c++ + wrap ${targetPrefix}clang++ ${./cc-wrapper.sh} $ccPath/clang++ + ln -s ${targetPrefix}clang++ $out/bin/${targetPrefix}c++ fi if [ -e $ccPath/cpp ]; then - wrap ${prefix}cpp ${./cc-wrapper.sh} $ccPath/cpp + wrap ${targetPrefix}cpp ${./cc-wrapper.sh} $ccPath/cpp fi '' + optionalString cc.langFortran or false '' - wrap ${prefix}gfortran ${./cc-wrapper.sh} $ccPath/${prefix}gfortran - ln -sv ${prefix}gfortran $out/bin/${prefix}g77 - ln -sv ${prefix}gfortran $out/bin/${prefix}f77 + wrap ${targetPrefix}gfortran ${./cc-wrapper.sh} $ccPath/${targetPrefix}gfortran + ln -sv ${targetPrefix}gfortran $out/bin/${targetPrefix}g77 + ln -sv ${targetPrefix}gfortran $out/bin/${targetPrefix}f77 '' + optionalString cc.langJava or false '' - wrap ${prefix}gcj ${./cc-wrapper.sh} $ccPath/${prefix}gcj + wrap ${targetPrefix}gcj ${./cc-wrapper.sh} $ccPath/${targetPrefix}gcj '' + optionalString cc.langGo or false '' - wrap ${prefix}gccgo ${./cc-wrapper.sh} $ccPath/${prefix}gccgo + wrap ${targetPrefix}gccgo ${./cc-wrapper.sh} $ccPath/${targetPrefix}gccgo '' + optionalString cc.langAda or false '' - wrap ${prefix}gnatgcc ${./cc-wrapper.sh} $ccPath/${prefix}gnatgcc - wrap ${prefix}gnatmake ${./gnat-wrapper.sh} $ccPath/${prefix}gnatmake - wrap ${prefix}gnatbind ${./gnat-wrapper.sh} $ccPath/${prefix}gnatbind - wrap ${prefix}gnatlink ${./gnatlink-wrapper.sh} $ccPath/${prefix}gnatlink + wrap ${targetPrefix}gnatgcc ${./cc-wrapper.sh} $ccPath/${targetPrefix}gnatgcc + wrap ${targetPrefix}gnatmake ${./gnat-wrapper.sh} $ccPath/${targetPrefix}gnatmake + wrap ${targetPrefix}gnatbind ${./gnat-wrapper.sh} $ccPath/${targetPrefix}gnatbind + wrap ${targetPrefix}gnatlink ${./gnatlink-wrapper.sh} $ccPath/${targetPrefix}gnatlink '' + optionalString cc.langVhdl or false '' - ln -s $ccPath/${prefix}ghdl $out/bin/${prefix}ghdl + ln -s $ccPath/${targetPrefix}ghdl $out/bin/${targetPrefix}ghdl ''; propagatedBuildInputs = extraPackages; @@ -362,10 +360,10 @@ stdenv.mkDerivation { # some linkers on some platforms don't support specific -z flags export hardening_unsupported_flags="" - if [[ "$($ldPath/${prefix}ld -z now 2>&1 || true)" =~ un(recognized|known)\ option ]]; then + if [[ "$($ldPath/${targetPrefix}ld -z now 2>&1 || true)" =~ un(recognized|known)\ option ]]; then hardening_unsupported_flags+=" bindnow" fi - if [[ "$($ldPath/${prefix}ld -z relro 2>&1 || true)" =~ un(recognized|known)\ option ]]; then + if [[ "$($ldPath/${targetPrefix}ld -z relro 2>&1 || true)" =~ un(recognized|known)\ option ]]; then hardening_unsupported_flags+=" relro" fi '' diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 076f43b71f36..3c954bdd1474 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -117,7 +117,7 @@ let -exec sed '1i#line 1 "{}"' -i '{}' \; ) '' + optionalString (hostPlatform.libc == "msvcrt") '' - ${stdenv.cc.prefix}ranlib "$out/lib/"*.a + ${stdenv.cc.targetPrefix}ranlib "$out/lib/"*.a ''; in diff --git a/pkgs/development/libraries/ffmpeg-full/default.nix b/pkgs/development/libraries/ffmpeg-full/default.nix index b50025aa108a..c56e2e804f8b 100644 --- a/pkgs/development/libraries/ffmpeg-full/default.nix +++ b/pkgs/development/libraries/ffmpeg-full/default.nix @@ -438,7 +438,7 @@ stdenv.mkDerivation rec { crossAttrs = { configurePlatforms = []; configureFlags = configureFlags ++ [ - "--cross-prefix=${stdenv.cc.prefix}" + "--cross-prefix=${stdenv.cc.targetPrefix}" "--enable-cross-compile" "--target_os=${hostPlatform.parsed.kernel.name}" "--arch=${hostPlatform.arch}" diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 1bd8b7392601..e8eab4827e62 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -173,7 +173,7 @@ stdenv.mkDerivation rec { crossAttrs = { configurePlatforms = []; configureFlags = configureFlags ++ [ - "--cross-prefix=${stdenv.cc.prefix}" + "--cross-prefix=${stdenv.cc.targetPrefix}" "--enable-cross-compile" "--target_os=${hostPlatform.parsed.kernel}" "--arch=${hostPlatform.arch}" diff --git a/pkgs/development/libraries/libav/default.nix b/pkgs/development/libraries/libav/default.nix index e348fe0fae28..6a80a856df3c 100644 --- a/pkgs/development/libraries/libav/default.nix +++ b/pkgs/development/libraries/libav/default.nix @@ -110,7 +110,7 @@ let crossAttrs = { configurePlatforms = []; configureFlags = configureFlags ++ [ - "--cross-prefix=${stdenv.cc.prefix}" + "--cross-prefix=${stdenv.cc.targetPrefix}" "--enable-cross-compile" "--target_os=linux" "--arch=${hostPlatform.arch}" diff --git a/pkgs/development/libraries/newt/default.nix b/pkgs/development/libraries/newt/default.nix index e00decca2ffd..c4e019bf3ac6 100644 --- a/pkgs/development/libraries/newt/default.nix +++ b/pkgs/development/libraries/newt/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { ''; crossAttrs = { - makeFlags = "CROSS_COMPILE=${stdenv.cc.prefix}"; + makeFlags = "CROSS_COMPILE=${stdenv.cc.targetPrefix}"; }; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/qt-4.x/4.8/default.nix b/pkgs/development/libraries/qt-4.x/4.8/default.nix index f5bce5fb2997..056ba301d843 100644 --- a/pkgs/development/libraries/qt-4.x/4.8/default.nix +++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix @@ -229,11 +229,11 @@ stdenv.mkDerivation rec { '' + optionalString hostPlatform.isMinGW " -xplatform win32-g++-4.6"; patches = []; preConfigure = '' - sed -i -e 's/ g++/ ${stdenv.cc.prefix}g++/' \ - -e 's/ gcc/ ${stdenv.cc.prefix}gcc/' \ - -e 's/ ar/ ${stdenv.cc.prefix}ar/' \ - -e 's/ strip/ ${stdenv.cc.prefix}strip/' \ - -e 's/ windres/ ${stdenv.cc.prefix}windres/' \ + sed -i -e 's/ g++/ ${stdenv.cc.targetPrefix}g++/' \ + -e 's/ gcc/ ${stdenv.cc.targetPrefix}gcc/' \ + -e 's/ ar/ ${stdenv.cc.targetPrefix}ar/' \ + -e 's/ strip/ ${stdenv.cc.targetPrefix}strip/' \ + -e 's/ windres/ ${stdenv.cc.targetPrefix}windres/' \ mkspecs/win32-g++/qmake.conf ''; diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index ceb4bb9f370b..de2e0b62f9e2 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -62,7 +62,7 @@ stdenv.mkDerivation rec { ]; makeFlags = [ - "PREFIX=${stdenv.cc.prefix}" + "PREFIX=${stdenv.cc.targetPrefix}" ] ++ stdenv.lib.optionals (hostPlatform.libc == "msvcrt") [ "-f" "win32/Makefile.gcc" ] ++ stdenv.lib.optionals (!static) [ diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index 8e44a982067d..519d5c722af8 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -11,13 +11,13 @@ let version = "2.28.1"; basename = "binutils-${version}"; inherit (stdenv.lib) optional optionals optionalString; - # The prefix prepended to binary names to allow multiple binuntils on the + # The targetPrefix prepended to binary names to allow multiple binuntils on the # PATH to both be usable. - prefix = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-"; + targetPrefix = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-"; in stdenv.mkDerivation rec { - name = prefix + basename; + name = targetPrefix + basename; src = fetchurl { url = "mirror://gnu/binutils/${basename}.tar.bz2"; @@ -81,7 +81,7 @@ stdenv.mkDerivation rec { then "-Wno-string-plus-int -Wno-deprecated-declarations" else "-static-libgcc"; - # TODO(@Ericson2314): Always pass "--target" and always prefix. + # TODO(@Ericson2314): Always pass "--target" and always targetPrefix. configurePlatforms = # TODO(@Ericson2314): Figure out what's going wrong with Arm if hostPlatform == targetPlatform && targetPlatform.isArm @@ -102,7 +102,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; passthru = { - inherit prefix version; + inherit targetPrefix version; }; meta = with stdenv.lib; { diff --git a/pkgs/misc/uboot/default.nix b/pkgs/misc/uboot/default.nix index 1947fd30a401..199e4bd896d7 100644 --- a/pkgs/misc/uboot/default.nix +++ b/pkgs/misc/uboot/default.nix @@ -63,7 +63,7 @@ let crossAttrs = { makeFlags = [ "ARCH=${hostPlatform.platform.kernelArch}" - "CROSS_COMPILE=${stdenv.cc.prefix}" + "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ]; }; diff --git a/pkgs/os-specific/darwin/binutils/default.nix b/pkgs/os-specific/darwin/binutils/default.nix index 8ac93689373d..613606b50358 100644 --- a/pkgs/os-specific/darwin/binutils/default.nix +++ b/pkgs/os-specific/darwin/binutils/default.nix @@ -3,24 +3,24 @@ }: # Make sure both underlying packages claim to have prepended their binaries -# with the same prefix. -assert binutils-raw.prefix == cctools.prefix; +# with the same targetPrefix. +assert binutils-raw.targetPrefix == cctools.targetPrefix; let - inherit (binutils-raw) prefix; + inherit (binutils-raw) targetPrefix; cmds = [ "ar" "ranlib" "as" "dsymutil" "install_name_tool" "ld" "strip" "otool" "lipo" "nm" "strings" "size" ]; in -# TODO loop over prefixed binaries too +# TODO loop over targetPrefixed binaries too stdenv.mkDerivation { - name = "${prefix}cctools-binutils-darwin"; + name = "${targetPrefix}cctools-binutils-darwin"; buildCommand = '' mkdir -p $out/bin $out/include - ln -s ${binutils-raw.out}/bin/${prefix}c++filt $out/bin/${prefix}c++filt + ln -s ${binutils-raw.out}/bin/${targetPrefix}c++filt $out/bin/${targetPrefix}c++filt # We specifically need: # - ld: binutils doesn't provide it on darwin @@ -33,7 +33,7 @@ stdenv.mkDerivation { # - strip: the binutils one seems to break mach-o files # - lipo: gcc build assumes it exists # - nm: the gnu one doesn't understand many new load commands - for i in ${stdenv.lib.concatStringsSep " " (builtins.map (e: prefix + e) cmds)}; do + for i in ${stdenv.lib.concatStringsSep " " (builtins.map (e: targetPrefix + e) cmds)}; do ln -sf "${cctools}/bin/$i" "$out/bin/$i" done @@ -44,6 +44,6 @@ stdenv.mkDerivation { ''; passthru = { - inherit prefix; + inherit targetPrefix; }; } diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix index e08e78339832..bcca11d66b19 100644 --- a/pkgs/os-specific/darwin/cctools/port.nix +++ b/pkgs/os-specific/darwin/cctools/port.nix @@ -5,9 +5,9 @@ }: let - # The prefix prepended to binary names to allow multiple binuntils on the + # The targetPrefix prepended to binary names to allow multiple binuntils on the # PATH to both be usable. - prefix = stdenv.lib.optionalString + targetPrefix = stdenv.lib.optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-"; in @@ -19,7 +19,7 @@ assert (!hostPlatform.isDarwin) -> (maloader != null && xctoolchain != null); let baseParams = rec { - name = "${prefix}cctools-port-${version}"; + name = "${targetPrefix}cctools-port-${version}"; version = "895"; src = fetchFromGitHub { @@ -49,7 +49,7 @@ let enableParallelBuilding = true; - # TODO(@Ericson2314): Always pass "--target" and always prefix. + # TODO(@Ericson2314): Always pass "--target" and always targetPrefix. configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; configureFlags = stdenv.lib.optionals (!stdenv.isDarwin) [ "CXXFLAGS=-I${libcxx}/include/c++/v1" @@ -113,7 +113,7 @@ let ''; passthru = { - inherit prefix; + inherit targetPrefix; }; meta = { diff --git a/pkgs/os-specific/linux/busybox/default.nix b/pkgs/os-specific/linux/busybox/default.nix index 0030f60000d2..03b30af6c3e1 100644 --- a/pkgs/os-specific/linux/busybox/default.nix +++ b/pkgs/os-specific/linux/busybox/default.nix @@ -78,7 +78,7 @@ stdenv.mkDerivation rec { CONFIG_DEFAULT_SETFONT_DIR "/etc/kbd" ${extraConfig} - CONFIG_CROSS_COMPILER_PREFIX "${stdenv.cc.prefix}" + CONFIG_CROSS_COMPILER_PREFIX "${stdenv.cc.targetPrefix}" EOF make oldconfig @@ -87,7 +87,7 @@ stdenv.mkDerivation rec { ''; postConfigure = lib.optionalString useMusl '' - makeFlagsArray+=("CC=${stdenv.cc.prefix}gcc -isystem ${musl}/include -B${musl}/lib -L${musl}/lib") + makeFlagsArray+=("CC=${stdenv.cc.targetPrefix}gcc -isystem ${musl}/include -B${musl}/lib -L${musl}/lib") ''; nativeBuildInputs = lib.optional (hostPlatform != buildPlatform) buildPackages.stdenv.cc; diff --git a/pkgs/os-specific/linux/kernel/perf.nix b/pkgs/os-specific/linux/kernel/perf.nix index b64242e911db..4bcf6e037e0f 100644 --- a/pkgs/os-specific/linux/kernel/perf.nix +++ b/pkgs/os-specific/linux/kernel/perf.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation { /* I don't want cross-python or cross-perl - I don't know if cross-python even works */ propagatedBuildInputs = [ elfutils.crossDrv newt.crossDrv ]; - makeFlags = "CROSS_COMPILE=${stdenv.cc.prefix}"; + makeFlags = "CROSS_COMPILE=${stdenv.cc.targetPrefix}"; elfutils = elfutils.crossDrv; inherit (kernel.crossDrv) src patches; }; diff --git a/pkgs/os-specific/linux/klibc/default.nix b/pkgs/os-specific/linux/klibc/default.nix index 92ac1a77898c..c503b982aa29 100644 --- a/pkgs/os-specific/linux/klibc/default.nix +++ b/pkgs/os-specific/linux/klibc/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { ] # TODO(@Ericson2314): We now can get the ABI from # `hostPlatform.parsed.abi`, is this still a good idea? ++ stdenv.lib.optional (hostPlatform.platform.kernelArch == "arm") "CONFIG_AEABI=y" - ++ stdenv.lib.optional (hostPlatform != buildPlatform) "CROSS_COMPILE=${stdenv.cc.prefix}"; + ++ stdenv.lib.optional (hostPlatform != buildPlatform) "CROSS_COMPILE=${stdenv.cc.targetPrefix}"; # Install static binaries as well. postInstall = '' diff --git a/pkgs/os-specific/linux/mdadm/4.nix b/pkgs/os-specific/linux/mdadm/4.nix index 5511d72884a5..f9c2a5e09af6 100644 --- a/pkgs/os-specific/linux/mdadm/4.nix +++ b/pkgs/os-specific/linux/mdadm/4.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { "MANDIR=$(out)/share/man" "RUN_DIR=/dev/.mdadm" "STRIP=" ] ++ stdenv.lib.optionals (hostPlatform != buildPlatform) [ - "CROSS_COMPILE=${stdenv.cc.prefix}" + "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ]; nativeBuildInputs = [ groff ]; diff --git a/pkgs/os-specific/linux/mdadm/default.nix b/pkgs/os-specific/linux/mdadm/default.nix index 0929bae991dd..1e2c1dafb2db 100644 --- a/pkgs/os-specific/linux/mdadm/default.nix +++ b/pkgs/os-specific/linux/mdadm/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { "MANDIR=$(out)/share/man" "RUN_DIR=/dev/.mdadm" "STRIP=" ] ++ stdenv.lib.optionals (hostPlatform != buildPlatform) [ - "CROSS_COMPILE=${stdenv.cc.prefix}" + "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ]; nativeBuildInputs = [ groff ]; diff --git a/pkgs/os-specific/windows/jom/default.nix b/pkgs/os-specific/windows/jom/default.nix index b2b23f200455..8befa51566de 100644 --- a/pkgs/os-specific/windows/jom/default.nix +++ b/pkgs/os-specific/windows/jom/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation { QTDIR = qt48; crossAttrs = { - # cmakeFlags = "-DWIN32=1 -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_RC_COMPILER=${stdenv.cc.prefix}windres"; + # cmakeFlags = "-DWIN32=1 -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_RC_COMPILER=${stdenv.cc.targetPrefix}windres"; QTDIR = qt48.crossDrv; preBuild = '' export NIX_CROSS_CFLAGS_COMPILE=-fpermissive diff --git a/pkgs/tools/networking/htpdate/default.nix b/pkgs/tools/networking/htpdate/default.nix index 47163b94dc52..f0bb4ab46fae 100644 --- a/pkgs/tools/networking/htpdate/default.nix +++ b/pkgs/tools/networking/htpdate/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { makeFlags = [ "INSTALL=install" - "STRIP=${stdenv.cc.bintools.prefix}strip" + "STRIP=${stdenv.cc.bintools.targetPrefix}strip" "prefix=$(out)" ];