X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/3be86926244f0acddcb3c94601ee9062a8bf3572..8353f55c94b26f71d1b06c7681cbf28148870910:/toolchain/gcc/patches/linaro/850-use_shared_libgcc.patch diff --git a/toolchain/gcc/patches/linaro/850-use_shared_libgcc.patch b/toolchain/gcc/patches/linaro/850-use_shared_libgcc.patch index ac0514916..5e33c9d4e 100644 --- a/toolchain/gcc/patches/linaro/850-use_shared_libgcc.patch +++ b/toolchain/gcc/patches/linaro/850-use_shared_libgcc.patch @@ -24,14 +24,45 @@ #define LINUX_TARGET_LINK_SPEC "%{h*} %{version:-v} \ --- a/gcc/config/linux.h +++ b/gcc/config/linux.h -@@ -104,6 +104,10 @@ see the files COPYING3 and COPYING.RUNTI +@@ -104,6 +104,10 @@ #define USE_LD_AS_NEEDED 1 #endif +#ifndef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:-lgcc_s}}" ++#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}" +#endif + /* Determine which dynamic linker to use depending on whether GLIBC or uClibc is the default C library and whether -muclibc or -mglibc has been passed to change the default. */ +--- a/gcc/mkmap-symver.awk ++++ b/gcc/mkmap-symver.awk +@@ -132,5 +132,5 @@ + else if (inherit[lib]) + printf("} %s;\n", inherit[lib]); + else +- printf ("\n local:\n\t*;\n};\n"); ++ printf ("\n\t*;\n};\n"); + } +--- a/libgcc/Makefile.in ++++ b/libgcc/Makefile.in +@@ -265,7 +265,7 @@ + # For -fvisibility=hidden. We need both a -fvisibility=hidden on + # the command line, and a #define to prevent libgcc2.h etc from + # overriding that with #pragmas. +-vis_hide = @vis_hide@ ++vis_hide = + + ifneq (,$(vis_hide)) + +--- a/gcc/config/rs6000/linux.h ++++ b/gcc/config/rs6000/linux.h +@@ -85,6 +85,8 @@ + #define USE_LD_AS_NEEDED 1 + #endif + ++#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc" ++ + #undef TARGET_VERSION + #define TARGET_VERSION fprintf (stderr, " (PowerPC GNU/Linux)"); +