Message ID | 52089593.3050108@linaro.org |
---|---|
State | Superseded |
Headers | show |
What's the failure? The program directly uses both libpthread and libdl functions.
The bug is probably that this is using LDFLAGS which comes too early to see the references. Internal library references should be added to the dependency list of the target. Andreas.
> The bug is probably that this is using LDFLAGS which comes too early to > see the references. Internal library references should be added to the > dependency list of the target. Good point.
On 20 August 2013 23:55, Andreas Schwab <schwab@linux-m68k.org> wrote: Hi Andreas, > The bug is probably that this is using LDFLAGS which comes too early to > see the references. Internal library references should be added to the > dependency list of the target. Yes, this is the cause of the problem I am seeing. Is there a better way to fix it than the patch I proposed? I am not familiar enough with the build infrastructure yet to know what the best way is. Thanks,
diff --git a/stdlib/Makefile b/stdlib/Makefile index 17d80e0..969dd51 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -161,6 +161,6 @@ $(objpfx)tst-strtod6: $(link-libm) tst-tls-atexit-lib.so-no-z-defs = yes -LDFLAGS-tst-tls-atexit = $(common-objpfx)nptl/libpthread.so \ +LDFLAGS-tst-tls-atexit = $(no-as-needed) $(common-objpfx)nptl/libpthread.so \ $(common-objpfx)dlfcn/libdl.so $(objpfx)tst-tls-atexit.out: $(objpfx)tst-tls-atexit-lib.so