[PATCH xserver] tests: fix library order comment

Mihail Konev k.mvc at ya.ru
Thu Feb 2 05:31:28 UTC 2017


Actually those *_SYS_LIBS are missing from LIBADD's in other makefiles,
and libtool does no reordering.

As the original patch then needs to be reverted anyway,
maybe merging the fix would be noisy.

On Thu, Feb 02, 2017 at 10:04:03AM +0500, Mihail Konev wrote:
> ld.gold ignores --as-needed
> (Observable by: make -C test tests V=1 CFLAGS='-v')
> 
> Fixes: b1a69863 ("tests: shuffle around the linking order")
> Signed-off-by: Mihail Konev <k.mvc at ya.ru>
> ---
> Ubuntu patches gcc builtin -specs= file (the gcc -dumpspec),
> but gold ignores the arg.
> 
>  test/Makefile.am | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/test/Makefile.am b/test/Makefile.am
> index e7fe587bb858..1cf03c472bc4 100644
> --- a/test/Makefile.am
> +++ b/test/Makefile.am
> @@ -225,8 +225,8 @@ endif
>  
>  endif !XORG
>  
> -# GNU LD scans only in one direction, add the following dependencies at the end
> -# so as they get picked up by the previously-linked libraries
> +# Shared libraries must be added at the end to not be discarded by
> +#  gcc -Wl,--as-needed ...
>  tests_LDADD += $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLX_SYS_LIBS)
>  
>  endif ENABLE_UNIT_TESTS
> -- 
> 2.9.2
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel


More information about the xorg-devel mailing list