add packaging
[platform/upstream/gcc48.git] / packaging / gcc-arm-linker.patch
1 2012-05-01  Richard Earnshaw  <rearnsha@arm.com>
2
3         * arm/linux-eabi.h (GLIBC_DYNAMIC_LINKER_DEFAULT): Avoid ifdef
4         comparing enumeration values.  Update comments.
5
6 2012-04-26  Michael Hope  <michael.hope@linaro.org>
7             Richard Earnshaw  <rearnsha@arm.com>
8
9         * config/arm/linux-eabi.h (GLIBC_DYNAMIC_LINKER_SOFT_FLOAT): Define.
10         (GLIBC_DYNAMIC_LINKER_HARD_FLOAT): Define.
11         (GLIBC_DYNAMIC_LINKER_DEFAULT): Define.
12         (GLIBC_DYNAMIC_LINKER): Redefine to use the hard float path.
13
14
15 --- gcc-4_7-branch/gcc/config/arm/linux-eabi.h  2012-03-02 13:36:59.221206250 +0100
16 +++ trunk/gcc/config/arm/linux-eabi.h   2012-05-03 19:41:43.484057843 +0200
17 @@ -32,7 +32,8 @@
18    while (false)
19  
20  /* We default to a soft-float ABI so that binaries can run on all
21 -   target hardware.  */
22 +   target hardware.  If you override this to use the hard-float ABI then
23 +   change the setting of GLIBC_DYNAMIC_LINKER_DEFAULT as well.  */
24  #undef  TARGET_DEFAULT_FLOAT_ABI
25  #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT
26  
27 @@ -59,10 +60,23 @@
28  #undef  SUBTARGET_EXTRA_LINK_SPEC
29  #define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION
30  
31 -/* Use ld-linux.so.3 so that it will be possible to run "classic"
32 -   GNU/Linux binaries on an EABI system.  */
33 +/* GNU/Linux on ARM currently supports three dynamic linkers:
34 +   - ld-linux.so.2 - for the legacy ABI
35 +   - ld-linux.so.3 - for the EABI-derived soft-float ABI
36 +   - ld-linux-armhf.so.3 - for the EABI-derived hard-float ABI.
37 +   All the dynamic linkers live in /lib.
38 +   We default to soft-float, but this can be overridden by changing both
39 +   GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI.  */
40 +
41  #undef  GLIBC_DYNAMIC_LINKER
42 -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3"
43 +#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3"
44 +#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3"
45 +#define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
46 +
47 +#define GLIBC_DYNAMIC_LINKER \
48 +   "%{mfloat-abi=hard:" GLIBC_DYNAMIC_LINKER_HARD_FLOAT "} \
49 +    %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
50 +    %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
51  
52  /* At this point, bpabi.h will have clobbered LINK_SPEC.  We want to
53     use the GNU/Linux version, not the generic BPABI version.  */