* Running into troubles Building a MinGW compiler using Cygwin
@ 2002-04-11 13:16 kelley.r.cook
0 siblings, 0 replies; only message in thread
From: kelley.r.cook @ 2002-04-11 13:16 UTC (permalink / raw)
To: gcc-help
I'm running into a bit of a snag attempting to build a MingW GCC 3.1 compiler
using cygwin. And I think I may have found a problem with the configure script.
As I understand it, it is a two part process.
First I had to build and install the cygwin-x-mingw toolchain and compilier,
making sure to copy MingW's include files and librarys into the build paths.
I think that I accompished this step without much difficulty. They are now in
my path and named i686-pc-mingw-{gcc,ld,as,ranlib ...}
Now I needed to run configure with the following options:
./src/configure --host=i686-pc-mingw32 --target=i686-pc-mingw32
--build=i686-pc-cygwin --disable-nls --enable-prefix=/cygdrive/c/mingw/local
make all install
Something that I am noticed is that when it scrolls through all of the configure
steps it repeatedly says:
---
checking whether the C compiler i686-pc-mingw32-gcc -g -O2 works... yes
checking whether the C compiler i686-pc-mingw32-gcc -g -O2 is a
cross-compiler... no
---
Except that, of course, it is a cross-compiler. Now maybe this doesn't actually
matter, but it still seems to be incorrect.
Glancing through the configure script, I think it comes from the following
fragment.
----
if { (eval echo configure:1234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } &&
test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
ac_cv_prog_cc_cross=no
else
ac_cv_prog_cc_cross=yes
fi
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_prog_cc_works=no
fi
rm -fr conftest*
----
This doesn't work in this instance since under the cygwin environment you can
run any ordinary win32 program (which mingw creates) therefore the ./conftest
executes and the test fails.
My questions are:
a) Am I way off-base in my deductions?
b) Is there an easy way to fix this test? (checking for build !=host might
work)
c) Barring that, is there a way to override the test and tell configure that
i686-pc-mingw32 is a cross-compiler?
Or should I just ignore it, since the cross-compile flag doesn't actually matter
and the reason why libstdc++-v3 dies with "configure: error: unable to detect
exception model" is for a completely different reason.
--
Kelley Cook
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-04-11 19:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-11 13:16 Running into troubles Building a MinGW compiler using Cygwin kelley.r.cook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).