From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 635 invoked by alias); 30 May 2005 07:51:18 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 610 invoked by uid 48); 30 May 2005 07:51:04 -0000 Date: Mon, 30 May 2005 07:55:00 -0000 Message-ID: <20050530075104.609.qmail@sourceware.org> From: "papadopo at shfj dot cea dot fr" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050527123604.21782.papadopo@shfj.cea.fr> References: <20050527123604.21782.papadopo@shfj.cea.fr> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug libffi/21782] configure: error: unknown endianess X-Bugzilla-Reason: CC X-SW-Source: 2005-05/txt/msg03801.txt.bz2 List-Id: ------- Additional Comments From papadopo at shfj dot cea dot fr 2005-05-30 07:50 ------- This program builds just fine: $ cat > conftest.c main () { /* Are we little or big endian? From Harbison&Steele. */ union { long l; char c[sizeof (long)]; } u; u.l = 1; exit (u.c[sizeof (long) - 1] == 1); } $ $ /export/Plocal/GCC-3.3.6/gcc/xgcc -B/export/Plocal/GCC-3.3.6/gcc/ -B/usr/local/gcc-3.3.6/sparc-sun-solaris2.8/bin/ -B/usr/local/gcc-3.3.6/sparc-sun-solaris2.8/lib/ -isystem /usr/local/gcc-3.3.6/sparc-sun-solaris2.8/include -c -O2 -g -O2 conftest.c $ echo $? 0 $ As far as I can understand the original error message in config.log is: [...] configure: In function `main': configure:3440: error: `bogus' undeclared (first use in this function) configure:3440: error: (Each undeclared identifier is reported only once configure:3440: error: for each function it appears in.) configure:3440: error: syntax error before "endian" [...] and it applies to: #include "confdefs.h" #include #include int main() { #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros #endif ; return 0; } In the first test, the one that fails, none of BYTE_ORDER, BIG_ENDIAN or LITTLE_ENDIAN are defined. The configure script then runs a second test which doesn't fail as shown above. Somehow the configure script takes into account the first failure. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21782