From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,1e72e7e2b0ab6de2 X-Google-Attributes: gid111c93,public X-Google-ArrivalTime: 2002-02-06 01:12:18 PST Message-ID: <3C60F36F.48035B66@sql.de> Date: Wed, 06 Feb 2002 10:12:15 +0100 From: Joerg Bruehe Organization: SQL Datenbanksysteme GmbH X-Mailer: Mozilla 4.7 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.linux.alpha Subject: Re: newbie confusion References: <77b348b9.0202060042.240597a1@posting.google.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: server1.software-ag.de X-Trace: 6 Feb 2002 10:12:16 CET, server1.software-ag.de X-Complaints-To: usenet@ivm.net X-Admin-Comment: X-NNTP-Posting... are valid if present Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!t-online.de!blackbush.xlink.net!blackbush.de.kpnqwest.net!news-in.ivm.net!news.ivm.net!server1.software-ag.de Xref: archiver1.google.com comp.os.linux.alpha:4827 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