X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/75a80d1ea4a5dadc26cfce2eced96d2f39a767fb..2bd31a667683983c69d6a5fde1d71a19f1c20a08:/tools/mklibs/patches/009-uclibc_libgcc_link.patch diff --git a/tools/mklibs/patches/009-uclibc_libgcc_link.patch b/tools/mklibs/patches/009-uclibc_libgcc_link.patch index e36b1c14c..d5e94068d 100644 --- a/tools/mklibs/patches/009-uclibc_libgcc_link.patch +++ b/tools/mklibs/patches/009-uclibc_libgcc_link.patch @@ -1,5 +1,5 @@ ---- a/src/mklibs -+++ b/src/mklibs +--- a/src/mklibs.py ++++ b/src/mklibs.py @@ -560,6 +560,7 @@ while 1: extra_flags = [] extra_pre_obj = [] @@ -8,15 +8,18 @@ symbols.update(library_symbols_used[library]) -@@ -575,6 +576,7 @@ while 1: +@@ -575,6 +576,10 @@ while 1: symbols.add(ProvidedSymbol('__uClibc_init', None, None, True)) symbols.add(ProvidedSymbol('__uClibc_fini', None, None, True)) extra_flags.append("-Wl,-init,__uClibc_init") ++ libgcc_link = "-lgcc_s_pic" ++ ++ if soname in ("libm.so.0"): + libgcc_link = "-lgcc_s_pic" map_file = find_pic_map(library) if map_file: -@@ -590,7 +592,7 @@ while 1: +@@ -590,7 +595,7 @@ while 1: cmd.append(pic_file) cmd.extend(extra_post_obj) cmd.extend(extra_flags)