Skip to content

Commit

Permalink
gnumake: do not use MAKE_CXX
Browse files Browse the repository at this point in the history
Removes unnecessary C++ compiler reference when CXX environment variable
is set to an absolute path.
  • Loading branch information
tie committed May 26, 2024
1 parent 032c429 commit d24a15c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkgs/development/tools/build-managers/gnumake/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@ stdenv.mkDerivation rec {
# See https://github.com/NixOS/nixpkgs/issues/51221 for discussion.
++ lib.optional stdenv.isDarwin "ac_cv_struct_st_mtim_nsec=no";

# Remove unnecessary reference to C++ compiler. Note that MAKE_CXX is
# always set to $CXX when running confugure script. If it is not set,
# a reasonable fallback is used.
#
# See also https://savannah.gnu.org/bugs/?63668 and make commit
# ffa28f3914ff402b3915f75e4fed86ac6fb1449d.
postPatch = ''
substituteInPlace configure \
--replace-fail 'printf "%s\n" "#define MAKE_CXX \"$CXX\"" >>confdefs.h' ""
'';

outputs = [ "out" "man" "info" ];
separateDebugInfo = true;

Expand Down

0 comments on commit d24a15c

Please sign in to comment.