treewide: add targetPrefix to hardcoded references to CC=cc

This commit is contained in:
Ben Siraphob 2021-02-16 18:48:46 +07:00
parent ad4db3f4d8
commit 223f25cf4a
53 changed files with 56 additions and 56 deletions

View File

@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
];
configureFlags = [
"CC=cc"
"CC=${stdenv.cc.targetPrefix}cc"
"--with-slang=${slang}"
"JED_ROOT=${placeholder "out"}/share/jed"
];

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
buildInputs = [ ncurses ];
makeFlags = [ "CC=cc" ];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
checkFlags = [ "test-command" "test-buffer" "test-state" ];
installPhase = ''

View File

@ -29,8 +29,8 @@ stdenv.mkDerivation rec {
makeFlags = [
"prefix=${placeholder "out"}"
"CC=cc"
"CXX=c++"
"CC=${stdenv.cc.targetPrefix}cc"
"CXX=${stdenv.cc.targetPrefix}c++"
"CFLAGS=-DENABLE_NLS"
];

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
patchPhase = "sed -i -e '/^CFLAGS *?= *-g *$/d' Makefile";
makeFlags = [ "CC=cc" "PREFIX=${placeholder "out"}" ];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "PREFIX=${placeholder "out"}" ];
meta = with lib; {
description = "Klondike Solitaire in your ncurses terminal";

View File

@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
"DATA_ROOT_DIR_PURPLE=${placeholder "out"}/share"
];
buildFlags = [ "CC=cc" ]; # fix build on darwin
buildFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; # fix build on darwin
meta = with lib; {
homepage = "https://github.com/matrix-org/purple-matrix";

View File

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
makeFlags = [
"HSTDIR=${htslib}"
"prefix=$(out)"
"CC=cc"
"CC=${stdenv.cc.targetPrefix}cc"
];
preCheck = ''

View File

@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
};
makeFlags = [
"CC=cc"
"CC=${stdenv.cc.targetPrefix}cc"
"INSTALLDIR=$(out)/bin"
];

View File

@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
substituteInPlace Makefile --replace "-fno-guess-branch-probability" ""
'';
buildFlags = [ "CC=cc" "CXX=c++" ];
buildFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "CXX=${stdenv.cc.targetPrefix}c++" ];
installFlags = [ "PREFIX=$(out)" ];
buildInputs = [ gmp mpir cddlib ];

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation {
ECM = if ecm == null then "0" else "1";
# Doesn't hurt Linux but lets clang-based platforms like Darwin work fine too
makeFlags = [ "CC=cc" "all" ];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "all" ];
installPhase = ''
mkdir -p $out/bin/

View File

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
buildInputs = [ gmp ];
makeFlags = [ "CC=cc" ];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
buildFlags = lib.optional stdenv.isDarwin ["CCFLAGS2=-lgmp -lc -lm" "CCFLAGS=-UUSE_SSE"];
installFlags = [ "INSTALL_DIR=$(out)" ];

View File

@ -248,10 +248,10 @@ in stdenv.mkDerivation {
# Need these tools on the build system when cross compiling,
# hacky, but have found no other way.
preConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
CXX=c++ LD=ld make -C tools/depends/native/JsonSchemaBuilder
CXX=${stdenv.cc.targetPrefix}c++ LD=ld make -C tools/depends/native/JsonSchemaBuilder
cmakeFlags+=" -DWITH_JSONSCHEMABUILDER=$PWD/tools/depends/native/JsonSchemaBuilder/bin"
CXX=c++ LD=ld make EXTRA_CONFIGURE= -C tools/depends/native/TexturePacker
CXX=${stdenv.cc.targetPrefix}c++ LD=ld make EXTRA_CONFIGURE= -C tools/depends/native/TexturePacker
cmakeFlags+=" -DWITH_TEXTUREPACKER=$PWD/tools/depends/native/TexturePacker/bin"
'';

View File

@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
--replace "/usr/bin/install" "install"
'';
makeFlags = [ "CC=cc" ];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
preInstall = ''
runHook preInstall

View File

@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
preInstall = ''
mv zic.o zic.o.orig
mv zic zic.orig
make $makeFlags cc=cc AR=ar zic
make $makeFlags cc=${stdenv.cc.targetPrefix}cc AR=${stdenv.cc.targetPrefix}ar zic
mv zic zic-native
mv zic.o.orig zic.o
mv zic.orig zic

View File

@ -6,7 +6,7 @@ stdenv.mkDerivation rec {
buildInputs = [ gmp perl ];
makeFlags = [ "PREFIX=$(out)" ] ++ lib.optionals stdenv.isDarwin [ "CC=cc" ];
makeFlags = [ "PREFIX=$(out)" ] ++ lib.optionals stdenv.isDarwin [ "CC=${stdenv.cc.targetPrefix}cc" ];
src = fetchurl {
url = "https://github.com/kfl/mosml/archive/ver-${version}.tar.gz";

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ which ];
makeFlags = [ "PREFIX=${placeholder "out"}" "CC=cc" ];
makeFlags = [ "PREFIX=${placeholder "out"}" "CC=${stdenv.cc.targetPrefix}cc" ];
# tests are run as part of the compilation process
doCheck = false;

View File

@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
ANT_ARGS =
# Note that our OpenJDK on Darwin is currently 32-bit, so we have to build a 32-bit dylib.
(if stdenv.is64bit then [ "-Dskip32=true" ] else [ "-Dskip64=true" ])
++ [ "-Dgcc=cc" "-Dant.build.javac.source=1.6" ]
++ [ "-Dgcc=${stdenv.cc.targetPrefix}cc" "-Dant.build.javac.source=1.6" ]
++ lib.optional stdenv.isDarwin "-DisMac=true";
installPhase =

View File

@ -61,7 +61,7 @@ let
"--enable-avplay"
"--enable-shared"
"--enable-runtime-cpudetect"
"--cc=cc"
"--cc=${stdenv.cc.targetPrefix}cc"
(enableFeature enableGPL "gpl")
(enableFeature enableGPL "swscale")
(enableFeature mp3Support "libmp3lame")

View File

@ -16,7 +16,7 @@ stdenv.mkDerivation {
--replace -Wl,-soname, -Wl,-install_name,$out/lib/
'';
makeFlags = [ "PREFIX=$(out)" "CXX=c++" ];
makeFlags = [ "PREFIX=$(out)" "CXX=${stdenv.cc.targetPrefix}c++" ];
meta = {
description = "Cross platform (Linux/FreeBSD/Unix/Win32) streaming socket C++";

View File

@ -48,7 +48,7 @@ stdenv.mkDerivation rec {
else
"generic" # "chooses options that should be OK for most platforms"
}"
"CXX=c++"
"CXX=${stdenv.cc.targetPrefix}c++"
] ++ lib.optionals withGf2x [
"NTL_GF2X_LIB=on"
"GF2X_PREFIX=${gf2x}"

View File

@ -22,7 +22,7 @@ in stdenv.mkDerivation {
++ lib.optionals stdenv.isLinux [ libaio ];
dontPatchELF = true;
makeFlags = [ "PREFIX=$(out)" "CC=cc" "LD=cc"];
makeFlags = [ "PREFIX=$(out)" "CC=${stdenv.cc.targetPrefix}cc" "LD=${stdenv.cc.targetPrefix}cc"];
postFixup = ''
${lib.optionalString (stdenv.isLinux) ''

View File

@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
libbasename = "libzn_poly";
libext = stdenv.targetPlatform.extensions.sharedLibrary;
makeFlags = [ "CC=cc" ];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
# Tuning (either autotuning or with hand-written paramters) is possible
# but not implemented here.

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation {
sha256 = "0ah54nizb6iwcx277w104wsfnx05vrp4sh56d2pfxhf8xghg54m6";
};
makeFlags = [ "PREFIX=${placeholder "out"}" "CC=cc" ];
makeFlags = [ "PREFIX=${placeholder "out"}" "CC=${stdenv.cc.targetPrefix}cc" ];
nativeBuildInputs = [ installShellFiles ];

View File

@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "02354yn1lh1dxny35ky2d0b44iq302krsqpwk5grr4glma00hhq6";
};
makeFlags = [ "CC=cc prefix=$(out)" ];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc prefix=$(out)" ];
enableParallelBuilding = true;

View File

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
};
buildInputs = [ libusb-compat-0_1 ];
makeFlags = lib.optionals stdenv.isDarwin [ "CC=cc" ];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
installPhase = ''
mkdir -p $out/bin

View File

@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
done
'';
makeFlags = [ "PREFIX=$(out)" "CC=cc" ];
makeFlags = [ "PREFIX=$(out)" "CC=${stdenv.cc.targetPrefix}cc" ];
doCheck = true;
checkPhase = ''HOME="$TMPDIR" PATH="$PWD:$PATH" make test'';

View File

@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
sha256 = "01p396daqw3zh6nijffbfbwyqza33bi2k4q3m5yjzs02xwi99alp";
};
buildFlags = [ "CC=cc" ];
buildFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
installPhase = ''
# Manually copy, make install copies to /usr/local/bin

View File

@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
buildInputs = [ file zlib ] ++ optionals client [ openal SDL SDL_image libogg libvorbis ];
targets = (optionalString server "server") + (optionalString client " client");
makeFlags = [ "-C source/src" "CXX=c++" targets ];
makeFlags = [ "-C source/src" "CXX=${stdenv.cc.targetPrefix}c++" targets ];
desktop = makeDesktopItem {
name = "AssaultCube";

View File

@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
fontsPath = lib.optionalString tileMode dejavu_fonts;
makeFlags = [ "prefix=${placeholder "out"}" "FORCE_CC=cc" "FORCE_CXX=c++" "HOSTCXX=c++"
makeFlags = [ "prefix=${placeholder "out"}" "FORCE_CC=${stdenv.cc.targetPrefix}cc" "FORCE_CXX=${stdenv.cc.targetPrefix}c++" "HOSTCXX=${stdenv.cc.targetPrefix}c++"
"FORCE_PKGCONFIG=y"
"SAVEDIR=~/.crawl" "sqlite=${sqlite.dev}"
"DATADIR=${placeholder "out"}"

View File

@ -60,7 +60,7 @@ in stdenv.mkDerivation rec {
-e 's,^WINTTYLIB=.*,WINTTYLIB=-lncurses,' \
-i sys/unix/hints/linux
sed \
-e 's,^CC=.*$,CC=cc,' \
-e 's,^CC=.*$,CC=${stdenv.cc.targetPrefix}cc,' \
-e 's,^HACKDIR=.*$,HACKDIR=\$(PREFIX)/games/lib/\$(GAME)dir,' \
-e 's,^SHELLDIR=.*$,SHELLDIR=\$(PREFIX)/games,' \
-e 's,^CFLAGS=-g,CFLAGS=,' \

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation {
};
enableParallelBuilding = true;
makeFlags = ["CC=cc"];
makeFlags = ["CC=${stdenv.cc.targetPrefix}cc"];
patches = [ ./bcc-warning-fix.patch ];

View File

@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
dontConfigure = true;
makeFlags = [ "GCC=cc" "CC_STD=-std=c99" "LDFLAGS=-lm" ];
makeFlags = [ "GCC=${stdenv.cc.targetPrefix}cc" "CC_STD=-std=c99" "LDFLAGS=-lm" ];
preInstall = ''
install -d ${placeholder "out"}/bin

View File

@ -9,7 +9,7 @@ stdenv.mkDerivation {
};
preBuild = "
makeFlagsArray=(prefix=$out E=echo RANLIB=ranlib INSTALL='install -c')
makeFlagsArray=(prefix=$out E=echo RANLIB=${stdenv.cc.targetPrefix}ranlib INSTALL='install -c')
";
# Work around a broken Makefile.

View File

@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
buildInputs = [ libX11 imlib2 ]
++ lib.optional enableXinerama libXinerama;
buildFlags = [ "CC=cc" (if enableXinerama then "xinerama=1" else "xinerama=0") ] ;
buildFlags = [ "CC=${stdenv.cc.targetPrefix}cc" (if enableXinerama then "xinerama=1" else "xinerama=0") ] ;
installFlags = [ "DESTDIR=$(out)" "PREFIX=" ];

View File

@ -15,8 +15,8 @@ stdenv.mkDerivation rec {
postPatch = ''
for f in Makefile.linux ../UniversalDetector/Makefile.linux ; do
substituteInPlace $f \
--replace "= gcc" "=cc" \
--replace "= g++" "=c++" \
--replace "= gcc" "=${stdenv.cc.targetPrefix}cc" \
--replace "= g++" "=${stdenv.cc.targetPrefix}c++" \
--replace "-DGNU_RUNTIME=1" "" \
--replace "-fgnu-runtime" "-fobjc-nonfragile-abi"
done

View File

@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "12dxx98kbpc5z4dgni25280088bhlsb677rp832r82zzc1drpng7";
};
makeFlags = lib.optionals stdenv.cc.isClang [ "CC=cc" "LD=cc" ];
makeFlags = lib.optionals stdenv.cc.isClang [ "CC=${stdenv.cc.targetPrefix}cc" "LD=${stdenv.cc.targetPrefix}cc" ];
installPhase = ''
install -Dt $out/bin bchunk

View File

@ -16,7 +16,7 @@ stdenv.mkDerivation {
dontConfigure = true;
makeFlags = [ "CC=cc" ];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
installPhase = ''
install --directory --mode=755 $out/bin

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
mv config.mk.template config.mk
'';
makeFlags = lib.optionals stdenv.isDarwin [ "CC=cc" ];
makeFlags = lib.optionals stdenv.isDarwin [ "CC=${stdenv.cc.targetPrefix}cc" ];
installPhase = ''
install -D hactool $out/bin/hactool

View File

@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
sha256 = "0l43c59d6v9l0g07z3q3ywhb8xb3vz74llv3mna0izk9bj6aqkiv";
};
makeFlags = [ "CC=cc" "LD=cc" ]; # gcc and/or clang compat
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "LD=${stdenv.cc.targetPrefix}cc" ]; # gcc and/or clang compat
configurePhase = ''
sed -i s,/usr,$out, Makefile

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
sha256 = "0n502zj8igm583kbfvyv7zhd97vb71jac41ncb9jr2yz2v5ir8j9";
};
makeFlags = [ "CC=cc" ];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
checkPhase = ''
pushd test

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
sha256 = "1lj24yq5gj9hxhy1srk73521q95zyqzkws0q4v271hf5wmqaxa2f";
};
makeFlags = [ "CC=cc" ];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
installPhase = ''
install -Dm755 convfont $out/bin/convfont

View File

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
fetchSubmodules = true;
};
makeFlags = [ "CC=cc" ];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
checkPhase = ''
pushd test

View File

@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = with perlPackages; [ perl IPCRun TimeDate TimeDuration ];
buildFlags = [ "CC=cc" ];
buildFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
installFlags = [ "PREFIX=$(out)" ];
postInstall = ''

View File

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
buildInputs = [ curl libzip ];
nativeBuildInputs = [ pkg-config ];
makeFlags = ["CC=cc" "LD=cc" "CFLAGS="];
makeFlags = ["CC=${stdenv.cc.targetPrefix}cc" "LD=${stdenv.cc.targetPrefix}cc" "CFLAGS="];
installFlags = [ "PREFIX=$(out)" ];

View File

@ -9,7 +9,7 @@ stdenv.mkDerivation {
buildInputs = [xlibsWrapper];
buildFlags = [ "CC=cc" ];
buildFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
installPhase = ''
mkdir -pv "$out/bin"

View File

@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "00yld6yinc8s4xv3b8kbvzn2f4rja5dmp6ysv3n4847qn4k60dh7";
};
makeFlags = [ "CC=cc" ]; # gcc and/or clang compat
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; # gcc and/or clang compat
installPhase = ''
install -D -m ugo=rx connect $out/bin/connect

View File

@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
};
buildPhase = ''
make CC=cc posix
make CC=${stdenv.cc.targetPrefix}cc posix
'';
installPhase = ''

View File

@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
"USE_GETADDRINFO=1"
] ++ lib.optionals withPrometheusExporter [
"EXTRA_OBJS=contrib/prometheus-exporter/service-prometheus.o"
] ++ lib.optional stdenv.isDarwin "CC=cc";
] ++ lib.optional stdenv.isDarwin "CC=${stdenv.cc.targetPrefix}cc";
enableParallelBuilding = true;

View File

@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
configurePhase = ''
substituteInPlace Makefile --replace /usr/local "$out"
'';
makeFlags = lib.optionals stdenv.isDarwin ["CC=cc"];
makeFlags = lib.optionals stdenv.isDarwin ["CC=${stdenv.cc.targetPrefix}cc"];
patches = [
./apg.patch

View File

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ makeWrapper installShellFiles ];
makeFlags = [ "PREFIX=$(out)" "GITVER=${version}" "CC=cc" ];
makeFlags = [ "PREFIX=$(out)" "GITVER=${version}" "CC=${stdenv.cc.targetPrefix}cc" ];
preInstall = ''
mkdir -p $out/bin

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
buildInputs = [ openssl ];
makeFlags = [ "PREFIX=$(out)" "CC=cc" ];
makeFlags = [ "PREFIX=$(out)" "CC=${stdenv.cc.targetPrefix}cc" ];
meta = with lib; {
description = "Tests SSL/TLS services and discover supported cipher suites";

View File

@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "1axg8r4g5n5kdqj5013pgck80nni3z172xkg506vz4zx1zcmrm4r";
};
buildFlags = [ "CC=cc" ];
buildFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
installPhase = ''
mkdir -p $out/bin

View File

@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
"GLOBALCONF=${placeholder "out"}/share/boxes/boxes-config"
'';
makeFlags = lib.optionals stdenv.isDarwin [ "CC=cc" ];
makeFlags = lib.optionals stdenv.isDarwin [ "CC=${stdenv.cc.targetPrefix}cc" ];
installPhase = ''
install -Dm755 -t $out/bin src/boxes

View File

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
sha256 = "4a6630f27f6c22bcd95982bf3357747d19f40bd98297a569e9c77468b756f715";
};
buildFlags = [ "CC=cc" ];
buildFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
installPhase = ''
install -D {,$out/bin/}yamdi