Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
* 32-bit compilation environment
@ 1997-08-09  4:00 Gene McCulley
  1997-08-10  4:00 ` Frank Sweetser
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Gene McCulley @ 1997-08-09  4:00 UTC (permalink / raw)



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?

-- 
Gene McCulley            Software Engineer           SAIC - ADST II - ModSAF DO
Home: mcculley@iag.net     Voice: 407-260-8790     http://www.iag.net/~mcculley
Work: mcculley@adstii.com        Voice: 407-306-4613          Fax: 407-306-4075
Debian related stuff: mcculley@debian.org



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 32-bit compilation environment
  1997-08-10  4:00 ` Frank Sweetser
@ 1997-08-10  4:00   ` Yan-Song Chen
  0 siblings, 0 replies; 6+ messages in thread
From: Yan-Song Chen @ 1997-08-10  4:00 UTC (permalink / raw)



Frank Sweetser (rasmusin@wpi.WPI.EDU) wrote:
: Gene McCulley <mcculley@spudboy.iag.net> writes:
: 
: > 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?
: > 
: 
: Unfortunatelly, I don't see any simple way that you can.  The 64 bit clean
: problems arises usually from assuming that pointers are the same size as a
: numerical type.  These assumptions aren't just in the compiler, they're in
: the whole OS - kernel libc, everything. So, you wouldn't need a 32 compiler
: suite, you'd need a 32 bit port - and that would kind of kill the
: portability thing. 
not really, in Digital UNIX, you can do it with its native C compiler.
cc -taso -xtaso_short
: 
: -- 
: Windows: I can play Doom!              |RedHat Linux 2.0.31pre-2 i486
: Linux: I can be a file server, be a Web|Because reboots are for upgrades!
: server, run the accounting package with|http://www.wpi.edu/~rasmusin/pgp.html
: twelve terminals AND play Doom!        |for pgp key.        frank sweetser

-- 
yansong chen
--
YChen@uh.edu



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 32-bit compilation environment
  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 ` Richard Henderson
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Frank Sweetser @ 1997-08-10  4:00 UTC (permalink / raw)



Gene McCulley <mcculley@spudboy.iag.net> writes:

> 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?
> 

Unfortunatelly, I don't see any simple way that you can.  The 64 bit clean
problems arises usually from assuming that pointers are the same size as a
numerical type.  These assumptions aren't just in the compiler, they're in
the whole OS - kernel libc, everything. So, you wouldn't need a 32 compiler
suite, you'd need a 32 bit port - and that would kind of kill the
portability thing. 

-- 
Windows: I can play Doom!              |RedHat Linux 2.0.31pre-2 i486
Linux: I can be a file server, be a Web|Because reboots are for upgrades!
server, run the accounting package with|http://www.wpi.edu/~rasmusin/pgp.html
twelve terminals AND play Doom!        |for pgp key.        frank sweetser



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 32-bit compilation environment
  1997-08-09  4:00 32-bit compilation environment Gene McCulley
  1997-08-10  4:00 ` Frank Sweetser
  1997-08-11  4:00 ` Richard Henderson
@ 1997-08-11  4:00 ` Andrew G. Morgan
  1997-08-17  4:00 ` Aurel Balmosan
  3 siblings, 0 replies; 6+ messages in thread
From: Andrew G. Morgan @ 1997-08-11  4:00 UTC (permalink / raw)
  To: mcculley


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?
> 
> --
> Gene McCulley            Software Engineer           SAIC - ADST II - ModSAF DO
> Home: mcculley@iag.net     Voice: 407-260-8790     http://www.iag.net/~mcculley
> Work: mcculley@adstii.com        Voice: 407-306-4613          Fax: 407-306-4075
> Debian related stuff: mcculley@debian.org

You might try investigating Microway (www.microway.com).

The NDP fortran compiler that they shipped with the Alpha we
bought from them is a 32-bit one: it requires a small patch to
the kernel to make it run.  I don't know if the same is true of
their C compiler.

Cheers

Andrew



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 32-bit compilation environment
  1997-08-09  4:00 32-bit compilation environment Gene McCulley
  1997-08-10  4:00 ` Frank Sweetser
@ 1997-08-11  4:00 ` Richard Henderson
  1997-08-11  4:00 ` Andrew G. Morgan
  1997-08-17  4:00 ` Aurel Balmosan
  3 siblings, 0 replies; 6+ messages in thread
From: Richard Henderson @ 1997-08-11  4:00 UTC (permalink / raw)



In article <87rac3xm7l.fsf@spudboy.i-have-a-misconfigured-system-so-shoot-me>,
Gene McCulley  <mcculley@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.

Not at present.  I've thought about it, but it is right down at the
bottom of the priority queue. 

It should not be extremely difficult to create one, perhaps a bit tedious
though.  The question for you will be is it less tedious than fixing your
application.  If you would like to persue this for real, contact me and
I'll point you in the right direction.


r~



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 32-bit compilation environment
  1997-08-09  4:00 32-bit compilation environment Gene McCulley
                   ` (2 preceding siblings ...)
  1997-08-11  4:00 ` Andrew G. Morgan
@ 1997-08-17  4:00 ` Aurel Balmosan
  3 siblings, 0 replies; 6+ messages in thread
From: Aurel Balmosan @ 1997-08-17  4:00 UTC (permalink / raw)



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
=========================================================



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1997-08-17  4:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` Richard Henderson
1997-08-11  4:00 ` Andrew G. Morgan
1997-08-17  4:00 ` Aurel Balmosan

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