This is the mail archive of the
mailing list for the GCC project.
Re: Pls help me to compile gcc in windows98 and x86 cpu, thank you!!
On Thursday 29 August 2002 09:05, Janis Johnson wrote:
> On Thu, Aug 29, 2002 at 09:16:44AM +0800, Jie Zhang wrote:
> > ----- Original Message -----
> > From: "dongkui" <email@example.com>
> > To: <firstname.lastname@example.org>; <email@example.com>
> > > All,
> > >
> > > Could anyone give me some clear instructions on howto compile gcc in
> > windows 98 & x86 cpu, I've
> > > tried under cygwin, but don't know the clear steps. pls give me these
> > clear steps, thanks a lot.
> Yes, but building on Cygwin requires additional information that isn't
> included there. The Host/target specific installation notes from that
> document should include some information about building on Cygwin, or at
> least links to such information. Would someone familiar with building
> on Cygwin please send such information? It will require a patch to
> doc/install.texi, but if you supply the text I'll help you turn it into
> a patch. Same goes for mingw.
Not so much additional information, thanks to people who have got a
reasonable degree of cygwin support patched in to gcc.
Most of the reported successes include
installing the cygwin tools required to build gcc
(gcc, binutils, autoconf, make,bash,sed,perl,patch), same as on linux,
setting the CFLAGS, BOOT_CFLAGS, and CXXFLAGS,
which can be the same as for any other OS on the same architecture.
I have not been able to find the necessary advice on the FLAGS anywhere; no
doubt it is posted somewhere, so here is some:
CFLAGS and BOOT_CFLAGS should include '-O2 -pipe' and your choice of
architecture settings, CFLAGS must also include -g if g77 is to be capable of
building -g applications. Defaults work if you have enough time and disk
configure flags should include at least
--enable-threads=posix --enable-sjlj-exceptions --disable-shared
and a reasonable choice of which languages to build, e.g.
Ideally, some of those configure options would come up as defaults. Maybe
they won't, since someone always wants to disagree with success.
If you choose to install a separate binutils from the one which comes with
cygwin (for instance, you probably want to configure 16-byte alignment), use
the --with-as=... flag to make it work.
make bootstrap-lean can be run effectively with -j n, if you have a machine
with n logical processors. It takes a bit over 20 minutes on a 2.8Ghz 1 CPU
HT box with XP; not tremendously impressive, since linux can build java as
well in the same time, unless you have tried to build gcc on a Mac or an
In order to run testsuite, the cygwin dejagnu and expect must be installed,
followed by dejagnu 1.4.2, followed by your choice of fixes to target.exp.
I would consider it a forward step if someone with influence would think
about getting those accepted as standard for cygwin, but it may be that
everyone who uses cygwin to build gcc becomes too tiresome to have such
The testsuite driver (expect) will not work with make -j, so it is quite slow
(well over an hour on the fastest boxes). Make sure that you have numprocs
set to agree with the configuration of your system.
make install will spoil you, since there is no need to su.
When rebuilding, before applying patches, you should 'make clean' and remove
everything built under i686-pc-cygwin, but that's basically the same as for
If you want to use g77 -pg, you will need to build a separate copy of libg2c
with -pg added to CFLAGS, and specify that library in your link.