b1dca6
commit 221e4babca17b363df2c56e839572e9f7ab7d127
b1dca6
Author: Joseph Myers <joseph@codesourcery.com>
b1dca6
Date:   Wed Sep 12 20:31:24 2018 +0000
b1dca6
b1dca6
    Include most of elf/ modules-names in modules-names-tests.
b1dca6
    
b1dca6
    I'm testing a patch to let the compiler expand calls to floor in libm
b1dca6
    as built-in function calls as much as possible, instead of calling
b1dca6
    __floor, so that no architecture-specific __floor inlines are needed,
b1dca6
    and then to arrange for non-inlined calls to end up calling __floor,
b1dca6
    as done with sqrt and __ieee754_sqrt.
b1dca6
    
b1dca6
    This shows up elf/tst-relsort1mod2.c calling floor, which must not be
b1dca6
    converted to a call to __floor.  Now, while an IS_IN (libm)
b1dca6
    conditional could be added to the existing conditionals on such
b1dca6
    redirections in include/math.h, the _ISOMAC conditional ought to
b1dca6
    suffice (code in other glibc libraries shouldn't be calling floor or
b1dca6
    sqrt anyway, as they aren't provided in libc and the other libraries
b1dca6
    don't link with libm).  But while tests are mostly now built with
b1dca6
    _ISOMAC defined, test modules in modules-names aren't unless also
b1dca6
    listed in modules-names-tests.
b1dca6
    
b1dca6
    As far as I can see, all the modules in modules-names in elf/ are in
b1dca6
    fact parts of tests and so listing them in modules-names-tests is
b1dca6
    appropriate, so they get built with something closer to the headers
b1dca6
    used for user code, except in a few cases that actually rely on
b1dca6
    something from internal headers.  This patch duly sets
b1dca6
    modules-names-tests there accordingly (filtering out those tests that
b1dca6
    fail to build without internal headers).
b1dca6
    
b1dca6
    Tested for x86_64, and with build-many-glibcs.py.
b1dca6
    
b1dca6
            * elf/Makefile (modules-names-tests): New variable.
b1dca6
b1dca6
Conflicts:
b1dca6
	elf/Makefile
b1dca6
	  (Different backport order for tests.)
b1dca6
b1dca6
diff --git a/elf/Makefile b/elf/Makefile
b1dca6
index b4b618ce62a9e6df..89dff92adfc417f5 100644
b1dca6
--- a/elf/Makefile
b1dca6
+++ b/elf/Makefile
b1dca6
@@ -306,6 +306,11 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
b1dca6
 		tst-dlopenfailmod3 \
b1dca6
 		tst-filterobj-flt tst-filterobj-aux tst-filterobj-filtee
b1dca6
 
b1dca6
+# Most modules build with _ISOMAC defined, but those filtered out
b1dca6
+# depend on internal headers.
b1dca6
+modules-names-tests = $(filter-out ifuncmod% tst-libc_dlvsym-dso tst-tlsmod%,\
b1dca6
+				   $(modules-names))
b1dca6
+
b1dca6
 ifeq (yes,$(have-mtls-dialect-gnu2))
b1dca6
 tests += tst-gnu2-tls1
b1dca6
 modules-names += tst-gnu2-tls1mod