This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.24-519-g81e0662


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  81e0662e5f2c342ffa413826b7b100d56677b613 (commit)
      from  b0a679f4fd5363809a972b697e8a0b1fc66fcbb1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=81e0662e5f2c342ffa413826b7b100d56677b613

commit 81e0662e5f2c342ffa413826b7b100d56677b613
Author: Carlos O'Donell <carlos@redhat.com>
Date:   Fri Dec 23 13:46:56 2016 -0500

    Fix failing pretty printer tests when CPPFLAGS has optimizations.
    
    The value of CPPFLAGS provided by the environment may have optimizations
    that interfere with the pretty printer test requirements. To override
    such optimizations the pretty printer tests must also specify CPPFLAGS.
    The existing pretty printer tests are fixed and the
    README.pretty-printers is updated with the new requirement.

diff --git a/ChangeLog b/ChangeLog
index 48ea5d8..0dd96f2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2016-12-24  Carlos O'Donell  <carlos@redhat.com>
 
+	* README.pretty-printers: Must specify CPPFLAGS-* also.
+	* nptl/Makefile (CPPFLAGS-test-mutexattr-printers.c): Define.
+	(CPPFLAGS-test-mutex-printers.c): Define.
+	(CPPFLAGS-test-condattr-printers.c): Define.
+	(CPPFLAGS-test-cond-printers.c): Define.
+	(CPPFLAGS-test-rwlockattr-printers.c): Define.
+	(CPPFLAGS-test-rwlock-printers.c): Define.
+
 	* nss/Makefile [ifeq (yes,$(have-thread-library))]
 	(tests): Add tst-cancel-getpwuid_r.
 	* nss/tst-cancel-getpwuid_r.c: New file.
diff --git a/README.pretty-printers b/README.pretty-printers
index 8662900..a2536ca 100644
--- a/README.pretty-printers
+++ b/README.pretty-printers
@@ -126,11 +126,12 @@ You can use the existing unit tests as examples.
 
 4. Add the names of the pretty printer tests to the 'tests-printers' variable
 in your submodule's Makefile (without extensions).  In addition, for each test
-program you must define a corresponding CFLAGS-* variable and set it to
-$(CFLAGS-printers-tests) to ensure they're compiled correctly.  For example,
-test-foo-printer.c requires the following:
+program you must define a corresponding CFLAGS-* and CPPFLAGS-* variable and
+set it to $(CFLAGS-printers-tests) to ensure they're compiled correctly.  For
+example, test-foo-printer.c requires the following:
 
 CFLAGS-test-foo-printer.c := $(CFLAGS-printers-tests)
+CPPFLAGS-test-foo-printer.c := $(CFLAGS-printers-tests)
 
 Finally, if your programs need to be linked with a specific library, you can add
 its name to the 'tests-printers-libs' variable in your submodule's Makefile.
diff --git a/nptl/Makefile b/nptl/Makefile
index 7ac9196..bed5bab 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -318,12 +318,22 @@ tests-printers := test-mutexattr-printers test-mutex-printers \
 		  test-condattr-printers test-cond-printers \
 		  test-rwlockattr-printers test-rwlock-printers
 
+# We must specify both CFLAGS and CPPFLAGS to override any
+# compiler options the user might have provided that conflict
+# with what we need e.g. user specifies CPPFLAGS with -O2 and
+# we need -O0.
 CFLAGS-test-mutexattr-printers.c := $(CFLAGS-printers-tests)
 CFLAGS-test-mutex-printers.c := $(CFLAGS-printers-tests)
 CFLAGS-test-condattr-printers.c := $(CFLAGS-printers-tests)
 CFLAGS-test-cond-printers.c := $(CFLAGS-printers-tests)
 CFLAGS-test-rwlockattr-printers.c := $(CFLAGS-printers-tests)
 CFLAGS-test-rwlock-printers.c := $(CFLAGS-printers-tests)
+CPPFLAGS-test-mutexattr-printers.c := $(CFLAGS-printers-tests)
+CPPFLAGS-test-mutex-printers.c := $(CFLAGS-printers-tests)
+CPPFLAGS-test-condattr-printers.c := $(CFLAGS-printers-tests)
+CPPFLAGS-test-cond-printers.c := $(CFLAGS-printers-tests)
+CPPFLAGS-test-rwlockattr-printers.c := $(CFLAGS-printers-tests)
+CPPFLAGS-test-rwlock-printers.c := $(CFLAGS-printers-tests)
 
 ifeq ($(build-shared),yes)
 tests-printers-libs := $(shared-thread-library)
diff --git a/nptl/test-condattr-printers.c b/nptl/test-condattr-printers.c
index 4db4098..2815d02 100644
--- a/nptl/test-condattr-printers.c
+++ b/nptl/test-condattr-printers.c
@@ -66,6 +66,7 @@ condvar_reinit (pthread_cond_t *condvar, const pthread_condattr_t *attr)
 }
 
 /* Tests setting the clock ID attribute.  */
+__attribute__ ((noinline))
 static int
 test_setclock (pthread_cond_t *condvar, pthread_condattr_t *attr)
 {

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                     |    8 ++++++++
 README.pretty-printers        |    7 ++++---
 nptl/Makefile                 |   10 ++++++++++
 nptl/test-condattr-printers.c |    1 +
 4 files changed, 23 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]