First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 16350
Product:  
Component:  
Status: NEW
Resolution:
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Lennert Buytenhek <buytenh@wantstofly.org>
Add CC:
CC:
Remove selected CCs
Build:
Patch URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
gcc-3.4.0-arm-bigendian.patch This is a suggested fix to make gcc understand arm*b-* patch 2004-07-03 15:45 972 bytes Edit | Diff
gcc-4.0-20050305-arm-bigendian.patch equivalent patch for gcc 4.0 20050305 patch 2005-03-24 09:39 937 bytes Edit | Diff
gcc-3.4.0-arm-bigendian.patch proposed patch for gcc 3.4.0 patch 2005-03-24 10:37 973 bytes Edit | Diff
gcc-4.0-20050305-arm-bigendian.patch proposed patch for gcc 4.0-20050305 patch 2005-03-24 10:39 940 bytes Edit | Diff
34_all_arm-bigendian.patch gcc-4.1.0-arm-bigendian.patch patch 2006-04-12 04:01 851 bytes Edit | Diff
gcc-4.1.0-arm-bigendian.patch fix target linker emulation for arm elf and eabi patch 2006-08-08 13:31 1.12 KB Edit | Diff
gcc-4.1.0-arm-bigendian.patch fix target linker emulation for arm elf and eabi (take 2) patch 2006-11-03 13:49 1.13 KB Edit | Diff
gcc-4.1.0-arm-bigendian.patch fix target linker emulation for arm elf and eabi (take 3) patch 2006-11-29 09:55 1.29 KB Edit | Diff
800-arm-bigendian.patch updated to gcc-4.3 trunk patch 2007-11-07 20:50 1.31 KB Edit | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 16350 depends on: Show dependency tree
Show dependency graph
Bug 16350 blocks:

Additional Comments:





Mark bug as waiting for feedback
Mark bug as suspended




View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2005-01-12 01:47 Opened: 2004-07-03 15:45
The triplet armv5b-softfloat-linux gives a binutils package that generates ARM
big endian object files by default, but gcc insists that armv5b-softfloat-linux
is little endian.

------- Comment #1 From Lennert Buytenhek 2004-07-03 15:45 -------
Created an attachment (id=6680) [edit]
This is a suggested fix to make gcc understand arm*b-*

------- Comment #2 From Andrew Pinski 2004-07-03 22:16 -------
As aways patches goto gcc-patches@gcc.gnu.org after reading
<http://gcc.gnu.org/contribute.html>.

------- Comment #3 From dank@kegel.com 2004-08-08 18:44 -------
He did submit it to gcc-patches; see
http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00233.html
The patch seems to fix a real gcc build problem here; 
I'm adding it to crosstool for gcc-3.4.[01]. 

------- Comment #4 From Andrew Pinski 2004-10-13 01:20 -------
Confirmed.

------- Comment #5 From Mike Frysinger 2005-02-25 15:49 -------
this also applies pretty nicely to 3.3.5, 3.4.2, 3.4.3, and even gcc cvs HEAD
:(

one question though ... going by config/arm/arm.h, wouldnt you want to
use this logic instead ?
#if TARGET_BIG_ENDIAN_DEFAULT
#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
#else
#define TARGET_ENDIAN_DEFAULT -ARM_FLAG_BIG_END
#endif

granted i havent fully tested this change from '0' to '-ARM_FLAG_BIG_END',
but it *seems* to work :)

also, what do we have to do in order to get this into mainline gcc ?
this simple patch has been hanging around for a while :/

------- Comment #6 From Lennert Buytenhek 2005-03-24 09:39 -------
Created an attachment (id=8444) [edit]
equivalent patch for gcc 4.0 20050305

------- Comment #7 From Lennert Buytenhek 2005-03-24 10:37 -------
Created an attachment (id=8445) [edit]
proposed patch for gcc 3.4.0

fixes regex for big-endian target triples

------- Comment #8 From Lennert Buytenhek 2005-03-24 10:39 -------
Created an attachment (id=8446) [edit]
proposed patch for gcc 4.0-20050305

fix regex for big-endian target triples

------- Comment #9 From Mike Frysinger 2006-04-12 04:01 -------
Created an attachment (id=11245) [edit]
gcc-4.1.0-arm-bigendian.patch

gcc-4.1.x needs slight tweak since all the ARM_FLAG_* defines have been cut

this patch applies with a little fuzz to mainline

------- Comment #10 From Marc Kleine-Budde 2006-08-08 13:31 -------
Created an attachment (id=12042) [edit]
fix target linker emulation for arm elf and eabi

------- Comment #11 From Marc Kleine-Budde 2006-08-08 13:33 -------
(In reply to comment #9)
> Created an attachment (id=11245) [edit]
> gcc-4.1.0-arm-bigendian.patch
> 
> gcc-4.1.x needs slight tweak since all the ARM_FLAG_* defines have been cut
> this patch applies with a little fuzz to mainline

I've rediffed that patch against 4.1.1.
If you try to build a big-endian eabi toolchain, you need another fix (see
patch of gcc/config/arm/linux-eabi.h)

------- Comment #12 From Marc Kleine-Budde 2006-11-03 13:49 -------
Created an attachment (id=12542) [edit]
fix target linker emulation for arm elf and eabi (take 2)

If you try to build a big-endian eabi toolchain, you need another fix (see
patch of gcc/config/arm/linux-eabi.h)

------- Comment #13 From Marc Kleine-Budde 2006-11-29 09:55 -------
Created an attachment (id=12705) [edit]
fix target linker emulation for arm elf and eabi (take 3)

If you try to build a big-endian eabi toolchain, you need another fix (see
patch of gcc/config/arm/linux-eabi.h)

------- Comment #14 From Bernhard Reutner-Fischer 2007-11-07 20:50 -------
Created an attachment (id=14503) [edit]
updated to gcc-4.3 trunk

updated against gcc-trunk (for 4.3.0)

------- Comment #15 From Nick Clifton 2007-11-08 13:44 -------
Subject: Bug 16350

Author: nickc
Date: Thu Nov  8 13:44:09 2007
New Revision: 129999

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129999
Log:
  PR target/16350
* config.gcc: For arm*b-* define TARGET_BIG_ENDIAN_DEFAULT.
* config/arm/linux-elf.h (TARGET_ENDIAN_DEFAULT): Define based on
TARGET_BIG_ENDIAN_DEFAULT.
   Use for MULTILIB_DEFAULTS.
   (TARGET_DEFAULT): Set according to TARGET_ENDIAN_DEFAULT.
   (LINUX_TARGET_LINK_SPEC): Pass -mlittle-endian on to the assembler.
* config/arm/linux-eabi.h (TARGET_LINKER_EMULATION): Set according to
TARGET_BIG_ENDIAN_DEFAULT.
   (SUBTARGET_EXTRA_LINK_SPEC): Likewise.
* gcc/config/arm/bpabi.h (TARGET_DEFAULT_MASK): Set according to
TARGET_BIG_ENDIAN_DEFAULT.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config.gcc
    trunk/gcc/config/arm/bpabi.h
    trunk/gcc/config/arm/linux-eabi.h
    trunk/gcc/config/arm/linux-elf.h

------- Comment #16 From Nick Clifton 2007-11-08 13:47 -------
Hi Bernhard,

  I have applied your patch.  I made one small change:  I adjusted the new
comments in the header files to:

  /* TARGET_BIG_ENDIAN_DEFAULT is set in
     config.gcc for big endian configurations.  */

This was conformance with the GNU Coding Standards and also for brevity.

Cheers
  Nick

------- Comment #17 From Lennert Buytenhek 2007-11-08 14:26 -------
Subject: Re:  gcc only understands little endian ARM systems

When I (not Bernhard) wrote the original patch, Richard Earnshaw
didn't like the approach.  See:

        http://gcc.gnu.org/ml/gcc-patches/2005-03/msg02265.html

------- Comment #18 From patchapp@dberlin.org 2007-11-10 03:53 -------
Subject: Bug number PR16350

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-11/msg00358.html

------- Comment #19 From patchapp@dberlin.org 2007-11-10 03:53 -------
Subject: Bug number PR16350

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-11/msg00362.html

------- Comment #20 From patchapp@dberlin.org 2007-11-10 18:05 -------
Subject: Bug number PR16350

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-11/msg00358.html

------- Comment #21 From patchapp@dberlin.org 2007-11-22 19:00 -------
Subject: Bug number PR16350

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-11/msg00362.html

------- Comment #22 From Peter Maydell 2008-07-04 13:18 -------
I notice that the latest patch attached to this bug report doesn't quite match
up with what was committed as per comment #15: this bit in
gcc/config/arm/linux-elf.h wasn't changed:

 #undef  MULTILIB_DEFAULTS
 #define MULTILIB_DEFAULTS \
-       { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
+       { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }

I don't know if that was deliberate or not, but my guess based on the revision
log for the change is that it was accidental, since the log explicitly says
"use it for MULTILIB_DEFAULTS".

First Last Prev Next    No search results available      Search page      Enter new bug