Author: sebor
Date: Thu Jan 5 16:07:15 2006
New Revision: 366347
URL: http://svn.apache.org/viewcvs?rev=366347&view=rev
Log:
2006-01-05 Martin Sebor <[EMAIL PROTECTED]>
* gcc.config: Used := instead of plain assignment when invoking
the $(shell) make function, for efficiency.
Added -Wextra to the set of compiler options for gcc 3 and beyond.
Modified:
incubator/stdcxx/trunk/etc/config/gcc.config
Modified: incubator/stdcxx/trunk/etc/config/gcc.config
URL:
http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/etc/config/gcc.config?rev=366347&r1=366346&r2=366347&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/gcc.config (original)
+++ incubator/stdcxx/trunk/etc/config/gcc.config Thu Jan 5 16:07:15 2006
@@ -6,19 +6,23 @@
##############################################################################
CXX = gcc
-CCVER = $(shell $(CXX) -dumpversion | sed
"s/[^0-9]*\([0-9.]*\).*/\1/g")
+CCVER := $(shell $(CXX) -dumpversion | sed
"s/[^0-9]*\([0-9.]*\).*/\1/g")
# determine the major version of gcc
-CXX_MAJOR = $(shell echo "$(CCVER)" | sed "s/^\([1-9][0-9]*\).*/\1/")
-CXX_MINOR = $(shell echo "$(CCVER)" | sed "s/[1-9]*\.\([0-9]*\).*/\1/")
+CXX_MAJOR := $(shell echo "$(CCVER)" | sed "s/^\([1-9][0-9]*\).*/\1/")
+CXX_MINOR := $(shell echo "$(CCVER)" | sed "s/[1-9]*\.\([0-9]*\).*/\1/")
-WARNFLAGS = -Wall -W -Wcast-qual -Winline -Wshadow -Wwrite-strings
+WARNFLAGS = -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings
# -Wno-long-long not available prior to 2.90
ifeq ($(shell [ $(CXX_MAJOR) -gt 2 -o $(CXX_MAJOR) -eq 2 -a $(CXX_MINOR) -ge
90 ] && echo 1), 1)
WARNFLAGS += -Wno-long-long
endif # gcc >= 2.90
+# enable additional warnings with gcc 3 and above
+ifneq ($(CXX_MAJOR),2)
+ WARNFLAGS += -Wextra
+endif
# prevent (bogus?) warnings on SunOS
ifneq ($(OSNAME),SunOS)