From: Joerg Bruehe <joerg@sql.de>
Subject: Re: newbie confusion
Date: Wed, 06 Feb 2002 10:12:15 +0100 [thread overview]
Message-ID: <3C60F36F.48035B66@sql.de> (raw)
In-Reply-To: 77b348b9.0202060042.240597a1@posting.google.com
Hi Anonymous!
TiHKAL wrote:
>
> [...] On alpha ports of linux, if one has source to programs (such as
> cdr burning tools/dvd movie players/games etc.) is it up to the
> programmer to provide source for alpha for the program to work, or is
> it merely that you just compile the source on your own alphabox, and
> this optimizes the program to run on alphalinux?
"It depends":
The programmer is not bound to do anything, s/he delivers the source
code "as is" without any obligations.
Assuming the code is syntactically correct, you can give it to
compiler and linker (in most cases: "gcc") and will get a binary for
an Alpha CPU (assuming the source is pure C or other portable language,
not including "asm" stuff - which might be used in some programs).
Whether that binary executable really works on Alpha depends on the
program being "64-bit clean" - it is possible to write C code that
does contain (implicit or explicit) assumptions about some basic
sizes which hold true on x86 but fail on Alpha.
(Some such cases may be detected by the compiler, so compilation /
linking would fail; some may go undetected.)
A very common case is to assume one can store a pointer in an "int"
variable - not true on Alpha, because here an address is 64 bit but
an "int" only 32 (use a "long" if necessary, that has 64 bit).
To overcome this porting problem, the Compaq C compiler and linker
have an option "-taso" (= "address short option"), resulting in
all addresses being less than 2 (or 4?) GB so they fit into an "int".
The compiler is available for Alpha-Linux as well, but I do not
know whether the options works in that version as well;
AFAIK there is no such option in the GNU "gcc".
> Basically I am a
> little baffled as to whether or not anything I could run on a
> slackware x86 box could also run on an alphabox running the slackware
> alpha port. Thanks in advance for help anyone wants to offer!
A Linux distribution for an Alpha CPU does contain most "standard"
packages with Alpha binaries, so most are provided.
For others, you may get the sources and compile them yourself,
but there may be code that is not clean enough to run on Alpha.
HTH,
Joerg Bruehe
--
Joerg Bruehe, SQL Datenbanksysteme GmbH, Berlin, Germany
(speaking only for himself)
mailto: joerg@sql.de
next prev parent reply other threads:[~2002-02-06 9:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-06 8:42 newbie confusion TiHKAL
2002-02-06 9:12 ` Joerg Bruehe [this message]
2002-02-06 17:56 ` Robert M. Riches Jr.
2002-02-06 15:17 ` Juhana Paavola
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