This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Need some Unix and /bin/sh expertise for GCC testsuite
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: laurent at guerby dot net
- Cc: Dave Korn <dave dot korn dot cygwin at googlemail dot com>, gcc <gcc at gcc dot gnu dot org>, Paolo Bonzini <bonzini at gnu dot org>, Arnaud Charlet <charlet at adacore dot com>, Eric Botcazou <ebotcazou at adacore dot com>
- Date: Sat, 15 Aug 2009 01:37:37 +0100
- Subject: Re: Need some Unix and /bin/sh expertise for GCC testsuite
- References: <1250283155.20287.116.camel@localhost> <4A85D4EE.7040503@gmail.com> <1250284636.20287.123.camel@localhost>
Laurent GUERBY wrote:
> gnatmake uses Non_Blocking_Spawn to call the compiler (gnatmake supports
> "-j N" like make), but for the gnatlink call (we see in the "ps fauxww")
> it uses in gcc/ada/make.adb:
>
> procedure Link
> ...
> GNAT.OS_Lib.Spawn (Gnatlink_Path.all, Link_Args, Success);
> end Link;
>
> which ends up calling gcc/ada/s-os_lib.adb
>
> Spawn_Internal (Program_Name, Args, Result, Junk, Blocking =>
> True);
> ...
> function Portable_Spawn (Args : Address) return Integer;
> pragma Import (C, Portable_Spawn, "__gnat_portable_spawn");
>
> which ends up calling in gcc/ada/adaint.c:
>
> int
> __gnat_portable_spawn (char *args[])
> ...
> pid = fork ();
> if (pid < 0)
> return -1;
>
> if (pid == 0)
> {
> /* The child. */
> if (execv (args[0], MAYBE_TO_PTR32 (args)) != 0)
> _exit (1);
> }
>
> /* The parent. */
> finished = waitpid (pid, &status, 0);
>
> if (finished != pid || WIFEXITED (status) == 0)
> return -1;
>
> return WEXITSTATUS (status);
> }
Hmpf. That seems to rule out that theory. Gnatlink is still spawning the
gcc driver to link, rather than the linker itself; maybe the driver's doing
something wrong? Is collect-ld a shell script or an executable on your host?
cheers,
DaveK