cross gcc 2.96 for IA64

Kai Ruottu karuottu@mbnet.fi
Fri Jun 18 09:21:00 GMT 2004


Co Ngai Fung wrote:

> On Wed, 16 Jun 2004, Daniel Kegel wrote:
>>Co Ngai Fung wrote:
>>>I am trying to use the crosstool to build the cross compiler
>>>gcc 2.96 for IA64, I have add the line
>>>	#define HOST_BITS_PER_WIDE_INT 64
>>>	#define HOST_WIDE_INT long long
>>>to the file gcc/config/i386/xm-i386.h
>>>
>>>and have the following error,
>>>
>>>In file included from /build/crossgcc/crosstool-0.28-rc23/build/ia64-unknown-linux-gnu/gcc-2.96-20000731-glibc-2.2.5/gcc-2.96-20000731/gcc/config/ia64/frame-ia64.c:128:
>>>/build/crossgcc/crosstool-0.28-rc23/build/ia64-unknown-linux-gnu/gcc-2.96-20000731-glibc-2.2.5/gcc-2.96-20000731/gcc/frame.c: In function `fde_merge':
>>>/build/crossgcc/crosstool-0.28-rc23/build/ia64-unknown-linux-gnu/gcc-2.96-20000731-glibc-2.2.5/gcc-2.96-20000731/gcc/frame.c:224: structure has no member named `pc_begin'
>>>/build/crossgcc/crosstool-0.28-rc23/build/ia64-unknown-linux-gnu/gcc-2.96-20000731-glibc-2.2.5/gcc-2.96-20000731/gcc/frame.c:224: structure has no member named `pc_begin'
>>>make[2]: *** [libgcc/./frame-ia64.o] Error 1
>>
>>No idea, sorry.  Any chance you can use a newer compiler?
>>gcc-3.4.0 is pretty good, isn't it?
> 
> I need to have a gcc for redhat advanced server 2.1 for ia64,
> and it is using the gcc 2.96
>
>>(Also, where did you get that gcc?
>>ftp://updates.redhat.com/7.3/en/os/SRPMS/gcc-2.96-113.src.rpm, perhaps?
>>Or is there an authoritative source for gcc-2.96 for ia64?)
>
> Yes, I am using this source.

  For RedHat's AS 2.1 the logical sources for a cross-GCC would be the newest
from the RedHat updates :

   ftp.redhat.com/pub/redhat/linux/updates/enterprise/2.1AS/en/os/SRPMS

or from its mirrors like at :

   ftp://ftp.funet.fi/pub/mirrors/ftp.redhat.com/pub/redhat/...

The up-to-date SRPMS for gcc-2.96 and glibc-2.2.4 seemed to be :

gcc-2.96-128.7.2.src.rpm 	13060 KB 	14.4.2004 	18:01:00
glibc-2.2.4-32.15.src.rpm 	11048 KB 	17.4.2004 	0:10:00

  I would assume the AS 2.1 owners having updated their systems with the newest
RPMS (prebuilt binaries) but unless one has an access to a AS 2.1 server, one
must be content with the sources only, the prebuilt binaries are not available
for non-licensees...

  However one could think to bootstrap with the home-user distribution, the
RedHat 7.2/ia64, which has its 'glibc-2.2.4' (with local fixes), available
as binaries too, one possible mirror site could be :

   ftp://mirror.mcs.anl.gov/pub/redhat/redhat/linux/7.2/en/os/ia64/RedHat/RPMS/

  One year ago this site still seemed to have that stuff. So unless one really
doesn't want to start from scratch, the first, and most probably also the final,
GCC can be built with the RedHat 7.2/ia64 glibc. Then build the final glibc from
the proper AS 2.1 sources and if one is paranoid, rebuild the GCC with the final
glibc... It would be interesting to see whether the resulted libiberty and
libstdc++ binaries have any difference between the GCC "stage1" (with the RH 7.2
glibc) and "stage2" (with the self-built AS 2.1 glibc) builds...  Native GCC
builders seem to not rebuild all their GCCs after updating the native glibc
although there would be more reasons for that, the GCC binaries were linked
against the old glibc... But if doing that, the logical next step would be to
rebuild the whole Linux distribution against the new glibc ! "If you will give
your little finger to the devil, it will take your whole arm !"

  I had the original RH 7.1 gcc-2.96-54 sources with some patches with them, to
be installed or maybe already installed, haven't checked...  Anyway trying to
build them for the 'ia64-linux-gnu' target on two Linux systems with gcc-2.95.3
gave the same result: the produced 'xgcc' or 'cc1' crashed when trying to do
something:

/home3/src/gcc-2.96-20000731/build/gcc/xgcc
  -B/home3/src/gcc-2.96-20000731/build/gcc/
  -B/home3/src/gcc-2.96-20000731/build/ia64-linux-gnu/newlib/
  -isystem /home3/src/gcc-2.96-20000731/build/ia64-linux-gnu/newlib/targ-include
  -isystem /home3/src/gcc-2.96-20000731/newlib/libc/include
  -B/usr/local/ia64-linux-gnu/bin/
  -B/usr/local/ia64-linux-gnu/lib/
  -isystem /usr/local/ia64-linux-gnu/include -S tmp-dum.c
make[1]: *** [s-under] Segmentation fault (core dumped)
make[1]: Leaving directory `/home3/src/gcc-2.96-20000731/build/gcc'
make: *** [all-gcc] Error 2

  Maybe those patches included with the 'gcc-2.96-54.src.rpm' weren't installed
yet or something but only for curiosity one could think to start with the RH 7.x
GCC sources for (only?) Linux/x86...

  Using the proper AS 2.1 sources for ia64 however is the right way...

  The 'newlib' directories here are wacky, I really didn't use '--with-newlib' or
had the newlib sources installed upon the gcc-2.96-20000731 sources. Seemingly
the RedHat people then used some 'quick and dirty' workarounds for some "totally
from scratch" purposes...

Cheers, Kai








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



More information about the crossgcc mailing list