This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Why use '/proc/self/exe' in prims.cc?
- From: Andrew Haley <aph at redhat dot com>
- To: Ranjit Mathew <rmathew at hotmail dot com>
- Cc: java at gcc dot gnu dot org
- Date: Thu, 7 Nov 2002 12:37:58 +0000 (GMT)
- Subject: Why use '/proc/self/exe' in prims.cc?
- References: <aqdkai$6gi$1@main.gmane.org>
Ranjit Mathew writes:
> Hi,
>
> The subject sums it up: the libgcj configure
> script sets HAVE_PROC_SELF_EXE if /proc/self/exe is
> present and prims.cc sets _Jv_ThisExecutable using
> the value of /proc/<curr-pid>/exe. If this is not
> defined, the fallback is to use argv[0].
>
> The problem is that autoconf-generated configure dies
> out during a cross-compiling (if with_cross_host is
> defined) saying that "Cannot check existence of
> file during cross-compiling".
>
> What is wrong with using just argv[0]?
argv[0] isn't an absolute pathname.
Andrew.