_G_config.h problems (missing header files, egcs 1.1.2, bleh)

Gareth Boden Gareth.Boden@cenes.co.uk
Wed Jun 16 07:49:00 GMT 1999

Hi folks,

I've looked in the FAQ and had a bit of a search on altavista and dejanews
and it wasn't too helpful so I'd be grateful if someone could share their
wisdom with me...

I'm trying to build (on an i686-pc-linux-gnu system) a compiler for
i586-pc-cygwin32-cross-i586-pc-linux-gnu to use to compile for an IDT
Winchip-based embedded system (incidentally, is i586 the best target to use
for IDT Winchip? Regardless, I'd like some help with my problem). It's my
understanding from lots of reading over the last few days that I need:

	0. binutils/gcc for i686-pc-linux-gnu. No problem. egcs-2.91.66

	1. binutils/gcc for i686-pc-linux-gnu-cross-i586-pc-cygwin32. I
built the cygwin-b20
	distribution and then egcs 1.1.2 release using the
	stuff and all seems well. i586-pc-cygwin-gcc compiles working code.
Also used to
	build cygwin32 newlib libraries.

	2. binutils/gcc for i686-pc-linux-gnu-cross-i586-pc-linux-gnu,
needed to build 	
	libraries for the target system. Seems odd to build such a thing,
but there ya go.
	3. Finally, a toolchain for the host-cross-target compiler that was
my ultimate aim.

Stage 0 does not need to concern me. Stages 1,2 and 3 all follow the same
build scheme:

Build cygwin release:
CC=gcc configure --build=xxx --host=xxx --target=xxx --prefix=xxx
--enable-languages=c++ -v
make -w LANGUAGES="c c++" all install

Then build egcs release:
CC=gcc configure --build=xxx --host=xxx --target=xxx --prefix=xxx
--enable-languages=c++ --with-newlib -v
cd gcc && make installdirs && cd .. && make -w LANGUAGES="c" all install

--enable-languages=c++ is used to prevent objc being build.
--with-newlib is used to prevent c headers being expected to be installed in
LANGUAGES="c" is used to try to minimise possibility of errors. The same
behaviour in stage 2 is observed with LANGUAGES="c c++"

The prefix for stages 1 and 2 is the same, to install the tools in a
temporary location.

Stage 1 was no problem (after a little editing of a few files, some of which
were blatantly wrong - eg #endifs with no preceding #if).

Stage 2 is causing huge headaches, and I had expected it to be the easiest!
cygwin does not build for stage 2 - the version of gcc supplied fails with
no message when compiling crtstuff.c. So I decided to build binutils, then
egcs, then newlib, instead. binutils builds fine but egcs is now causing
problems. When it gets along to libio/iogetline.c it complains about a
missing _G_config.h. Which is true, but it doesn't ever seem to attempt to
build it. If I change to the appropriate directory and try to make
_G_config.h it fails, complaining about sys/types.h, stdio.h, time.h and
signal.h being missing. For some reason this step succeeded for stage 1, and
_G_config.h builds fine, but the only difference I can see on the command
line is the addition of a 'winsup' include directory (which doesn't seem to
exist anyway).

Can anyone help? Has anyone built a ix86-cygwin32-cross-ix86-linux compiler
successfully on an ix86-linux system?

New CrossGCC FAQ: http://www.objsw.com/CrossGCC
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.

More information about the crossgcc mailing list