[asterisk-commits] coreyfarrell: branch 12 r427683 - in /branches/12: ./ apps/confbridge/ codecs...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Nov 12 07:45:37 CST 2014


Author: coreyfarrell
Date: Wed Nov 12 07:45:34 2014
New Revision: 427683

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=427683
Log:
Fix compiler error when using ./configure --enable-dev-mode --enable-coverage

When DONT_OPTIMIZE is enabled with dev-mode, it causes a shadow compilation
to be done with output to /dev/null.  This can cause errors with coverage
when GCC attempts to write to /dev/null.gcno.  This change disables
coverage for the shadow compilation.

ASTERISK-24502 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4151/
........

Merged revisions 427682 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    branches/12/   (props changed)
    branches/12/Makefile.rules
    branches/12/apps/confbridge/   (props changed)
    branches/12/codecs/ilbc/   (props changed)
    branches/12/codecs/speex/   (props changed)
    branches/12/tests/   (props changed)

Propchange: branches/12/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: branches/12/Makefile.rules
URL: http://svnview.digium.com/svn/asterisk/branches/12/Makefile.rules?view=diff&rev=427683&r1=427682&r2=427683
==============================================================================
--- branches/12/Makefile.rules (original)
+++ branches/12/Makefile.rules Wed Nov 12 07:45:34 2014
@@ -50,8 +50,10 @@
 endif
 
 ifeq ($(AST_CODE_COVERAGE),yes)
-    _ASTCFLAGS+=-ftest-coverage -fprofile-arcs
+    _ASTCFLAGS_COVERAGE=-ftest-coverage -fprofile-arcs
     _ASTLDFLAGS+=-ftest-coverage -fprofile-arcs
+else
+    _ASTCFLAGS_COVERAGE=
 endif
 
 ifeq ($(findstring $(CONFIG_CFLAGS),$(_ASTCFLAGS)),)
@@ -95,41 +97,41 @@
 ifeq ($(COMPILE_DOUBLE),yes)
 	$(CMD_PREFIX) $(CC) -o /dev/null -c $< $(CC_CFLAGS) $(OPTIMIZE)
 endif
-	$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS)
+	$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS) $(_ASTCFLAGS_COVERAGE)
 
 %.o: %.i
 	$(ECHO_PREFIX) echo "   [CCi] $< -> $@"
 ifeq ($(COMPILE_DOUBLE),yes)
 	$(CMD_PREFIX) $(CC) -o /dev/null -c $< $(CC_CFLAGS) $(OPTIMIZE)
 endif
-	$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS)
+	$(CMD_PREFIX) $(CC) -o $@ -c $< $(CC_CFLAGS) $(_ASTCFLAGS_COVERAGE)
 
 ifneq ($(COMPILE_DOUBLE),yes)
 %.o: %.c
 	$(ECHO_PREFIX) echo "   [CC] $< -> $@"
-	$(CMD_PREFIX) $(CC) -o $@ -c $< $(MAKE_DEPS) $(CC_CFLAGS)
+	$(CMD_PREFIX) $(CC) -o $@ -c $< $(MAKE_DEPS) $(CC_CFLAGS) $(_ASTCFLAGS_COVERAGE)
 endif
 
 %.i: %.c
 	$(ECHO_PREFIX) echo "   [CPP] $< -> $@"
-	$(CMD_PREFIX) $(CC) -o $@ -E $< $(MAKE_DEPS) $(CC_CFLAGS)
+	$(CMD_PREFIX) $(CC) -o $@ -E $< $(MAKE_DEPS) $(CC_CFLAGS) $(_ASTCFLAGS_COVERAGE)
 
 %.oo: %.ii
 	$(ECHO_PREFIX) echo "   [CXXi] $< -> $@"
 ifeq ($(COMPILE_DOUBLE),yes)
 	$(CMD_PREFIX) $(CXX) -o /dev/null -c $< $(CXX_CFLAGS) $(OPTIMIZE)
 endif
-	$(CMD_PREFIX) $(CXX) -o $@ -c $< $(CXX_CFLAGS)
+	$(CMD_PREFIX) $(CXX) -o $@ -c $< $(CXX_CFLAGS) $(_ASTCFLAGS_COVERAGE)
 
 ifneq ($(COMPILE_DOUBLE),yes)
 %.oo: %.cc
 	$(ECHO_PREFIX) echo "   [CXX] $< -> $@"
-	$(CMD_PREFIX) $(CXX) -o $@ -c $< $(MAKE_DEPS) $(CXX_CFLAGS)
+	$(CMD_PREFIX) $(CXX) -o $@ -c $< $(MAKE_DEPS) $(CXX_CFLAGS) $(_ASTCFLAGS_COVERAGE)
 endif
 
 %.ii: %.cc
 	$(ECHO_PREFIX) echo "   [CPP] $< -> $@"
-	$(CMD_PREFIX) $(CXX) -o $@ -E $< $(MAKE_DEPS) $(CXX_CFLAGS)
+	$(CMD_PREFIX) $(CXX) -o $@ -E $< $(MAKE_DEPS) $(CXX_CFLAGS) $(_ASTCFLAGS_COVERAGE)
 
 %.so: %.o
 ifeq ($(GNU_LD),1)

Propchange: branches/12/apps/confbridge/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Nov 12 07:45:34 2014
@@ -1,2 +1,4 @@
 *.o
 *.i
+*.gcno
+*.gcda

Propchange: branches/12/codecs/ilbc/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Nov 12 07:45:34 2014
@@ -6,5 +6,7 @@
 *.so
 *.c
 *.h
+*.gcno
+*.gcda
 rfc3951.txt
 extract-cfile.awk

Propchange: branches/12/codecs/speex/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Nov 12 07:45:34 2014
@@ -1,2 +1,4 @@
 *.o
 *.i
+*.gcno
+*.gcda

Propchange: branches/12/tests/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Nov 12 07:45:34 2014
@@ -9,3 +9,5 @@
 *.so
 *.exports
 modules.link
+*.gcno
+*.gcda




More information about the asterisk-commits mailing list