···1-From e00a5257a6ca5fedbf68b09eee7df3502971a057 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
3Date: Sat, 24 Apr 2021 10:11:40 +0200
4-Subject: [PATCH 1/2] No impure bin sh
56default_shell is used to populuate default shell used to execute jobs.
7Unless SHELL is set to a different value this would be /bin/sh.
···18 1 file changed, 1 insertion(+), 1 deletion(-)
1920diff --git a/src/job.c b/src/job.c
21-index ae1f18b..6b4ddb3 100644
22--- a/src/job.c
23+++ b/src/job.c
24-@@ -77,7 +77,7 @@ char * vms_strsignal (int status);
2526 #else
27···3132 #endif
33--
34-2.31.1
35
···1+From b69e3740e68afaec97b9957d40b9c135db87eaab Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
3Date: Sat, 24 Apr 2021 10:11:40 +0200
4+Subject: [PATCH 1/3] No impure bin sh
56default_shell is used to populuate default shell used to execute jobs.
7Unless SHELL is set to a different value this would be /bin/sh.
···18 1 file changed, 1 insertion(+), 1 deletion(-)
1920diff --git a/src/job.c b/src/job.c
21+index ea885614..8a9bd8e0 100644
22--- a/src/job.c
23+++ b/src/job.c
24+@@ -76,7 +76,7 @@ char * vms_strsignal (int status);
2526 #else
27···3132 #endif
33--
34+2.44.1
35
···22 sha256 = "sha256-3Rb7HWe/q3mnL16DkHNcSePo5wtJRaFasfgd23hlj7M=";
23 };
2425- # to update apply these patches with `git am *.patch` to https://git.savannah.gnu.org/git/make.git
26- patches = [
27- # See patch message.
28- ./make-cxx.patch
29- # Replaces /bin/sh with sh, see patch file for reasoning
30- ./0001-No-impure-bin-sh.patch
31- # Purity: don't look for library dependencies (of the form `-lfoo') in /lib
32- # and /usr/lib. It's a stupid feature anyway. Likewise, when searching for
33- # included Makefiles, don't look in /usr/include and friends.
34- ./0002-remove-impure-dirs.patch
35- ];
03637 nativeBuildInputs = [ autoreconfHook pkg-config ];
38 buildInputs = lib.optionals guileEnabled [ guile ];
···22 sha256 = "sha256-3Rb7HWe/q3mnL16DkHNcSePo5wtJRaFasfgd23hlj7M=";
23 };
2425+ # To update patches:
26+ # $ version=4.4.1
27+ # $ git clone https://git.savannah.gnu.org/git/make.git
28+ # $ cd make && git checkout -b nixpkgs $version
29+ # $ git am --directory=../patches
30+ # $ # make changes, resolve conflicts, etc.
31+ # $ git format-patch --output-directory ../patches --diff-algorithm=histogram $version
32+ #
33+ # TODO: stdenv’s setup.sh should be aware of patch directories. It’s very
34+ # convenient to keep them in a separate directory but we can defer listing the
35+ # directory until derivation realization to avoid unnecessary Nix evaluations.
36+ patches = lib.filesystem.listFilesRecursive ./patches;
3738 nativeBuildInputs = [ autoreconfHook pkg-config ];
39 buildInputs = lib.optionals guileEnabled [ guile ];
···1-Do not search for a C++ compiler and set MAKE_CXX.
00000023Removes unnecessary reference to C++ compiler if CXX is set to an
4absolute path. If CXX is not an absolute path, we avoid defaulting CXX
···19default value.
2021References:
22-• https://savannah.gnu.org/bugs/?63668
23-• https://git.savannah.gnu.org/cgit/make.git/commit/?id=ffa28f3914ff402b3915f75e4fed86ac6fb1449d
0000240025--- 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-000034--- a/src/default.c
35+++ b/src/default.c
36@@ -528,22 +528,15 @@ static const char *default_variables[] =
···45 #else
46 "CC", "cc",
47 "OBJC", "cc",
48-+ "CXX", "c++",
49- #endif
50-#ifdef MAKE_CXX
51- "CXX", MAKE_CXX,
52-#else
···59-# else
60- "CXX", "g++",
61-# endif
62--#endif
063 /* This expands to $(CO) $(COFLAGS) $< $@ if $@ does not exist,
64 and to the empty string if $@ does exist. */
000
···1+From 3317b3a78666e6073c63f62a322176e3dc680461 Mon Sep 17 00:00:00 2001
2+From: Ivan Trubach <mr.trubach@icloud.com>
3+Date: Sat, 17 Aug 2024 22:35:03 +0300
4+Subject: [PATCH 3/3] Do not search for a C++ compiler and set MAKE_CXX
5+MIME-Version: 1.0
6+Content-Type: text/plain; charset=UTF-8
7+Content-Transfer-Encoding: 8bit
89Removes unnecessary reference to C++ compiler if CXX is set to an
10absolute path. If CXX is not an absolute path, we avoid defaulting CXX
···25default value.
2627References:
28+ • https://savannah.gnu.org/bugs/?63668
29+ • https://git.savannah.gnu.org/cgit/make.git/commit/?id=ffa28f3914ff402b3915f75e4fed86ac6fb1449d
30+---
31+ configure.ac | 2 --
32+ src/default.c | 19 ++++++-------------
33+ 2 files changed, 6 insertions(+), 15 deletions(-)
3435+diff --git a/configure.ac b/configure.ac
36+index cd785754..41a65307 100644
37--- a/configure.ac
38+++ b/configure.ac
39+@@ -37,8 +37,6 @@ AM_INIT_AUTOMAKE([1.16.1 foreign -Werror -Wall])
40 # Checks for programs.
41 AC_USE_SYSTEM_EXTENSIONS
42 AC_PROG_CC
43-AC_PROG_CXX
44-AC_DEFINE_UNQUOTED(MAKE_CXX, ["$CXX"], [Default C++ compiler.])
45+46+ # Configure gnulib
47+ gl_EARLY
48+diff --git a/src/default.c b/src/default.c
49+index e396269b..78ba402f 100644
50--- a/src/default.c
51+++ b/src/default.c
52@@ -528,22 +528,15 @@ static const char *default_variables[] =
···61 #else
62 "CC", "cc",
63 "OBJC", "cc",
64+-#endif
065-#ifdef MAKE_CXX
66- "CXX", MAKE_CXX,
67-#else
···74-# else
75- "CXX", "g++",
76-# endif
77++ "CXX", "c++",
78+ #endif
79 /* This expands to $(CO) $(COFLAGS) $< $@ if $@ does not exist,
80 and to the empty string if $@ does exist. */
81+--
82+2.44.1
83+