🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.sgi.misc
3 messages
3 total messages Started by gandalf Mon, 13 Oct 1997 00:00
Compiling for all IRIX platforms
#399
Author: gandalf
Date: Mon, 13 Oct 1997 00:00
51 lines
2459 bytes
I compiled an executable on this platform:

    % uname -a
    IRIX64 hostname 6.2 03131016 IP19

using gcc version 2.7.2

On another Irix 6.2 machine, the executable fails to run (I have
no uname output for that machine).  When I do a 'file' command on
my executable, I get:

a.out:          ELF 32-bit MSB mips-2 dynamic executable MIPS - version 1

Compiling with various compilation flags, I get:
% gcc -mips1 test.c
% file a.out
a.out:          ELF 32-bit MSB mips-2 dynamic executable MIPS - version 1
% uname -a
IRIX64 shellx 6.2 03131016 IP19
% gcc -v
Reading specs from /usr/local/lib/gcc-lib/mips-sgi-irix5.3/2.6.3/specs
gcc version 2.6.3
% gcc -mips2 test.c
% file a.out
a.out:          ELF 32-bit MSB mips-2 dynamic executable MIPS - version 1

% cc -mips1 test.c
% file a.out
a.out:          ELF 32-bit MSB mips-2 dynamic executable MIPS - version 1
% cc -mips2 test.c
% file a.out
a.out:          ELF 32-bit MSB mips-2 dynamic executable MIPS - version 1
% cc -mips3 test.c
% file a.out
a.out:          ELF 64-bit MSB mips-3 dynamic executable MIPS - version 1
% cc -mips4 test.c
% file a.out
a.out:          ELF 64-bit MSB mips-4 dynamic executable MIPS - version 1


According to the online docs, using the '-mips1' flag should generate
an executable that runs on all SGI platforms, but I can't seem
to get any compilre to produce an executable whose file type is
'ELF 32-bit MSB mips-1 dynamic executable MIPS - version 1'.
Is there anything else to do to generate a 'lowest common denominator'
executable?  How do I get a compiler to generate a
'ELF 32-bit MSB mips-2' executable?  Thanks in advance.

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet
Re: Compiling for all IRIX platforms
#397
Author: Martin Knoblauch
Date: Tue, 14 Oct 1997 00:00
46 lines
2594 bytes
gandalf@viman.com wrote:
> 
> 
> According to the online docs, using the '-mips1' flag should generate
> an executable that runs on all SGI platforms, but I can't seem
> to get any compilre to produce an executable whose file type is
> 'ELF 32-bit MSB mips-1 dynamic executable MIPS - version 1'.
> Is there anything else to do to generate a 'lowest common denominator'
> executable?  How do I get a compiler to generate a
> 'ELF 32-bit MSB mips-2' executable?  Thanks in advance.
> 
Gandalf,

 the simple/short answer is: you can't generate "mips1" binaries
under 6.2. We dropped support for the R3000 and therefore the
minimum mips-level for 6.2 capable systems is "mips2". As this
is so, all of the system binaries (including crt1.o and crtn.o)
are "misp2". Linking with them will make the resulting executable
automatically "mips2".

 There are two ways to generate "mips1" images:

- compile/link under 5.3. This is the official way and will
  guarantee upward compatibility
- try to build a "mipsABI" binary. These are by definition "mips1".
  Certain restrictions apply to what functions/syscalls you are
  allowed to use in such a program. The libraries for linking
  are located in "/usr/lib/abi". You need to install (at least)
  the following subsystems:

  compiler_dev.sw.abi
  dev.sw.abi

Hope this helps
Martin
-- 
+---------------------------------+-----------------------------------+
|Martin Knoblauch                 | Silicon Graphics GmbH             |
|Manager Technical Marketing      | Am Hochacker 3 - Technopark       |
|Silicon Graphics Computer Systems| D-85630 Grasbrunn-Neukeferloh, FRG|
|---------------------------------| Phone: (+int) 89 46108-179 or -0  |
|http://reality.sgi.com/knobi     | Fax:   (+int) 89 46107-179        |
+---------------------------------+-----------------------------------+
|e-mail: <knobi@munich.sgi.com>   | VM: 6-333-8179 | M/S: IDE-3150    |
+---------------------------------------------------------------------+
Re: Compiling for all IRIX platforms
#398
Author: Scott Henry
Date: Tue, 14 Oct 1997 00:00
18 lines
1246 bytes
>>>>> "g" == gandalf  <gandalf@viman.com> writes:

g> I compiled an executable on this platform:
g>     % uname -a
g>     IRIX64 hostname 6.2 03131016 IP19

g> using gcc version 2.7.2

g> On another Irix 6.2 machine, the executable fails to run (I have
g> no uname output for that machine). 

What is the error message that you get when the executable fails?

-- 
 Scott Henry <scotth@sgi.com> /  Help! My disclaimer is missing!
 IRIX MTS,                   /  GIGO *really* means: Garbage in, Gospel Out
 Silicon Graphics, Inc      /  http://reality.sgi.com/scotth/
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads