This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Run ld.so tests only if $(build-shared) is yes
- From: Roland McGrath <roland at hack dot frob dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 10 Sep 2012 16:08:16 -0700 (PDT)
- Subject: Re: [PATCH] Run ld.so tests only if $(build-shared) is yes
- References: <20120910130629.GA20970@intel.com>
> * elf/Makefile (tests): Add tst-tls9, $(objpfx)noload-mem
> and $(objpfx)tst-unused-dep.out only if $(build-shared) is yes.
> * sysdeps/x86_64/Makefile (tests): Add tst-quad1, tst-quad2,
> $(objpfx)tst-xmmymm.out only if $(build-shared) is yes.
Here you are using a single entry to describe the variable "tests" and the
target "tests". That is hard to follow. Instead, do something like:
* elf/Makefile (tests): Append tst-tls9 only under
[$(build-shared) = yes].
(tests): Depend on $(objpfx)noload-mem and $(objpfx)tst-unused-dep.out
only under [$(build-shared) = yes].
As to the change itself, this change is not particularly bad. But there
are several more like it coming and that emphasizes how clunky a way to
handle the situation this is.
I think it would be better to add a little infrastructure support.
Then add these tests to a new variable like "tests-shared-only"
rather than repeating the same conditional lots of places.
Thanks,
Roland