This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Cross Compiler Install questions


I was hoping someone could help me out with what appears to be a fairly common problem with 
but with a little different twist.

I am building a cross compiler ( host=hppa1.1-hp-hpux10.20    target=powerpc-linux-gnu)
and I read that glibc should be used instead of newlib when the target is a linux system.
Can someone verify if this is true.  

In my first installation, I used newlib, created the links:
	cd /gcc_source_dir/
	ln -s /newlib_source_dir/newlib   newlib
	ln -s /newlib_source_dir/libgloss  libgloss

to get past the annoying "stdlib.h: no such fie or directory" message, and the Make went fine.
In testing, I discovered a problem with the loader, so I went through another iteration of the cross compiler installation.
(changed  target from "powerpc-*-linux-gnu*"  to "powerpc-linux-gnu",  The * character in the path screwed up the loader scripts)

This time Make stops with the following error message:

	/home/gnu/gcc/gcc-2.95.2/libio/libio.h:30: _G_config.h: No such file or directory
	make[1]: *** [iogetline.o] Error 1
	make[1]: Leaving directory '/home/gnu/gcc/gcc-2.95-build2-powerpc/powerpc-linux-gnu/libio'
	make: *** [all-target-libio] Error 2

In troubleshooting, the message board mentioned that linux targets must use glibc instead of newlib.
So I removed newlib source, removed the links, untared glibc and proceeded with a new config and make.

Now I get the popular error message:
	....../libgcc2.c:41: stdlib.h: No such file or directory
	....../libgcc2.c:42: unistd.h: No such file or directory

I tried to look for documentation for this problem, but the only thing I can find is the fix relating to newlib. 
Does anyone know how to handle this problem using glibc?

I searched the glibc source directory and found those two files at:
	/glibc_source/include/stdlib.h
	/glibc_source/stdlib/stdlib.h
	/glibc_source/include/sys/unistd.h
	/glibc_source/indluce/unistd.h
	/glibc_source/posix/sys/unistd.h
	/glibc_source/posix/unistd.h

I tried linking the two files  to the source directory of gcc, but make failed at the same spot
	cd /gcc_source/gcc
	ln -s /glibc_source/include/stdlib.h  stdlib.h

Can someone please verify if I'm on the right path?
That I must use glibc and any tips for getting past my 2 roadblocks.

	stdlib.h , no such file  
	_G_config.h, no such file 


Thanks, 
Masaki

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]