🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++
Article #240

cross-compiling on SPARC architectures

#240
From: Paul Otto
Date: Mon, 15 Jan 1990 17:21
24 lines
1762 bytes
Using g++ (version 1.35.1-) we found that programs compiled on
SUN-4/110's (running SunOS 4.0) would run OK on SparcStation-1's
(running SunOS 4.0.3c), but not vice versa.  In particular, programs
compiled on the SparcStations would crash with a segmentation violation
when we tried to run them on the 4/110's.


The reason for this (although I do not know exactly why!) is that
the SUN-4/110's use a system page size of 8192 bytes (in memory management etc),
and the SparcStation-1's use 4096 bytes.  As distributed, the GNU C++ linker
gets these numbers from the operating system at run time (using the getpagesize
system call), and uses them to align binaries appropriately.
This meant that binaries compiled on the 110's would work on the SparcStations
but the reverse wasn't always true.  If "newld.c" in the g++ source is hacked
so that the linker thinks that the page size is 8192 on SparcStations, this
problem appears to go away.  (BTW: SparcStation 4/370's have a page size of 8192.)

Paul
-----------
Paul Otto, Canon Research Centre Europe Ltd.,
19/20 Frederick Sanger Rd, Surrey Research Park, Guildford, Surrey, GU2 5YD, UK.
NRS: otto@uk.co.canon	ARPA: otto%uk.co.canon@nsfnet-relay.ac.uk
UUCP: otto@canon.uucp	PATH: ..!mcvax!ukc!uos-ee!canon!otto
Tel: +44 (0) 483 574325		Fax: +44 (0) 483 574360
Technical Details
Message-ID: <9001151721.AA16710@dido.canon>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!NSFNET-RELAY.AC.UK!otto%canon.uucp

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!NSFNET-RELAY.AC.UK!otto%canon.uucp
From: otto%canon.uucp@NSFNET-RELAY.AC.UK (Paul Otto)
Newsgroups: gnu.g++
Subject: cross-compiling on SPARC architectures
Message-ID: <9001151721.AA16710@dido.canon>
Date: 15 Jan 90 17:21:40 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 24