On 08/05/2018 02:50 PM, Paul Smith wrote:
I pushed these changes to Git yesterday. Please verify it works in
your environment.
Commit that I used: a1bb739165a944769cbb4a6e4f027ac9c2587122
Threos libc does not support the write of 'environ'. Thus, I had to add
minor changes. Some part of it might can be pushed into the repository.
See the attached patch file.
Dispite this patch, it compiled successfully on Threos (using
cross-compiler), and it works for my test cases (not the whole test
suite due to different reasons).
Thank you very much for your effort to make it working!
This version also works on native Arch Linux, and "make check" succeeds.
I found a possible typo in NEWS:
diff --git a/NEWS b/NEWS
index 5395fc8..9808f90 100644
--- a/NEWS
+++ b/NEWS
@@ -46,10 +46,10 @@
http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=108&set
* Makefiles can now specify the '-j' option in their MAKEFLAGS
variable and
this will cause make to enable that parallelism mode.
-* GNU make will now use pthread_spawn() on systems where it is available.
+* GNU make will now use posix_spawn() on systems where it is available.
It will select POSIX_SPAWN_USEVFORK where that is available. If you
prefer
to use fork/exec even on systems where pthread_spawn() is present,
you can
- use the --disable-pthread-spawn option to configure.
+ use the --disable-posix-spawn option to configure.
Aron Barath <baratha...@caesar.elte.hu> provided the basic
implementation.
* Error messages printed when invoking non-existent commands have been
cleaned
--- src/job.c.orig 2018-08-05 01:20:58.000000000 +0200
+++ src/job.c 2018-08-06 09:08:39.075299620 +0200
@@ -1412,7 +1412,7 @@
{
/* Fork the child process. */
- char **parent_environ;
+ /*char **parent_environ;*/
run_local:
block_sigs ();
@@ -1425,14 +1425,15 @@
#else
- parent_environ = environ;
+ /* posix_spawn() will not clobber the environment, so we don't need this */
+ /*parent_environ = environ;*/
jobserver_pre_child (flags & COMMANDS_RECURSE);
child->pid = child_execute_job (&child->output, child->good_stdin,
argv, child->environment);
- environ = parent_environ; /* Restore value child may have clobbered. */
+ /*environ = parent_environ;*/ /* Restore value child may have clobbered. */
jobserver_post_child (flags & COMMANDS_RECURSE);
#endif /* !VMS */
}
@@ -2449,8 +2450,7 @@
# else
/* Run the program. */
- environ = envp;
- execvp (argv[0], argv);
+ execvpe (argv[0], argv, envp);
# endif /* !__EMX__ */
_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make