Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: Aurel Balmosan <ab@oab.orga.com>
Subject: Re: 32-bit compilation environment
Date: 1997/08/17	[thread overview]
Message-ID: <EF2EHF.6ow@orga.com> (raw)
In-Reply-To: 87rac3xm7l.fsf@spudboy.i-have-a-misconfigured-system-so-shoot-me


Gene McCulley <mcculley@spudboy.iag.net> wrote:
> Is there any way currently or under development or even planned to
> support a 32-bit compilation environment under Linux/Alpha?  The
> source of the interest is a large (1.2 million lines of code) legacy C
> application that is not 64-bit clean.  If gcc is not a good answer,
> are there any commercially available compilers that are?

Hi,
We have done a 32bit to 64bit porting of about 500.000 lines of C code 
plus about 30.000 lines of esql code.
No problem at all. We used gcc 2.7.2.2 with -Wall for all source codes.
The source was mainly written from 1990 upto 1993. Don't think that a
warning from the gcc can be ignored before you check it. And don't think
that missing prototypes are not so important. They are! Because all pointers
are 64bit width and the default result type is int which is 32bit.
We used the warning and checking extension of the gcc for printf/scanf 
and that kind. Normally while porting a software you will find many bugs
even if the software is currently running without any (major) error on other
systems. 

Something like this:
void OUSTprotoError (char *message, ...)
#ifdef __GNUC__
        __attribute__ ((format (printf, 1, 2)));
#else
        ;
#endif

void OUSTstdWriteInFifo (char *fifo, char *format, ...)
#ifdef __GNUC__
        __attribute__ ((format (printf, 2, 3)));
#else
        ;
#endif

This is very important to find problems with long's and %d (which are not
compatible) (look into the gcc.info files) 

General change all long's to int's if they are not used to 
hold anonymous pointers.  In any case you will have to port 
the software. 

Good luck,

	Aurel.

-- 
=========================================================
Aurel Balmosan		  |aurel@xylo.owl.de, ab@orga.com
http://gaia.owl.de/~aurel/|Xylo: The way things are going
=========================================================



      parent reply	other threads:[~1997-08-17  4:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-08-09  4:00 32-bit compilation environment Gene McCulley
1997-08-10  4:00 ` Frank Sweetser
1997-08-10  4:00   ` Yan-Song Chen
1997-08-11  4:00 ` Andrew G. Morgan
1997-08-11  4:00 ` Richard Henderson
1997-08-17  4:00 ` Aurel Balmosan [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox