Re: How to Configure GCC for ARM Native Compiler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Venkat Narayana <venkatnarayana.k@xxxxxxxxx> writes:

> OK.But i am getting error when trying to bootstrap it.
> I gave command "make bootstrap ".It is giving error as
> 
> 
> guessing bigendian ...
> unknown
> configure: error: unknown endianess - sorry
> /root/venkat/gcc-3.4.2/libiberty/configure: line 3289: exit: please:
> numeric argument required
> /root/venkat/gcc-3.4.2/libiberty/configure: line 3289: exit: please:
> numeric argument required
> make: *** [configure-libiberty] Error 1
> 
> So where in configure, i need to specify the endianness...

The configure script will first try to determine the endianness by
looking for the macros BYTE_ORDER, BIG_ENDIAN and LITTLE_ENDIAN in
sys/param.h.  If those are defined there, they will be used.

Otherwise, when building with a cross compiler, the configure script
will attempt to determine the endianness by compiling a particular
file and looking for a particular string.  The file looks like this:

short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
int main() { _ascii (); _ebcdic (); return 0; }

The configure script will grep the .o file for the strings
BIGenDianSyS and LiTTleEnDian.

I guess that neither of these tests work for your cross-compiler.

There is no particularly good fix.  One hack is to edit the
config.cache file, and add a line like 
    ac_cv_c_bigendian=${ac_cv_c_bigendian=yes}
but change "yes" to "no" if your host system is little endian.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux