Bug 49448 - arm-tab-linux-gnu-eabi enableds big endian when it should not
Summary: arm-tab-linux-gnu-eabi enableds big endian when it should not
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.5.3
: P3 normal
Target Milestone: 4.5.4
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-17 05:33 UTC by goughost
Modified: 2012-04-12 14:16 UTC (History)
1 user (show)

See Also:
Host:
Target: arm
Build:
Known to work:
Known to fail:
Last reconfirmed: 2012-01-28 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description goughost 2011-06-17 05:33:44 UTC
In the configure script "gcc/config.gcc", around line 733:

arm*-*-linux*)                  # ARM GNU/Linux with ELF
        tm_file="dbxelf.h elfos.h linux.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
        case $target in
        arm*b-*)
                tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
                ;;
        esac
        tmake_file="${tmake_file} t-linux arm/t-arm"

If $target have the form "arm-tab-linux-gnu", this script will enable big-endian defaults. But the resulting gcc will, by default, generate little-endian object files, and pass some big-endian argument to linker.

This might be a common problem in scripts. Should the use of "*" be restricted, or warned in some important scripts?
Comment 1 Andreas Schwab 2011-06-17 07:26:12 UTC
It should use $target_cpu.
Comment 2 Andrew Pinski 2012-01-28 19:26:30 UTC
Confirmed.
Comment 3 Richard Earnshaw 2012-02-28 15:26:13 UTC
Author: rearnsha
Date: Tue Feb 28 15:26:02 2012
New Revision: 184626

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184626
Log:
	PR target/49448
	* config.gcc (arm*-*-linux*): Use an unambiguous pattern for
	detecting big-endian triplets.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config.gcc
Comment 4 Richard Earnshaw 2012-04-12 14:11:37 UTC
Author: rearnsha
Date: Thu Apr 12 14:11:33 2012
New Revision: 186379

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186379
Log:
	PR target/49448
	* config.gcc (arm*-*-linux*): Use an unambiguous pattern for
	detecting big-endian triplets.

Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/config.gcc
Comment 5 Richard Earnshaw 2012-04-12 14:11:53 UTC
Author: rearnsha
Date: Thu Apr 12 14:11:49 2012
New Revision: 186380

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186380
Log:
	PR target/49448
	* config.gcc (arm*-*-linux*): Use an unambiguous pattern for
	detecting big-endian triplets.

Modified:
    branches/gcc-4_5-branch/gcc/ChangeLog
    branches/gcc-4_5-branch/gcc/config.gcc
Comment 6 Richard Earnshaw 2012-04-12 14:16:43 UTC
Fixed in 4.5.4, 4.6.4 4.7 and trunk