This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: CrossTool-NG (working towards getting a few Mips toolchains)


> > [ALL  ]
> >
/root/src/buildroot-retool/crosstool-ng/crosstool-ng/.build/mips-nfs_dev
> >
el-linux-gnu/build/gcc-core-shared/lib/gcc/mips-nfs_devel-linux-gnu/4.5.
> > 2/../../../../mips-nfs_devel-linux-gnu/bin/ld:
> >
/root/src/buildroot-retool/crosstool-ng/crosstool-ng/.build/mips-nfs_dev
> > el-linux-gnu/build/build-libc/csu/init.o: compiled for a big endian
> > system and target is little endian

> 
> I'll need your .config so I can try to reproduce the error...
> 
> Regards,
> Yann E. MORIN.

Yann/All:

In the file bits/endian.h under the path:
.build/src/eglibc-2_13/eglibc-ports-2_13/sysdeps/mips

the file reads:

/* The MIPS architecture has selectable endianness.
   This file is for a machine using big-endian mode.  */

#ifndef _ENDIAN_H
# error "Never use <bits/endian.h> directly; include <endian.h>
instead."
#endif

#if __MIPSEB
# define __BYTE_ORDER __BIG_ENDIAN
#endif
#if __MIPSEL
# define __BYTE_ORDER __LITTLE_ENDIAN
#endif


I have searched and searched and have come up with the CFLAGS=-EB
doesn't
get passed into the build-libc-startfiles make system, therefore, it
gets
built as little endian:

root@akennedy_lin:~/src/buildroot-retool/crosstool-ng/crosstool-ng/.buil
d/mips-nfs_devel-linux-gnu/build/build-libc-startfiles/csu# readelf -h
crt1.o start.o

File: crt1.o
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              REL (Relocatable file)
  Machine:                           MIPS R3000
  Version:                           0x1
  Entry point address:               0x0
  Start of program headers:          0 (bytes into file)
  Start of section headers:          1084 (bytes into file)
  Flags:                             0x1007, noreorder, pic, cpic, o32,
mips1
  Size of this header:               52 (bytes)
  Size of program headers:           0 (bytes)
  Number of program headers:         0
  Size of section headers:           40 (bytes)
  Number of section headers:         24
  Section header string table index: 21

File: start.o
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              REL (Relocatable file)
  Machine:                           MIPS R3000
  Version:                           0x1
  Entry point address:               0x0
  Start of program headers:          0 (bytes into file)
  Start of section headers:          264 (bytes into file)
  Flags:                             0x1007, noreorder, pic, cpic, o32,
mips1
  Size of this header:               52 (bytes)
  Size of program headers:           0 (bytes)
  Number of program headers:         0
  Size of section headers:           40 (bytes)
  Number of section headers:         10
  Section header string table index: 7

This is a failure, however, the failure doesn't occur for another 30
minutes
after this file is made.  Should there be a check to see that these
files
are built correctly BEFORE starting the GCC build, or is this a case of 
we found one oops but should never have this problem if we correct the
endianness issue to begin with?

Andy

--
For unsubscribe information see http://sourceware.org/lists.html#faq


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