cross-compiler intel -> powerpc-gnu-linux

Brendan Simon
Mon Jun 12 17:52:00 GMT 2000

Hi Bob,

I remember this problem and it is very frustrating.  I can't rember how 
I solved it.  I'll have to look through my build scripts when I get 
home.  I have a feeling that I had the "preinstall" the header files 
manually.  ie. copy header files to $prefix/$target/include.  Also make 
sure the linux header files are there too.  I usually just use a 
symbolic link to the kernel headers.  Make sure it is not the kernel 
headers for your host (ie. /usr/include/linux or 
/usr/src/linux/include/linux) as the asm symbolic link will be wrong.
I can't be more specific at this stage but will have a better idea of 
what I did when I look at my build scripts.

BTW: I think the binutils I used was  I'm sure there is a 
later version now.  I got it from H.Lu's site at vasystems.  I can't 
remeber the URL at the moment but I'm sure it must be in the archives 
somewhere.  I know that 2.9.1 is outdated and some problems were fixed 
for the powerpc.

Brendan Simon.

Bob Robison wrote:
> I have been reading through the archives (which have been very helpful) -- but I am still having
> problems building the cross-compiler I want.  My setup is:
> gcc-2.95.2    glibc-2.1.3  binutils-2.9.1
> Binutils seems to build with no problems.  My configure line for gcc (from a build directory) is:
> .../gcc-2.95.2/configure --target=powerpc-gnu-linux --prefix=/usr/crosslinux \
> --exec-prefix=/usr/crosslinux --program-suffix=linppc -v --enable-languages=c \
> --with-headers=/usr/local/temp/glibc-2.1.3/include
> The problem I have is exactly the same as what Brendan Simon reported on January 24th:
> The --with-headers line copies everything from glibc-2.1.3/include into a sys-include directory
> (in my case: /usr/crosslinux/powerpc-gnu-linux/sys-include)  But some of these files reference
> include files that are one level up.  i.e. sys/cdefs.h is a single line file that includes
>   This misc directory is in the glibc-2.1.3 main directory -- but I'm not sure
> how to reference it.  I don't think I should set my --with-headers= argument to reference the whole
> glibc-2.1.3 directory!
> Any ideas? 
> (output below is snipped from the output of >make LANGUAGES=c all install
> --------------------
> make[3]: Entering directory &pi0;/usr/local/temp/gcc-build/gcc'
> rm -f tmplibgcc2.a
> for name in _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2
> _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf _fixunsdfsi _fixunssfsi _fixunsdfdi
> _fixdfdi _fixunssfdi _fixsfdi _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi _fixtfdi _fixunstfdi
> _floatditf __gcc_bcmp _varargs __dummy _eprintf _bb _shtab _clear_cache _trampoline __main _exit
> _ctors _pure; \
> do \
>   echo ${name}; \
>   /usr/local/temp/gcc-build/gcc/xgcc -B/usr/local/temp/gcc-build/gcc/
> -B/usr/crosslinux/powerpc-gnu-linux/bin/ -I/usr/crosslinux/powerpc-gnu-linux/include -O2 
> -DCROSS_COMPILE -DIN_GCC -DHAIFA    -g -O2 -I./include  -fPIC -g1  -DIN_LIBGCC2
> -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc   -mstrict-align -I. -I../../gcc-2.95.2/gcc
> -I../../gcc-2.95.2/gcc/config -I../../gcc-2.95.2/gcc/../include -c -DL${name} \
>        ../../gcc-2.95.2/gcc/libgcc2.c -o ${name}.o; \
>   if [ $? -eq 0 ] ; then true; else exit 1; fi; \
>   arlinppc rc tmplibgcc2.a ${name}.o; \
>   rm -f ${name}.o; \
> done
> _muldi3
> _divdi3
> _moddi3
> _udivdi3
> _umoddi3
> _negdi2
> _lshrdi3
> _ashldi3
> _ashrdi3
> _ffsdi2
> _udiv_w_sdiv
> _udivmoddi4
> _cmpdi2
> _ucmpdi2
> _floatdidf
> _floatdisf
> _fixunsdfsi
> In file included from
> /usr/crosslinux/lib/gcc-lib/powerpc-gnu-linux/2.95.2/../../../../powerpc-gnu-linux/sys-include/featu
> res.h:250,
>                  from
> /usr/crosslinux/lib/gcc-lib/powerpc-gnu-linux/2.95.2/../../../../powerpc-gnu-linux/sys-include/limit
> s.h:26,
>                  from /usr/local/temp/gcc-build/gcc/include/limits.h:117,
>                  from include/syslimits.h:7,
>                  from include/limits.h:11,
>                  from ../../gcc-2.95.2/gcc/libgcc2.c:1105:
> /usr/crosslinux/lib/gcc-lib/powerpc-gnu-linux/2.95.2/../../../../powerpc-gnu-linux/sys-include/sys/c
> defs.h:1: misc/sys/cdefs.h: No such file or directory
> Please help!
> bob
> -----------
> This message was sent by XFMail at 16:43:09 on 12-Jun-00 by:
> Bob Robison          Southwest Research Institute,
> Staff Engineer             Signal Exploitation & Geolocation Division
>               Phone:(210)522-3935/Fax:(210)522-2709
> <><    <><    <><    <><    <><    <><    <><    <><    <><   Col 3:2

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list