From drew@kinglear.cs.Colorado.EDU  Ukn Jul  3 19:30:50 1993
Received: from gossip.pyramid.com by SunSITE.unc.edu (4.1/tas-gen/1-30-93)
	id AA18203; Sat, 3 Jul 93 19:30:48 EDT
Received: from sword.eng.pyramid.com 
	by gossip.pyramid.com (5.61/OSx5.1a Pyramid-Internet-Gateway)
	id AA15281; Sat, 3 Jul 93 16:30:20 -0700
Received: by sword.eng.pyramid.com (5.61/Pyramid_Internal_Configuration)
	id AA22152; Sat, 3 Jul 93 16:30:02 -0700
Received: from goss.pyramid.com
	by sword.eng.pyramid.com (5.61/Pyramid_Internal_Configuration)
	id AA22121; Sat, 3 Jul 93 16:29:59 -0700
Received: from kinglear.cs.colorado.edu 
	by gossip.pyramid.com (5.61/OSx5.1a Pyramid-Internet-Gateway)
	id AA15269; Sat, 3 Jul 93 16:30:03 -0700
Received: from localhost by kinglear.cs.Colorado.EDU with SMTP id AA09209
  (5.65c/IDA-1.4.4 for <riscy@pyramid.com>); Sat, 3 Jul 1993 17:29:47 -0600
Message-Id: <199307032329.AA09209@kinglear.cs.Colorado.EDU>
To: riscy@pyramid.com, tim@ubitrex.mb.ca (Tim Braun)
Subject: Re: Crosscompiler 
In-Reply-To: Your message of "Fri, 02 Jul 1993 09:04:52 CDT."
             <9307021404.AA23217@ubitrex.mb.ca> 
Date: Sat, 03 Jul 1993 17:29:46 -0600
From: Drew Eckhardt <drew@kinglear.cs.Colorado.EDU>
Sender: riscy-request@pyramid.com
Reply-To: riscy@pyramid.com
Status: RO
X-Status: 

    > Tommy Thorn writes:
    > > I've just got access to a decstation, and I'm trying to find
    > > out how much is missing before a crosscompilation enviroment is
    > > a reality.
    > I seem to recall that DEC changed the endian-ness of the MIPS on the
    > decstations, so as to be more compatible with VAXes. If so, the tools
    > will not be compatible with the 'real' MIPs tools.
    > 
    > 		Andy..
    > 
    
    
    The MIPS and SGI boxes configured the MIPs chips for big-endian.  DEC
    configured the MIPs chips in the DECstations as little-endian, to match
    the VAX.  Which also matches the PDP-11.  It so happens that Intel made 
    the 8085/8088/80386 little-endian as well.  So linux is little-endian,
    and we may want to make linux/MIPs little-endian, to reduce portability
    problems (file system structures, etc).

The only problem you get by having MIPS / i386 Linuxen be different endianness
are that their filesystems aren't interchangeable.  IMHO, since you aren't
going to run a i386 binary on a MIPs... this isn't a real problem.

I think that MIPs Linux should be Big Endian, because the MIPs SYSV ABI
is big endian and this lets us run commercial MIPS ABI applications.


 
From andy@piggy.waldorf-gmbh.de  Ukn Jul  4 11:32:41 1993
Received: from gossip.pyramid.com by SunSITE.unc.edu (4.1/tas-gen/1-30-93)
	id AA00494; Sun, 4 Jul 93 11:32:40 EDT
Received: from sword.eng.pyramid.com 
	by gossip.pyramid.com (5.61/OSx5.1a Pyramid-Internet-Gateway)
	id AA01324; Sun, 4 Jul 93 08:32:12 -0700
Received: by sword.eng.pyramid.com (5.61/Pyramid_Internal_Configuration)
	id AA25290; Sun, 4 Jul 93 08:31:58 -0700
Received: from goss.pyramid.com
	by sword.eng.pyramid.com (5.61/Pyramid_Internal_Configuration)
	id AA25283; Sun, 4 Jul 93 08:31:56 -0700
Received: from mail.Germany.EU.net 
	by gossip.pyramid.com (5.61/OSx5.1a Pyramid-Internet-Gateway)
	id AA01260; Sun, 4 Jul 93 08:32:02 -0700
Received: by mail.Germany.EU.net(EUnetD-2.3.0.e) via EUnet
	id XA27155; Sun, 4 Jul 1993 17:28:59 +0200
Received: from piggy.waldorf-gmbh.de 
	by wegy.waldorf-gmbh.de with UUCP (5.61/GEN-1.0.7)
	via EUnet for unido
	id AA24686; Sun, 4 Jul 93 17:21:07 +0200
From: Andreas Busse <andy@piggy.waldorf-gmbh.de>
Date: Sun, 4 Jul 93 18:03:13 GMT
Message-Id: <9307041803.AA19798@piggy.waldorf-gmbh.de>
Received: by piggy.waldorf-gmbh.de (5.65b/GEN-1.0.7)
	via EUnet for wegy
	id AA19798; Sun, 4 Jul 93 18:03:13 GMT
To: riscy@pyramid.com
Subject: Re: Crosscompiler
Sender: riscy-request@pyramid.com
Reply-To: riscy@pyramid.com
Status: RO
X-Status: 


> My last word (for now) in this matter. Having succesfully
> built a cross compiler, linker and everything except
> assembler (yet) and tested the linked objects on the
> decstation, I'd say that endian is not a problem for cross
> development tools; it's compiletime selectable.

Great !!!

Please tell me what GCC that is and how you have configured
it. I'll get the same version.

Andy
-------------------------------------------------------------------------------
Andreas Busse             | e-mail: andy@piggy.waldorf-gmbh.de (home)
Eislebenstrasse 5         |         andy@resi.waldorf-gmbh.de (office)
D-5300 Bonn 1             | Phone:  +49 (0)228-252687
-------------------------------------------------------------------------------


 
From tthorn@daimi.aau.dk  Ukn Jul  2 09:05:36 1993
Received: from gossip.pyramid.com by SunSITE.unc.edu (4.1/tas-gen/1-30-93)
	id AA02619; Fri, 2 Jul 93 09:05:34 EDT
Received: from sword.eng.pyramid.com 
	by gossip.pyramid.com (5.61/OSx5.1a Pyramid-Internet-Gateway)
	id AA19111; Fri, 2 Jul 93 06:03:30 -0700
Received: from goss.pyramid.com
	by sword.eng.pyramid.com (5.61/Pyramid_Internal_Configuration)
	id AA15409; Fri, 2 Jul 93 06:03:16 -0700
Received: from avignon.daimi.aau.dk 
	by gossip.pyramid.com (5.61/OSx5.1a Pyramid-Internet-Gateway)
	id AA19107; Fri, 2 Jul 93 06:03:17 -0700
Received: by avignon.daimi.aau.dk id AA27783
  (5.65c8/IDA-1.4.4 for riscy@pyramid.com); Fri, 2 Jul 1993 15:03:05 +0200
Date: Fri, 2 Jul 1993 15:03:05 +0200
From: Tommy Thorn <tthorn@daimi.aau.dk>
Message-Id: <199307021303.AA27783@avignon.daimi.aau.dk>
To: Andreas Busse <andy@resi.waldorf-gmbh.de>
Cc: riscy@pyramid.com
Subject: Re: Crosscompiler
References: <9307021237.AA05243@resi.waldorf-gmbh.de>
Reply-To: Tommy.Thorn@daimi.aau.dk
Status: RO
X-Status: 

Andreas Busse writes:
 > 
 > Quoted from the various GCC-Readme's:
 > 
 > > It is possible to use gcc on a mips as a crosscompiler for
 > > whatever, but is *NOT* possible to build a compiler for
 > > target=mips on anything else but a mips.

Partially true.

 > This was at least true for gcc-2.3.1 which we use as
 > a 68k crosscompiler on our Mips's. I don't know if things
 > have changed...

I think the real problem is generating object files in the correct
format. This is not as big a problem for us.

 > That might lead us into trouble. Who has a Mips except me ?
 > 
 > Andy

I've just got access to a decstation, and I'm trying to find
out how much is missing before a crosscompilation enviroment is
a reality.

So far I've build a C compiler running on a HP snake generating
Mips assembler. My hope is to be able to make all tools for
a mips simulation enviroment availble on Linux.

/Tommy Thorn

 
From arj@cam-orl.co.uk  Ukn Jul  2 09:23:59 1993
Received: from gossip.pyramid.com by SunSITE.unc.edu (4.1/tas-gen/1-30-93)
	id AA03224; Fri, 2 Jul 93 09:23:55 EDT
Received: from sword.eng.pyramid.com 
	by gossip.pyramid.com (5.61/OSx5.1a Pyramid-Internet-Gateway)
	id AA20683; Fri, 2 Jul 93 06:21:59 -0700
Received: from goss.pyramid.com
	by sword.eng.pyramid.com (5.61/Pyramid_Internal_Configuration)
	id AA17891; Fri, 2 Jul 93 06:21:51 -0700
Received: from quince.cam-orl.co.uk 
	by gossip.pyramid.com (5.61/OSx5.1a Pyramid-Internet-Gateway)
	id AA20677; Fri, 2 Jul 93 06:21:53 -0700
Received: by quince.cam-orl.co.uk (Smail3.1.28.1 #1)
	id m0oBl24-0004q0C; Fri, 2 Jul 93 14:20 BST
Message-Id: <m0oBl24-0004q0C@quince.cam-orl.co.uk>
Date: Fri, 2 Jul 93 14:20 BST
From: arj@cam-orl.co.uk (Andy Jackson)
To: Tommy.Thorn@daimi.aau.dk, andy@resi.waldorf-gmbh.de
Subject: Re: Crosscompiler
Cc: riscy@pyramid.com
Status: RO
X-Status: 

Tommy Thorn writes:
> I've just got access to a decstation, and I'm trying to find
> out how much is missing before a crosscompilation enviroment is
> a reality.
I seem to recall that DEC changed the endian-ness of the MIPS on the
decstations, so as to be more compatible with VAXes. If so, the tools
will not be compatible with the 'real' MIPs tools.

		Andy..

 
From tim@ubitrex.mb.ca  Ukn Jul  2 10:06:59 1993
Received: from gossip.pyramid.com by SunSITE.unc.edu (4.1/tas-gen/1-30-93)
	id AA05011; Fri, 2 Jul 93 10:06:53 EDT
Received: from sword.eng.pyramid.com 
	by gossip.pyramid.com (5.61/OSx5.1a Pyramid-Internet-Gateway)
	id AA22923; Fri, 2 Jul 93 07:06:12 -0700
Received: from goss.pyramid.com
	by sword.eng.pyramid.com (5.61/Pyramid_Internal_Configuration)
	id AA19880; Fri, 2 Jul 93 07:06:03 -0700
Received: from ubiserver.ubitrex.mb.ca 
	by gossip.pyramid.com (5.61/OSx5.1a Pyramid-Internet-Gateway)
	id AA22911; Fri, 2 Jul 93 07:06:00 -0700
Received: from ska.ubitrex.mb.ca ([192.75.16.23]) by ubitrex.mb.ca (4.1/SMI-4.1)
	id AA23217; Fri, 2 Jul 93 09:04:52 CDT
Date: Fri, 2 Jul 93 09:04:52 CDT
From: tim@ubitrex.mb.ca (Tim Braun)
Message-Id: <9307021404.AA23217@ubitrex.mb.ca>
To: riscy@pyramid.com
Subject: Re: Crosscompiler
Status: RO
X-Status: 

> From arj@cam-orl.co.uk Fri Jul  2 08:23:04 1993
> Return-Path: <arj@cam-orl.co.uk>
> Received: from gossip.pyramid.com by ubitrex.mb.ca (4.1/SMI-4.1)
> 	id AA23093; Fri, 2 Jul 93 08:22:54 CDT
> Received: from sword.eng.pyramid.com 
> 	by gossip.pyramid.com (5.61/OSx5.1a Pyramid-Internet-Gateway)
> 	id AA20688; Fri, 2 Jul 93 06:22:11 -0700
> Received: from goss.pyramid.com
> 	by sword.eng.pyramid.com (5.61/Pyramid_Internal_Configuration)
> 	id AA17891; Fri, 2 Jul 93 06:21:51 -0700
> Received: from quince.cam-orl.co.uk 
> 	by gossip.pyramid.com (5.61/OSx5.1a Pyramid-Internet-Gateway)
> 	id AA20677; Fri, 2 Jul 93 06:21:53 -0700
> Date: Fri, 2 Jul 93 14:20 BST
 
> Tommy Thorn writes:
> > I've just got access to a decstation, and I'm trying to find
> > out how much is missing before a crosscompilation enviroment is
> > a reality.
> I seem to recall that DEC changed the endian-ness of the MIPS on the
> decstations, so as to be more compatible with VAXes. If so, the tools
> will not be compatible with the 'real' MIPs tools.
> 
> 		Andy..
> 


The MIPS and SGI boxes configured the MIPs chips for big-endian.  DEC
configured the MIPs chips in the DECstations as little-endian, to match
the VAX.  Which also matches the PDP-11.  It so happens that Intel made 
the 8085/8088/80386 little-endian as well.  So linux is little-endian,
and we may want to make linux/MIPs little-endian, to reduce portability
problems (file system structures, etc).

Making linux/MIPs little-endian makes cross-compiling from SGI an
interesting configuration problem, but presumably no more difficult 
then generating linux/386 code from a SunOS/SPARC environment.

Try this:

/*
 * end.c
 *
 *  Test a target processor and compiler 
 *  for size of integers and endian orientation.
 */

#include <stdio.h>

main()
{
        long int test_long;
        int test_int;
        char test_8;
        char *ptr_8;

        test_long = 0x01020304;
        test_int = 0x01020304;
        printf("%d bit native integers.\n", sizeof(int) * 8);
        if (sizeof(long) == 4) {
                ptr_8 = &test_long;
        }
        if (sizeof(int) == 4) {
                ptr_8 = &test_int;
        }
        test_8 = *ptr_8;
        printf("This is a %s-endian machine.\n", test_8 == 1? "big" : "little");
}
________________________________________________________________
Tim Braun                          |
Ubitrex Corporation                | Voice: 204-942-2992 ext 228
1900-155 Carlton St                | FAX:   204-942-3001
Winnipeg, Manitoba, Canada R3C 3H8 | Email: tim@ubitrex.mb.ca

 
