From: kelley.r.cook@gm.com
To: gcc-help@gcc.gnu.org
Subject: Running into troubles Building a MinGW compiler using Cygwin
Date: Thu, 11 Apr 2002 13:16:00 -0000 [thread overview]
Message-ID: <85256B98.006DA725.00@usabhmg02.mail.gm.com> (raw)
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
reply other threads:[~2002-04-11 19:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=85256B98.006DA725.00@usabhmg02.mail.gm.com \
--to=kelley.r.cook@gm.com \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).