Configure tries to run cross-compiled programs (when building crossgcc under cygwin)

Ralf Corsepius corsepiu@faw.uni-ulm.de
Thu Aug 22 16:50:00 GMT 2002


Am Don, 2002-08-22 um 08.38 schrieb Dan Kegel:
> Dan Kegel wrote:
> > Brett Hunt wrote ...
> > > [I'm building a cross-compiler on cygwin targetting x86 linux.
> > >  The build seems to progress fine until it tries to run 'ltconfig'
> > > for libstdc++.
> > >  It locks up on "checking whether a program can dlopen itself..."
> > (see http://gcc.gnu.org/ml/gcc-help/2002-05/msg00165.html )
> >
> > I'm running into the exact same thing (I'm trying to build a ppc405
> > cross-compiler, but the problem is the same).   For reference,
> > the cygwin gcc I'm using to build this cross-compiler is "2.95.3-5".
> > ...
> > in several places, configure tries to run
> > powerpc programs on windows, and I get an error dialog box.
The standard autoconf-2.13 check to detect crosscompilation is based on
trying to run a binary. Win however, sometimes actually _starts_ foreign
binaries and fails later, instead of refusing to execute foreign
binaries.

This issue has been fixed/worked around for a long time in newer
autoconf versions, but gcc still uses autoconf-2.13, so .. it is victim
of this issue.

> The script works fine on Linux, but fails on Cygwin.
> One suspicious difference is in gcc-build-ppc405/powerpc-linux/config.cache
> :
> in Linux, it has
>   ac_cv_prog_cc_cross=${ac_cv_prog_cc_cross=yes}
> but in Cygwin, it has
>   ac_cv_prog_cc_cross=${ac_cv_prog_cc_cross='no'}
> Now if only I could figure out gcc's configure system...
> I have no idea what is creating that setting.
It is the config.cache shared by all configure scripts for the target
and normally is generated by the first configure script to be run for
the target.

> (BTW, I'm building gcc3.0.2.  I think Brett had the problem in 3.0.4.)
You can try to preset the target's config.cache.

Eg. use something like this:

mkdir powerpc-linux
echo "ac_cv_prog_cc_cross=yes" > powerpc-linux/config.cache
<pathtosources>/configure --target=powerpc-linux [...]

Ralf




------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list