gcc: add support for builtin gcc-atomics for gcc-4.3.x versions
[openembedded.git] / recipes / gcc / gcc-4.3.2 / gcc-4.4-20090519-arm-eabi-atomic-builtins-unbreak-v2.patch
1 --- gcc-4.4-20090519/gcc/config/arm/linux-eabi.h.~1~    2007-11-08 14:44:09.000000000 +0100
2 +++ gcc-4.4-20090519/gcc/config/arm/linux-eabi.h        2009-05-22 20:38:51.000000000 +0200
3 @@ -72,6 +72,49 @@
4     do not use -lfloat.  */
5  #undef LIBGCC_SPEC
6  
7 +/* Some symbols are only in the static libgcc. Override REAL_LIBGCC_SPEC
8 +   to always pass -lgcc to the linker, even for --shared-libgcc, otherwise
9 +   shared libraries break. */
10 +#ifdef ENABLE_SHARED_LIBGCC
11 +
12 +#ifndef USE_LD_AS_NEEDED
13 +#define USE_LD_AS_NEEDED 0
14 +#endif
15 +
16 +#if USE_LD_AS_NEEDED
17 +#define REAL_LIBGCC_SPEC_1 "\
18 +       %{!shared-libgcc:-lgcc --as-needed -lgcc_s --no-as-needed} \
19 +       %{shared-libgcc:-lgcc_s -lgcc}"         /* always append -lgcc */
20 +#else
21 +#define REAL_LIBGCC_SPEC_1 "\
22 +       %{!shared: \
23 +         %{!shared-libgcc:-lgcc -lgcc_eh} \
24 +         %{shared-libgcc:-lgcc_s -lgcc}}"
25 +#endif
26 +
27 +#ifdef LINK_EH_SPEC
28 +#define REAL_LIBGCC_SPEC_2 "\
29 +       %{shared: \
30 +         %{!shared-libgcc:-lgcc} \
31 +         %{shared-libgcc:-lgcc_s -lgcc}}"      /* always append -lgcc */
32 +#else
33 +#define REAL_LIBGCC_SPEC_2 "\
34 +       %{shared:-lgcc_s -lgcc}"                /* always append -lgcc */
35 +#endif
36 +
37 +#define REAL_LIBGCC_SPEC " \
38 +       %{static|static-libgcc:-lgcc -lgcc_eh} \
39 +       %{!static:%{!static-libgcc: \
40 +       "REAL_LIBGCC_SPEC_1" \
41 +       "REAL_LIBGCC_SPEC_2" \
42 +       }}"
43 +
44 +#else  /* !ENABLE_SHARED_LIBGCC */
45 +
46 +#define REAL_LIBGCC_SPEC " -lgcc "
47 +
48 +#endif /* !ENABLE_SHARED_LIBGCC */
49 +
50  /* Clear the instruction cache from `beg' to `end'.  This makes an
51     inline system call to SYS_cacheflush.  */
52  #undef  CLEAR_INSN_CACHE