gcc: include assembler functions in the shared libgcc_s library, fixes missing symbol...
[openwrt/svn-archive/archive.git] / toolchain / gcc / patches / linaro / 850-use_shared_libgcc.patch
1 --- a/gcc/config/arm/linux-eabi.h
2 +++ b/gcc/config/arm/linux-eabi.h
3 @@ -72,10 +72,6 @@
4 #undef LINK_SPEC
5 #define LINK_SPEC LINUX_TARGET_LINK_SPEC BE8_LINK_SPEC TARGET_FIX_V4BX_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.asm, so ensure an error if this definition
13 is used. */
14 --- a/gcc/config/arm/linux-elf.h
15 +++ b/gcc/config/arm/linux-elf.h
16 @@ -60,8 +60,6 @@
17 %{shared:-lc} \
18 %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
19
20 -#define LIBGCC_SPEC "-lgcc"
21 -
22 #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
23
24 #define LINUX_TARGET_LINK_SPEC "%{h*} %{version:-v} \
25 --- a/gcc/config/linux.h
26 +++ b/gcc/config/linux.h
27 @@ -104,6 +104,10 @@
28 #define USE_LD_AS_NEEDED 1
29 #endif
30
31 +#ifndef LIBGCC_SPEC
32 +#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}"
33 +#endif
34 +
35 /* Determine which dynamic linker to use depending on whether GLIBC or
36 uClibc is the default C library and whether -muclibc or -mglibc has
37 been passed to change the default. */
38 --- a/gcc/config/rs6000/ppc-asm.h
39 +++ b/gcc/config/rs6000/ppc-asm.h
40 @@ -325,8 +325,7 @@
41 FUNC_NAME(name):
42
43 #define HIDDEN_FUNC(name) \
44 - FUNC_START(name) \
45 - .hidden FUNC_NAME(name);
46 + FUNC_START(name);
47
48 #define FUNC_END(name) \
49 GLUE(.L,name): \
50 --- a/gcc/mkmap-symver.awk
51 +++ b/gcc/mkmap-symver.awk
52 @@ -132,5 +132,5 @@
53 else if (inherit[lib])
54 printf("} %s;\n", inherit[lib]);
55 else
56 - printf ("\n local:\n\t*;\n};\n");
57 + printf ("\n\t*;\n};\n");
58 }
59 --- a/libgcc/config/rs6000/t-ppccomm
60 +++ b/libgcc/config/rs6000/t-ppccomm
61 @@ -1,4 +1,4 @@
62 -LIB2ADD_ST += crtsavfpr.S crtresfpr.S \
63 +LIB2ADD += crtsavfpr.S crtresfpr.S \
64 crtsavgpr.S crtresgpr.S \
65 crtresxfpr.S crtresxgpr.S \
66 e500crtres32gpr.S \
67 --- a/libgcc/Makefile.in
68 +++ b/libgcc/Makefile.in
69 @@ -265,7 +265,7 @@
70 # For -fvisibility=hidden. We need both a -fvisibility=hidden on
71 # the command line, and a #define to prevent libgcc2.h etc from
72 # overriding that with #pragmas.
73 -vis_hide = @vis_hide@
74 +vis_hide =
75
76 ifneq (,$(vis_hide))
77