Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: cherkus@fastball.unimaster.com (Dave Cherkus)
Subject: Re: Porting 32-bit programs, using gcc
Date: Sun, 10 Apr 1994 17:43:38 GMT	[thread overview]
Message-ID: <Co218q.3y6@mv.mv.com> (raw)
In-Reply-To: 2nuhns$qb2@senator-bedfellow.MIT.EDU

In article <2nuhns$qb2@senator-bedfellow.MIT.EDU>, tuyo@mumford (Mike M. Tuyo) writes:
|> I'm trying to port a *huge* program written for a 32-bit machine
|> to the alpha, and my resident compiler is gcc (2.5.7).  It seems
|> to have quite a bit of problems with the longs being 8-bytes wide.
|> 
|> Can someone tell my what options to give gcc so it makes longs 4-bytes
|> wide instead of 8?
|> 
|> Thank you
|> -mike tuyo.

Even if gcc had such a flag, its use would be problematic because any
code you would link to would be build assuming that longs are eight
bytes wide.  Even if you could recompile all user mode code, the system
call interface is coded that way as well so you would have to fix up
all parameters to the system calls that were longs.  I think you can
see that there is a lot more to this than a compiler flag.  Some people
claim success with typedefs or global substitutions to avoid the
problem, but again you need to make sure that all code that interfaces
with libraries provides the properly sized arguments to those
libraries.  Others report that 'lint -Q' helps find portability
problems.

BTW Mike your news software doesn't include your proper email
address (i.e. tuyo@mumford is insufficient).
--  
Dave Cherkus          UniMaster, Inc.         cherkus@unimaster.com 


  reply	other threads:[~1994-04-10 17:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-04-06 14:42 Porting 32-bit programs, using gcc Mike M. Tuyo
1994-04-10 17:43 ` Dave Cherkus [this message]
1994-04-13 15:20   ` Ken Steube
1994-04-14  6:56     ` Burkhard Neidecker-Lutz
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