]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Move -U__LIBC_INTERNAL_MATH_INLINES to test-math-inline.h.
authorJoseph Myers <joseph@codesourcery.com>
Thu, 9 Feb 2017 17:32:48 +0000 (17:32 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Thu, 9 Feb 2017 17:32:48 +0000 (17:32 +0000)
The libm tests of inline functions undefine __NO_MATH_INLINES (from
math-CPPFLAGS) in test-math-inline.h, but __LIBC_INTERNAL_MATH_INLINES
via -U options in the makefile.

This is an odd inconsistency between the handling of the two macros.
It also depends on the ordering (in compilation commands) of the
various variables providing compiler options (which I think is why
it's using CPPFLAGS-*.c instead of CFLAGS-*.c).

This patch moves the undefine to test-math-inline.h, so improving
consistency and eliminating the dependency on the order in which
variables go in the compilation commands.  The CPPFLAGS-*.c variables
are renamed to CFLAGS-*.c, matching those for the non-inline libm
function tests.

By moving the -U option to the header file, this should ensure that
ordering issues don't arise with a subsequent move of the options to
these tests to target-specific CFLAGS += ... variable settings (for
when tests for each function are build separately and so compilation
options need setting for many more makefile targets, for which
target-specific variable settings seem to be the most convenient form
to generate with iterators).

Tested for x86_64.

* math/test-math-inline.h (__LIBC_INTERNAL_MATH_INLINES): Undefine
macro.
* math/Makefile (CPPFLAGS-test-ifloat.c): Rename to ...
(CFLAGS-test-ifloat.c): ... this.  Remove
-U__LIBC_INTERNAL_MATH_INLINES.
* math/Makefile (CPPFLAGS-test-idouble.c): Rename to ...
(CFLAGS-test-idouble.c): ... this.  Remove
-U__LIBC_INTERNAL_MATH_INLINES.
* math/Makefile (CPPFLAGS-test-ildouble.c): Rename to ...
(CFLAGS-test-ildouble.c): ... this.  Remove
-U__LIBC_INTERNAL_MATH_INLINES.

ChangeLog
math/Makefile
math/test-math-inline.h

index f6ad6de5196abb10766c7e14c02d65f741a83ec9..68ca50508fd0d08f29b1ed6af31256af416dc791 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2017-02-09  Joseph Myers  <joseph@codesourcery.com>
+
+       * math/test-math-inline.h (__LIBC_INTERNAL_MATH_INLINES): Undefine
+       macro.
+       * math/Makefile (CPPFLAGS-test-ifloat.c): Rename to ...
+       (CFLAGS-test-ifloat.c): ... this.  Remove
+       -U__LIBC_INTERNAL_MATH_INLINES.
+       * math/Makefile (CPPFLAGS-test-idouble.c): Rename to ...
+       (CFLAGS-test-idouble.c): ... this.  Remove
+       -U__LIBC_INTERNAL_MATH_INLINES.
+       * math/Makefile (CPPFLAGS-test-ildouble.c): Rename to ...
+       (CFLAGS-test-ildouble.c): ... this.  Remove
+       -U__LIBC_INTERNAL_MATH_INLINES.
+
 2017-02-08  Joseph Myers  <joseph@codesourcery.com>
 
        * math/libm-test-support.c: New file.  Content from
index e5e44128862779718bdc327d1b2ff2cb4f63565c..5d93b4fa4cbe7e068b4c4c78cc5e5707928d0d0b 100644 (file)
@@ -309,12 +309,9 @@ CFLAGS-test-tgmath-ret.c = -fno-builtin
 CFLAGS-test-powl.c = -fno-builtin
 
 CFLAGS-test-snan.c = -fsignaling-nans
-CPPFLAGS-test-ifloat.c = -U__LIBC_INTERNAL_MATH_INLINES \
-                        $(libm-test-fast-math-cflags)
-CPPFLAGS-test-idouble.c = -U__LIBC_INTERNAL_MATH_INLINES \
-                         $(libm-test-fast-math-cflags)
-CPPFLAGS-test-ildouble.c = -U__LIBC_INTERNAL_MATH_INLINES \
-                         $(libm-test-fast-math-cflags)
+CFLAGS-test-ifloat.c = $(libm-test-fast-math-cflags)
+CFLAGS-test-idouble.c = $(libm-test-fast-math-cflags)
+CFLAGS-test-ildouble.c = $(libm-test-fast-math-cflags)
 
 CFLAGS-test-signgam-finite.c = -ffinite-math-only
 CFLAGS-test-signgam-finite-c99.c = -ffinite-math-only -std=c99
index faf91c595a306e0f46e62a6136a891dd402e3388..2a29f3ce0725e16b21c303bbb282741f28755359 100644 (file)
@@ -21,6 +21,7 @@
 #define TEST_ERRNO 0
 #define TEST_EXCEPTIONS 0
 
+#undef __LIBC_INTERNAL_MATH_INLINES
 #ifdef __NO_MATH_INLINES
 # undef __NO_MATH_INLINES
 #endif