From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15184 invoked by alias); 24 May 2004 12:20:03 -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 15122 invoked from network); 24 May 2004 12:19:59 -0000 Received: from unknown (HELO imag.imag.fr) (129.88.30.1) by sourceware.org with SMTP; 24 May 2004 12:19:59 -0000 Received: from horus.imag.fr (horus.imag.fr [129.88.38.1]) by imag.imag.fr (8.12.10/8.12.10) with ESMTP id i4OCJr7E014726; Mon, 24 May 2004 14:19:53 +0200 (CEST) Received: from imag.fr (conque.imag.fr [129.88.38.148]) by horus.imag.fr (8.12.5+Sun/8.12.5/ImagV2.1.pm) with ESMTP id i4OCJqEL019678; Mon, 24 May 2004 14:19:53 +0200 (CEST) Message-ID: <40B1E93A.E3C43EF1@imag.fr> Date: Mon, 24 May 2004 12:20:00 -0000 From: Pierre Habraken Organization: =?iso-8859-1?Q?Universit=E9?= Joseph Fourier MIME-Version: 1.0 To: Ian Lance Taylor CC: gcc-help@gcc.gnu.org Subject: Re: Arm and big endian References: <40AA1A03.C24308D8@imag.fr> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-IMAG-MailScanner: Found to be clean X-IMAG-MailScanner-Information: Please contact the ISP for more information X-SW-Source: 2004-05/txt/msg00262.txt.bz2 Ian Lance Taylor wrote: > > > 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. My goal is not to get -mbig-endian being the default. I just want that whenever I link a big endian object file the proper big endian version of newlib be coosen by gcc instead of the little endian default one. I tried the trick suggested some time ago by Michael Butts in http://sources.redhat.com/ml/newlib/2001/msg00561.html, i.e. changing the setting of the MULTILIB_OPTIONS and MULTILIB_DIRNAMES variables in gcc/Makefile, right after the configure stage. The resulting build behaves as I expected. The command arm-elf-gcc -print-multi-lib prints then: .; thumb;@mthumb be;@mbig-endian thumb/be;@mthumb@mbig-endian Pierre -- Pierre HABRAKEN - mailto:Pierre.Habraken@imag.fr Tél: 04 76 82 72 83 - Fax: 04 76 82 72 87 IMAG-LSR BP72 38402 SAINT MARTIN D'HERES Cedex