autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Work around IRIX 6 ld bug creating executables


From: Akim Demaille
Subject: Re: Work around IRIX 6 ld bug creating executables
Date: Mon, 09 Feb 2004 14:52:48 +0100
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

 > The following patch arised when building current GCC mainline on IRIX 6.5
 > with GNU as:

 >      http://gcc.gnu.org/ml/gcc-patches/2004-02/msg00592.html

 > Consider the following configure.ac:

 > AC_INIT(aout_perm, 0.1)
 > touch a.out
 > AC_PROG_CC

 > On IRIX 6, configure fails like this:

 > $ ./configure 
 > checking for gcc... gcc
 > checking for C compiler default output... a.out
 > checking whether the C compiler works... configure: error: cannot run C 
 > compiled programs.
 > If you meant to cross compile, use `--host'.
 > See `config.log' for more details.

 > This happens because ld writes into an existing a.out instead of removing
 > it first or making it executable.

 > The following patch fixes this, and introduced no testsuite failures.

 >      Rainer

 > -----------------------------------------------------------------------------
 > Rainer Orth, Faculty of Technology, Bielefeld University


 > Fri Feb  6 22:18:33 2004  Rainer Orth  <address@hidden>

 >      * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Remove
 >      default executables first to avoid IRIX 6 ld bug.

It looks good, but isn't there another bug?  Where is this a.out
coming from originally?

 > Index: lib/autoconf/lang.m4
 > ===================================================================
 > RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/lang.m4,v
 > retrieving revision 1.168
 > diff -u -p -r1.168 lang.m4
 > --- lib/autoconf/lang.m4     30 Jan 2004 14:21:36 -0000      1.168
 > +++ lib/autoconf/lang.m4     6 Feb 2004 21:16:52 -0000
 > @@ -467,6 +467,10 @@ m4_define([_AC_COMPILER_EXEEXT_DEFAULT],
 >  # of exeext.
 >  AC_MSG_CHECKING([for _AC_LANG compiler default output file name])
 >  ac_link_default=`echo "$ac_link" | sed ['s/ -o *conftest[^ ]*//']`
 > +# The IRIX 6 linker writes into existing a.out or similar files which may
 > +# not be executable, retaining their permissions.  Remove them first so
 > +# a subsequent execution test works.
 > +rm -f a.out a.exe b.out
 >  AS_IF([AC_TRY_EVAL(ac_link_default)],
 >  [# Find the output, starting from the most likely.  This scheme is
 >  # not robust to junk in `.', hence go to wildcards (a.*) only as a last








reply via email to

[Prev in Thread] Current Thread [Next in Thread]