ee3f602731f402992aae133eb121d1b89c5ae6cd
[openwrt.git] / toolchain / gcc / patches / 4.8-linaro / 850-use_shared_libgcc.patch
1 --- a/gcc/config/arm/linux-eabi.h
2 +++ b/gcc/config/arm/linux-eabi.h
3 @@ -118,10 +118,6 @@
4  #define ENDFILE_SPEC \
5    LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC)
6  
7 -/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we
8 -   do not use -lfloat.  */
9 -#undef LIBGCC_SPEC
10 -
11  /* Clear the instruction cache from `beg' to `end'.  This is
12     implemented in lib1funcs.S, so ensure an error if this definition
13     is used.  */
14 --- a/gcc/config/linux.h
15 +++ b/gcc/config/linux.h
16 @@ -51,6 +51,10 @@ see the files COPYING3 and COPYING.RUNTI
17         builtin_assert ("system=posix");                        \
18      } while (0)
19  
20 +#ifndef LIBGCC_SPEC
21 +#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}"
22 +#endif
23 +
24  /* Determine which dynamic linker to use depending on whether GLIBC or
25     uClibc or Bionic is the default C library and whether
26     -muclibc or -mglibc or -mbionic has been passed to change the default.  */
27 --- a/libgcc/mkmap-symver.awk
28 +++ b/libgcc/mkmap-symver.awk
29 @@ -132,5 +132,5 @@ function output(lib) {
30    else if (inherit[lib])
31      printf("} %s;\n", inherit[lib]);
32    else
33 -    printf ("\n  local:\n\t*;\n};\n");
34 +    printf ("\n\t*;\n};\n");
35  }
36 --- a/libgcc/Makefile.in
37 +++ b/libgcc/Makefile.in
38 @@ -368,7 +368,7 @@ endif
39  # For -fvisibility=hidden.  We need both a -fvisibility=hidden on
40  # the command line, and a #define to prevent libgcc2.h etc from
41  # overriding that with #pragmas.
42 -vis_hide = @vis_hide@
43 +vis_hide =
44  
45  ifneq (,$(vis_hide))
46  
47 --- a/gcc/config/rs6000/linux.h
48 +++ b/gcc/config/rs6000/linux.h
49 @@ -61,6 +61,9 @@
50  #undef  CPLUSPLUS_CPP_SPEC
51  #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
52  
53 +#undef LIBGCC_SPEC
54 +#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc"
55 +
56  #undef  LINK_SHLIB_SPEC
57  #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}"
58