IRIX 6 configuration sets MD_EXEC_PREFIX

Mark Mitchell
Wed Sep 16 22:55:00 GMT 1998

Jim --

  In iris6.h we have:

/* There is no GNU as port for Irix6 yet, so we set MD_EXEC_PREFIX so that
   gcc will automatically find SGI as instead of searching the user's path.
   The latter can fail when building a cross compiler if the user has . in
   the path before /usr/bin, since then gcc will find and try to use the link
   to the cross assembler which can't possibly work.  */

#define MD_EXEC_PREFIX "/usr/bin/"

  I was surprised when I realized that gcc was invoking /usr/bin/ld
instead of the ld in /opt/MIPSpro/... (which is in my path).  I
discovered this when I reported a bug in the SGI linker to SGI, and
was told that the bug was fixed in recent MIPSpro linkers.
  I don't find the argument in the comment too persuasive, although
I'm no expert on these issues.  In particular, doesn't the argument
there (regarding cross compilation) apply on *any* platform?
Furthermore, the documentation says:

     If defined, this macro is an additional prefix to try after
     `STANDARD_EXEC_PREFIX'.  `MD_EXEC_PREFIX' is not searched when the
     `-b' option is used, or the compiler is built as a cross compiler.

which may or may not mean that MD_EXEC_PREFIX is not searched in the
situation referred to in the comment.  I couldn't figure that out.

  As it stands, the only user-level way to get the compiler to use the
assembler/linker that I would like it to is to use COMPILER_PATH, I
think, or installing `real-ld' for collect2 to find.  I'm not sure if
`real-as' is searched for when compiling, but the documentation does
not seem to indicate that it is.

  I suggest removing the definition of MD_EXEC_PREFIX, since I find
the behavior that it engenders rather confusing.  What do you think?

Mark Mitchell
Mark Mitchell Consulting

More information about the Gcc mailing list