IRIX 6 configuration sets MD_EXEC_PREFIX
Mark Mitchell
mark@markmitchell.com
Thu Sep 17 09:59:00 GMT 1998
>>>>> "Jim" == Jim Wilson <wilson@cygnus.com> writes:
Jim> I don't object to a similar scheme that works at configure
Jim> time instead of compile time. However, how are you going to
Jim> do the configure time check? Are you proposing testing to
Jim> see if the first ld on the user's path works?
No. We don't check to see if `rm' works at configure-time. Instead,
we expect that the `rm' in the builder's path removes files. I
suggest just looking for `ld' at configure-time, falling back on
expected defaults (/usr/ccs/bin/ld, etc.) if no `ld' is found. If the
builder specifies a bad `ld', things will break. But, that's at
configure/build time, not at run-time, so I doubt you'll see nearly so
many false bug reports. Note that this scheme, like the
MD_EXEC_PREFIX bit, avoids searching the path at run-time, which is
what leads to the confusion. All I'm suggesting is to calculate
MD_EXEC_PREFIX, rather than hard-wiring it into a configuration file.
I guess I would propose the following search order:
o ld in --prefix/bin, if any
o ld found at configure-time, if any
o ld in MD_EXEC_PREFIX/bin, if any
o ld in PATH
The first bullet handles the one-tree build case, and the typical
case for installing GNU binutils. Then, we fall back on the `ld' the
original builder of GCC had in her path at build-time. Next, the `ld'
that we expect the system to have. Finally, as a last resort, we
search the PATH.
Jim> This seems like an awful lot of trouble to me. Adding a
Jim> MD_EXEC_PREFIX_1 macro would be easier.
I'll leave the decision in your capable hands. I think I'm out of my
depth in terms of all of the cross-compilation issues. But, I think
the important issue is that GCC should behave in as much the same way
as possible on all targets. So, if GCC searches the path to find `ld'
on Linux, it should do so on Irix. Certainly, if it does so on a
system like Solaris (where you can use the non-GNU linker), it should
do so on Irix. But, I really don't see why whether or not the system
linker is the GNU linker should make a difference.
Of course, we need some way to fall back on an expected location for
these tools. On Linux, they are probably in /usr/bin, on Irix in
/opt/MIPSpro/bin or /usr/bin, and on Solaris in /usr/ccs/bin, if
memory serves. I'm not suggesting that users should have to put these
directories in their path.
Right now the behavior is inconsistent acrros platforms. That's
confusing. Adding MD_EXEC_PREFIX_1 won't undo that inconsistency.
--
Mark Mitchell mark@markmitchell.com
Mark Mitchell Consulting http://www.markmitchell.com
More information about the Gcc
mailing list