From 96ce1e03a4a3a395b2874fb1e3bbfe3358ded4bb Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Thu, 26 Jul 2018 20:16:28 -0400 Subject: {cc,bintools}-wrapper: also replace . in config Some configs will have dots for version numbers. To normalize we can just use _ again. --- pkgs/build-support/bintools-wrapper/default.nix | 4 +--- pkgs/build-support/cc-wrapper/default.nix | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'pkgs') diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index 91f9e7c71e35..2048220361ac 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -43,10 +43,8 @@ let # The wrapper scripts use 'cat' and 'grep', so we may need coreutils. coreutils_bin = if nativeTools then "" else getBin coreutils; - dashlessTarget = stdenv.lib.replaceStrings ["-"] ["_"] targetPlatform.config; - # See description in cc-wrapper. - infixSalt = dashlessTarget; + infixSalt = replaceStrings ["-" "."] ["_" "_"] targetPlatform.config; # The dynamic linker has different names on different platforms. This is a # shell glob that ought to match it. diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index aca96f58ed97..a981ffea7081 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -45,14 +45,12 @@ let default_cxx_stdlib_compile = optionalString (targetPlatform.isLinux && !(cc.isGNU or false) && !nativeTools && cc ? gcc) "-isystem $(echo -n ${cc.gcc}/include/c++/*) -isystem $(echo -n ${cc.gcc}/include/c++/*)/$(${cc.gcc}/bin/gcc -dumpmachine)"; - dashlessTarget = stdenv.lib.replaceStrings ["-"] ["_"] targetPlatform.config; - # The "infix salt" is a arbitrary string added in the middle of env vars # defined by cc-wrapper's hooks so that multiple cc-wrappers can be used # without interfering. For the moment, it is defined as the target triple, # adjusted to be a valid bash identifier. This should be considered an # unstable implementation detail, however. - infixSalt = dashlessTarget; + infixSalt = replaceStrings ["-" "."] ["_" "_"] targetPlatform.config; expand-response-params = if buildPackages.stdenv.cc or null != null && buildPackages.stdenv.cc != "/dev/null" -- cgit 1.4.1