This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Mostly successful build/install of egcs 1.0


As requested in the FINALINSTALL file, here is a short message about
successful builds and installs of egcs 1.0.  I have 4 platforms here,
Sparc Solaris 2.5.1, x86 Solaris 2.5.1, SGI Indy (MIPS R4600) Irix 5.3,
and SGI Challenge (dual MIPS R4400) Irix 6.2.  The build and install
went off without a hitch for the first three platforms.  I am happily
building programs with -march=pentium for the x86s, and seeing a
substantial improvement in performance.

The Irix 6.2 build and install were mostly uneventful, with one
exception.  The documentation does not make clear how the SGI o32, n32,
and n64 binary formats correspond to the various MIPS compiler
switches.  In fact, it appears the info documentation is somewhat in
error.  Watch this:

----------------------------- Begin test.c -----------------------------
#include <stdio.h>

int main(int argc, char *argv[])
{
  printf("The size of a char: %d\n", sizeof(char));
  printf("The size of a short: %d\n", sizeof(short));
  printf("The size of a int: %d\n", sizeof(int));
  printf("The size of a long: %d\n", sizeof(long));
  printf("The size of a long long: %d\n", sizeof(long long));
  printf("The size of a pointer: %d\n", sizeof(char *));
}
------------------------------ End test.c ------------------------------

% gcc test.c -o test
% test
The size of a char: 1
The size of a short: 2
The size of a int: 4
The size of a long: 4
The size of a long long: 8
The size of a pointer: 4
% gcc -mips3 test.c -o test
% test
The size of a char: 1
The size of a short: 2
The size of a int: 4
The size of a long: 8
The size of a long long: 8
The size of a pointer: 8


So, just adding the -mips3 switch changed the size of both long and
pointer from 4 bytes to 8 bytes.  The info page for the MIPS switches
says this:

`-mips3'
     Issue instructions from level 3 of the MIPS ISA (64 bit
     instructions).  `r4000' is the default CPU TYPE at this ISA level.
     This option does not change the sizes of any of the C data types.

Note that last sentence.  I see that when I try to compile with -mips2
that I get this error message:

cc1: The -mabi=32 support does not work yet.

So, I guess that means that n32 support isn't available, right?  But o32
must be working, since the Irix 5.3 build is working fine, and o32 is
all that is available for that.  Why is -mips2 assuming n32 when it can
be used with o32 code as well?  Why is -mips3 assuming n64 when it can
be used with n32 code as well?

One more related (potential) problem: the switches -mlong64 and -mint64
are available to increase data type sizes, but there aren't any to
decrease it.  That means that, if I choose -mips3, there isn't any way
to produce n32 code (when it is available), except by using the
undocumented -mabi switch.

The FINALINSTALL document asked me to include the output from
srcdir/config.guess.  However, all I can see are config.cache and
config.status.  Did you want one of those?

I hope this didn't sound like a complaint.  I think you are doing a
wonderful job, and it is certainly benefitting me greatly.  I just
wanted to point out some potential problems.

Regards (and thanks for all your efforts!),
-- 
Jerry James
Email: jerry@cs.ucsb.edu
WWW:   http://www.cs.ucsb.edu/~jerry/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]