[asterisk-commits] twilson: branch twilson/config_work r366600 - /team/twilson/config_work/Makefile

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 15 19:13:18 CDT 2012


Author: twilson
Date: Tue May 15 19:13:14 2012
New Revision: 366600

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=366600
Log:
Test for gcc >= 4.6 for -Wtrampolines

Modified:
    team/twilson/config_work/Makefile

Modified: team/twilson/config_work/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/twilson/config_work/Makefile?view=diff&rev=366600&r1=366599&r2=366600
==============================================================================
--- team/twilson/config_work/Makefile (original)
+++ team/twilson/config_work/Makefile Tue May 15 19:13:14 2012
@@ -186,6 +186,10 @@
 _ASTCFLAGS+=-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations $(DEBUG)
 ADDL_TARGETS=
 
+GCCVERSION := $(shell gcc -dumpversion)
+GCCMAJORVERSION := $(word 1, $(subst ., ,$(GCCVERSION)))
+GCCMINORVERSION := $(word 2, $(subst ., ,$(GCCVERSION)))
+gcccheck=$(shell test $(GCCMAJORVERSION) -ge $(1) -a $(GCCMINORVERSION) -ge $(2); echo $$?)
 ifeq ($(AST_DEVMODE),yes)
   _ASTCFLAGS+=-Werror
   _ASTCFLAGS+=-Wunused
@@ -194,7 +198,9 @@
   _ASTCFLAGS+=-Wundef
   _ASTCFLAGS+=-Wmissing-format-attribute
   _ASTCFLAGS+=-Wformat=2
-  _ASTCFLAGS+=-Wtrampolines
+  ifeq ($(call gcccheck,4,6),0)
+    _ASTCFLAGS+=-Wtrampolines
+  endif
   ifeq ($(AST_DEVMODE_STRICT),yes)
     _ASTCFLAGS+=-Wshadow
   endif




More information about the asterisk-commits mailing list