From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-ob0-x231.google.com ([2607:f8b0:4003:c01::231]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZAA3V-0005uA-1d for barebox@lists.infradead.org; Wed, 01 Jul 2015 04:55:30 +0000 Received: by obdbs4 with SMTP id bs4so21010485obd.3 for ; Tue, 30 Jun 2015 21:55:07 -0700 (PDT) MIME-Version: 1.0 Date: Wed, 1 Jul 2015 07:55:05 +0300 Message-ID: From: Antony Pavlov List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: big-endian sandbox issue To: barebox , Sascha Hauer Hi! I have tried to build barebox on big-endian MIPS CPU running Debian 8. It fails because of unconditional inclusion. At the first glance this can help: --- a/arch/sandbox/include/asm/byteorder.h +++ b/arch/sandbox/include/asm/byteorder.h @@ -3,6 +3,12 @@ #include +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +#include +#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ #include +#else +#error "__BYTE_ORDER__ != __ORDER_BIG_ENDIAN__ and __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__" +#endif #endif /* _I386_BYTEORDER_H */ But some warning appears: In file included from common/filetype.c:21:0: /barebox.git/arch/sandbox/include/asm/unaligned.h:11:21: warning: "__LITTLE_ENDIAN" is not defined [-Wundef] #if __BYTE_ORDER == __LITTLE_ENDIAN System-wide can fix the situation, but we use -nostdinc, so the error occurs: barebox.git/arch/sandbox/include/asm/byteorder.h:7:20: fatal error: endian.h: No such file or directory #include ^ compilation terminated. Moreover AFAIR isn't available on BSD, so '#if defined(__linux__)' has to be used. Any suggestions? -- Best regards, Antony Pavlov _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox