This is the mail archive of the crossgcc@sourceware.org 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]
Other format: [Raw text]

Re: gcc-4.1 Vs compat-g77-3.3.5-42.1 CROSSGCC


Denis wrote:
I have these packages instaled:

gcc-info-4.1.0-28.4
gcc-c++-4.1.0-28.4
libgcc-x86-4.1.0-28.4
gcc-fortran-4.1.0-28.4
gcc-4.1.0-28.4
libgcc-4.1.0-28.4

than I untar the gcc-3.3.5.tar.bz2.

I have to compile this old gcc without damage the new gcc
installed(becouse it will be used just to compile g77 sources).
This is a maillist for crosscompilers, so let's start with producing
a crosscompiler, not a "backported" native one...

For a crosscompiler you would usually require :

1. the GNU binutils sources
2. the GCC sources
3. the target C library binaries and headers

But when your target could be "basically" the same as the host,
the existing native binutils might be usable, so the 'gcc-3.3.5.tar.bz2'
for the 2. could be enough... This should include also the g77 parts,
no separate package for g77 being required.

But what could be your $target?

We can see you having gcc-4.1.0 as your current native GCC, but
what is your current native C library?  A 'glibc-2.5.something?  This
really doesn't have any other influence than that the executables made
for the $host will be linked against it.  The only thing to understand is
that GCC uses some C library when linking executables for something.
If you want to produce executables for running them somewhere else,
then you should use the C library made for this something !

You didn't tell if the "user" has an identical $host with yours :-(  So we
don't yet know WHERE the compiled "Corsika" application should run!
For this we would require some info for the aimed $target, from which
to take that missing target C library for the new crosscompiler!

Producing a gcc-3.3.5 with a gcc-4.1.0 and linking its binaries ('gcc', 'cc1',
'collect2',...) against some new glibc-2.5.x should work. But producing a
gcc-3.3.5 for your $host as the $target too, which uses the existing $host
glibc-2.5.x as the $target C library, may fail miserably :-( Producing
new GCCs which use some old glibc as the target C library, should work,
but not producing old GCCs which use some much newer glibc, this being
produced with some much newer GCC....


Please try the command :

$ /lib/libc.so.6

in your $host and see what it tells about the GCC used to compile the native
glibc....

So the assumption is that you would need a totally separate (from your native
$target stuff) crosstoolchain which produces executables for something else.
But maybe the produced executables should work also on your $host. For
instance a crosscompiler for Fedora 3 $target hosted on Fedora 6 $host. This
would use a glibc taken from Fedora 3 when linking apps but its own binaries
being produced for Fedora 6 host ! Of course all the apps made for FC3 with
it should work on FC6 too !


/usr/src/packages/SOURCES/gcc-3.3.5/gcc/f/com.c: At top level:
/usr/src/packages/SOURCES/gcc-3.3.5/gcc/f/com.c:11080: error:
conflicting types for âffecom_gfrt_basictypeâ
/usr/src/packages/SOURCES/gcc-3.3.5/gcc/f/com.h:236: error: previous
declaration of âffecom_gfrt_basictypeâ was here
In your case I would first look at these lines, maybe the reason is something simple..

But starting with some more sane goal could be much better... The common assumption
is that people will require older GCCs for producing apps for the older targets, never for
producing apps for the newer targets....


Ok, checking how well gcc-3.3.6 (the last bugfix-release in gcc-3.3) will succeed for
'g77' for targets like RH7.3, RH8, RH9, FC3, SuSE 9.2, SuSE 9.3 could be one kind
of "research which will not produce anything which wasn't known before". Surely there
are reports about how well gcc-3.3.x could be produced for these hosts/targets. Maybe
I will check which $target came with a native GCC near gcc-3.3.5 and try that as the
chosen $target...


I left writing this reply for a while and checked the FC3 target, producing a gcc-3.3.6 with
f77 seemed to work nicely, although it's native GCC was originally gcc-3.4.2... The next
try will be done with the SuSE 9.3 target which seemed to have a gcc-3.3.5 as it's native
GCC.... Again a success story expected....



-- For unsubscribe information see http://sourceware.org/lists.html#faq


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