This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: PATCH to top level: don't use dirname in configure
- To: binutils at sources dot redhat dot com, gcc-patches at gcc dot gnu dot org, gdb-patches at sources dot redhat dot com
- Subject: Re: PATCH to top level: don't use dirname in configure
- From: msokolov at ivan dot Harhan dot ORG (Michael Sokolov)
- Date: Sat, 22 Jul 00 10:42:11 CDT
Eli Zaretskii <eliz@delorie.com> wrote:
> This assumes that (a) $(progname) always expands to "configure", and
> (b) that the last delimiter is '/'. I don't know whether the first
> assumption is true on each supported system, but the second might be
> wrong on DOS/Windows where a backslash might be used instead.
Both of these assumptions are already being made extensively by the rest of the
very same Cygnus configure script. The use of dirname there was actually out of
line with respect to the rest of the script, and my patch makes it the same as
the rest of the script.
> In contrast, `dirname' (when it exists) will always DTRT, because it
^^^^^^^^^^^^^^
> is tailored to the host system.
That's where the problem lies. As Alexandre Oliva <aoliva@redhat.com> wrote,
: Unfortunately, `dirname' is too far from being portable. We must not
: depend on its existence.
GCC, Binutils, and GDB must be usable as add-ons to existing UNIX systems. At
least one of these systems, 4.3BSD, doesn't have dirname. Therefore, the
current top-level configure behaviour is unacceptable for GCC, Binutils, and
GDB.
My patch fixes an existing problem that must be fixed, and it cannot introduce
new problems that didn't exist before (as it does the same thing the rest of
the script does), therefore, it should be checked in.
--
Michael Sokolov Harhan Engineering Laboratory
Public Service Agent International Free Computing Task Force
International Engineering and Science Task Force
615 N GOOD LATIMER EXPY STE #4
DALLAS TX 75204-5852 USA
Phone: +1-214-824-7693 (Harhan Eng Lab office)
E-mail: msokolov@ivan.Harhan.ORG (ARPA TCP/SMTP) (UUCP coming soon)