aboutsummaryrefslogtreecommitdiff
path: root/Makeconfig
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-12-23 01:55:26 +0000
committerUlrich Drepper <drepper@redhat.com>2005-12-23 01:55:26 +0000
commit7735afa212034346f31baa6aee5466de74309541 (patch)
treeeaabd29135191d9edf4f6c2f5fcd75e2a57e69a9 /Makeconfig
parent331926097f7dd22ef585d75c16bc5d992b991ee4 (diff)
downloadglibc-7735afa212034346f31baa6aee5466de74309541.zip
glibc-7735afa212034346f31baa6aee5466de74309541.tar.gz
glibc-7735afa212034346f31baa6aee5466de74309541.tar.bz2
* Makeconfig: Define CXXFLAGS. Split out warnings from +gccwarn which
are not understood by the C++ compiler. * Makerules: Add rules to build C++ code for test cases. * include/stdlib.h: Protect for inclusion in C++ code. * include/time.h: Likewise. * test-skeleton.c (timeout_handler): Rewrite ts initialization for C++ compatibility.
Diffstat (limited to 'Makeconfig')
-rw-r--r--Makeconfig12
1 files changed, 8 insertions, 4 deletions
diff --git a/Makeconfig b/Makeconfig
index f8de97d..f32a19e 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -552,10 +552,11 @@ endif
# Extra flags to pass to GCC.
ifeq ($(all-warnings),yes)
-+gccwarn := -Wall -Wwrite-strings -Winline -Wstrict-prototypes -Wcast-qual -Wbad-function-cast -Wmissing-noreturn -Wmissing-prototypes -Wmissing-declarations -Wcomment -Wcomments -Wtrigraphs -Wsign-compare -Wfloat-equal -Wmultichar
++gccwarn := -Wall -Wwrite-strings -Winline -Wcast-qual -Wbad-function-cast -Wmissing-noreturn -Wmissing-prototypes -Wmissing-declarations -Wcomment -Wcomments -Wtrigraphs -Wsign-compare -Wfloat-equal -Wmultichar
else
-+gccwarn := -Wall -Wwrite-strings -Winline -Wstrict-prototypes
++gccwarn := -Wall -Wwrite-strings -Winline
endif
++gccwarn-c = -Wstrict-prototypes
# We do not depend on the address of constants in different files to be
# actually different, so allow the compiler to merge them all.
@@ -647,8 +648,11 @@ CPPFLAGS = $($(subdir)-CPPFLAGS) $(+includes) $(defines) \
$(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
$(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
override CFLAGS = -std=gnu99 \
- $(filter-out %frame-pointer,$(+cflags)) $(sysdep-CFLAGS) \
- $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) $(CFLAGS-$(@F))
+ $(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
+ $(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \
+ $(CFLAGS-$(@F))
+override CXXFLAGS = $(filter-out %frame-pointer,$(+cflags)) $(sysdep-CFLAGS) \
+ $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) $(CFLAGS-$(@F))
# If everything is compiled with -fPIC (implicitly) we must tell this by
# defining the PIC symbol.