From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,d074c5bd2f09a068 X-Google-Attributes: gid111c93,public From: Aurel Balmosan Subject: Re: 32-bit compilation environment Date: 1997/08/17 Message-ID: #1/1 X-Deja-AN: 264807955 X-Nntp-Posting-Host: 194.122.136.143 Sender: news@orga.com (News System) References: <87rac3xm7l.fsf@spudboy.i-have-a-misconfigured-system-so-shoot-me> Organization: ORGA Kartensysteme GmbH Newsgroups: comp.os.linux.alpha Gene McCulley 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 =========================================================