diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-07-03 06:22:20 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-07-03 06:22:20 +0000 |
commit | 4836768df76d3919451aa9f847182c8f5f4068e7 (patch) | |
tree | 54feed2e3b0b50e8933bf74486060caa9a134502 /extra/gcc-uClibc/gcc-uClibc.c | |
parent | 094983cd14c21fe112a5ef09bbd347b938349e86 (diff) |
Allow the shared lib loader to fallback on the builddir if everything
else fails. Let <arch>-uclibc-gcc --uclibc-use-build-dir set the
shared lib loader to the one in the builddir's path.
-Erik
Diffstat (limited to 'extra/gcc-uClibc/gcc-uClibc.c')
-rw-r--r-- | extra/gcc-uClibc/gcc-uClibc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/extra/gcc-uClibc/gcc-uClibc.c b/extra/gcc-uClibc/gcc-uClibc.c index b5a392086..a114160d5 100644 --- a/extra/gcc-uClibc/gcc-uClibc.c +++ b/extra/gcc-uClibc/gcc-uClibc.c @@ -118,8 +118,10 @@ int main(int argc, char **argv) int i, j; char ** gcc_argv; char *dlstr; + char *build_dlstr; char *ep; + build_dlstr = "-Wl,--dynamic-linker," BUILD_DYNAMIC_LINKER; dlstr = getenv("UCLIBC_GCC_DLOPT"); if (!dlstr) { dlstr = "-Wl,--dynamic-linker," DYNAMIC_LINKER; @@ -216,7 +218,9 @@ int main(int argc, char **argv) } if (linking && source_count) { if (!use_static_linking) { - if (dlstr) { + if (dlstr && use_build_dir) { + gcc_argv[i++] = build_dlstr; + } else if (dlstr) { gcc_argv[i++] = dlstr; } if (use_rpath) { |