Hi,
This patch implements pex_unix_exec_child using posix_spawn when
available.
This should especially benefit recent macOS (where vfork just calls
fork), but should have equivalent or faster performance on all
platforms.
In addition, the implementation is substantially simpler than the
vfork+exec code path.
Tested on x86_64-linux.
v2: Fix error handling (previously the function would be run twice in
case of error), and don't use a macro that changes control flow.
v3: Match file style for error-handling blocks, don't close
in/out/errdes on error, and check close() for errors.
libiberty/
* configure.ac (AC_CHECK_HEADERS): Add spawn.h.
(checkfuncs): Add posix_spawn, posix_spawnp.
(AC_CHECK_FUNCS): Add posix_spawn, posix_spawnp.
* aclocal.m4, configure, config.in: Rebuild.
* pex-unix.c [HAVE_POSIX_SPAWN] (pex_unix_exec_child): New function.
Dependencies (not updated since 13.1.0):
* GMP 6.2.1
* ISL 0.24
* MPL 1.2.1
* MPFR 4.1.0
The dependencies were pulled in by running the ./contrib/download_prerequisites script.
Updated dependencies:
* GMP 6.2.1
* ISL 0.24
* MPL 1.2.1
* MPFR 4.1.0
The dependencies were pulled in by running the ./contrib/download_prerequisites script and then
manually removing the symbolic links and archives, and renaming the directories (i.e mv isl-0.24 to isl)
* This update resolves the segfault/ICE in gcc/c-parser.c while building natively
* gcc/gengtype.c was already updated to GCC 4.6.3 version previously in btrev43031, so no change there
* gcc/libiberty/make-relative-prefix is the stock 4.6.3 version now, as the workaround for Haiku is no longer needed
* This update is otherwise the GCC patches for upgrading 4.6.2 to 4.6.3 core/g++ applied to our sources
* Solved conflicts with the libtool related files by simply using the
vendor versions. IIRC the haiku related changes to libtool and
autoconf were relevant only for the binutils.
* Solved {libstdc++-v3,libmudflap}/configure conflicts by re-running
autoconf for these directories.
I'm already working on fixing the Haiku build, so please don't do the
same.
git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@20318 a95241bf-73f2-0310-859d-f6bbb57e9c96