···1+Do not search for a C++ compiler and set MAKE_CXX.
2+3+Removes unnecessary reference to C++ compiler if CXX is set to an
4+absolute path. If CXX is not an absolute path, we avoid defaulting CXX
5+to a compiler name that was used to build the package.
6+7+Context: GNU Make defines default values for CC, CXX and other
8+environment variables. For CXX, it usually defaults to g++, however,
9+FreeBSD and OpenBSD no longer ship GCC as a system compiler (and use
10+Clang instead). For C compiler, POSIX standardizes the name to be "cc",
11+but there is no such standard for C++ compiler name. As a fix, GNU Make
12+uses CXX set for build as a default (via MAKE_CXX preprocessor macro in
13+the source code).
14+15+We revert the change that added this behavior and set the default to c++
16+or g++ that does not depend on the build platform.
17+18+In stdenv, CXX environment variable is always defined and overrides the
19+default value.
20+21+References:
22+• https://savannah.gnu.org/bugs/?63668
23+• https://git.savannah.gnu.org/cgit/make.git/commit/?id=ffa28f3914ff402b3915f75e4fed86ac6fb1449d
24+25+--- a/configure.ac
26++++ b/configure.ac
27+@@ -37,6 +37,4 @@ AM_INIT_AUTOMAKE([1.16.1 foreign -Werror -Wall])
28+ # Checks for programs.
29+ AC_USE_SYSTEM_EXTENSIONS
30+ AC_PROG_CC
31+-AC_PROG_CXX
32+-AC_DEFINE_UNQUOTED(MAKE_CXX, ["$CXX"], [Default C++ compiler.])
33+34+--- a/src/default.c
35++++ b/src/default.c
36+@@ -528,22 +528,15 @@ static const char *default_variables[] =
37+ #ifdef GCC_IS_NATIVE
38+ "CC", "gcc",
39+ "OBJC", "gcc",
40++# ifdef __MSDOS__
41++ "CXX", "gpp", /* g++ is an invalid name on MSDOS */
42++# else
43++ "CXX", "g++",
44++# endif /* __MSDOS__ */
45+ #else
46+ "CC", "cc",
47+ "OBJC", "cc",
48++ "CXX", "c++",
49+ #endif
50+-#ifdef MAKE_CXX
51+- "CXX", MAKE_CXX,
52+-#else
53+-# ifdef GCC_IS_NATIVE
54+-# ifdef __MSDOS__
55+- "CXX", "gpp", /* g++ is an invalid name on MSDOS */
56+-# else
57+- "CXX", "gcc",
58+-# endif /* __MSDOS__ */
59+-# else
60+- "CXX", "g++",
61+-# endif
62+-#endif
63+ /* This expands to $(CO) $(COFLAGS) $< $@ if $@ does not exist,
64+ and to the empty string if $@ does exist. */