From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23946 invoked by alias); 18 May 2004 15:09:29 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 23923 invoked from network); 18 May 2004 15:09:28 -0000 Received: from unknown (HELO yosemite.airs.com) (209.128.65.135) by sourceware.org with SMTP; 18 May 2004 15:09:28 -0000 Received: (qmail 835 invoked by uid 10); 18 May 2004 15:09:27 -0000 Received: (qmail 28544 invoked by uid 500); 18 May 2004 15:04:23 -0000 From: Ian Lance Taylor To: Pierre Habraken Cc: gcc-help@gcc.gnu.org Subject: Re: Arm and big endian References: <40AA1A03.C24308D8@imag.fr> Date: Tue, 18 May 2004 15:09:00 -0000 In-Reply-To: <40AA1A03.C24308D8@imag.fr> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-05/txt/msg00210.txt.bz2 Pierre Habraken writes: > I want to compile gcc and newlib so that big endian code is generated > for newlib (this is for teaching purpose). > > Though I understand that multilib is activated by default, I do not need > the multilib option since I want 32 bits and big endian code only. > > The configure doc. (in INSTALL dir.) says that there is an option for > disabling biendian (BTW, does here "bi" mean "big" or "bi-" ?...), but > nothing for enabling it. > > I tried --enable-biendian : configure does not complain about it but > apparently does not take it in account. > > So my question is : What configure option I have to set up for gcc in > order to get newlib being cross-compiled to big endian code ? > > Has someone succeeded in doing that (with or without multilib support) ? I don't think there is any way to do that without patching the source. It's easy to patch the source to make -mbig-endian the default: change the definition of TARGET_DEFAULT to include ARM_FLAG_BIG_END. TARGET_DEFAULT is defined in config/arm/*.h; the exact definition depends upon your target. It is only slightly more work to add support for --with-endian to config.gcc. Ian