public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: Executing programs from new workstations on old workstations
       [not found] <616BE6A276E3714788D2AC35C40CD18D591195@whale.softwire.co.uk>
@ 2002-04-04  5:51 ` Rupert Wood
  0 siblings, 0 replies; 2+ messages in thread
From: Rupert Wood @ 2002-04-04  5:51 UTC (permalink / raw)
  To: 'Vogtberg Stefan'; +Cc: gcc-help

Stefan Vogtberg wrote:

> The executable programs can be started on this Sun but not on older
> workstations using SunOS 5.5.1.
:
> Which parameters will I have to change that the new Sun will produce
> executable programms that can be used on older workstations?

More likely the problem is linking against the libc on your newer
machine; Solaris 2.8 supports Solaris 2.5.1's symbols for backwards
compatibility but there's no forward compatibility the other way around.

Probably your best bet is to create a cross-compiler on your Solaris 2.8
box which targets sparc-sun-solaris2.5.1. To do this, you'll have to
first copy the headers and libraries from your old system to the newer
system; create directories under your GCC install prefix on the newer
machine

    sparc-sun-solaris2.5.1/sys-include
    sparc-sun-solaris2.5.1/lib

and copy the entire /usr/include tree from the old machine to the first,
and the contents of /lib (but you don't need the subdirectories) from
the old machine to the second. Then configure GCC with the options:

    --build=sparc-sun-solaris2.8
    --host=sparc-sun-solaris2.8
    --target=sparc-sun-solaris2.5.1
    --without-newlib

and, for good measure, you probably want:

    --enable-threads=posix

if Solaris 2.5.1 supports them - I'm afraid my Solaris doesn't go that
far back! Alternatively, you can put the headers and libraries somewhere
else and ask GCC to install them as part of the configure

    --with-headers=<wherever>
    --with-libs=<wherever>

and, in this case, --without-newlib is assumed.

Once you've done all that, run 'make' - not 'make bootstrap' - and
install it. You'll then have the unwieldly-named
'sparc-sun-solaris2.5.1-gcc' which will generate executables for the old
machine (but that should still run on the new one).

You should be able to get away with just building the cross compiler and
not a cross-assembler and linker.

Good luck,
Rup.

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

* Executing programs from new workstations on old workstations
@ 2002-04-04  3:16 Vogtberg Stefan
  0 siblings, 0 replies; 2+ messages in thread
From: Vogtberg Stefan @ 2002-04-04  3:16 UTC (permalink / raw)
  To: 'help-gcc@gnu.org'

I have started to use a GNU compiler version 2.95.3 for my C++ source on a
workstation (named 'snimi1' - see below) . The executable programs can be
started on this Sun but not on older workstations using SunOS 5.5.1 .
When I compile the same source using the same makefile with a GNU compiler
version 2.8.1 (on the 'snimi1-old' - see below) the executable programe can
be started on any workstation including the new one.
Which parameters will I have to change that the new Sun will produce
executable programms that can be used on older workstations?

Details of the two workstations (uname -a):
SunOS	snimi1-old	5.5.1	Generic		sun4m	sparc
SUNW,SPARCstation-20
SunOS	snimi1	5.8	Generic_108528-10 sun4u	sparc	SUNW,Sun-Fire-280R

Stefan Vogtberg
Institute for Medical Informatics, Statistics and Documentation
Graz, Austria

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

end of thread, other threads:[~2002-04-04 11:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <616BE6A276E3714788D2AC35C40CD18D591195@whale.softwire.co.uk>
2002-04-04  5:51 ` Executing programs from new workstations on old workstations Rupert Wood
2002-04-04  3:16 Vogtberg Stefan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).