[asterisk-dev] [Code Review] 4151: Fix compiler error when using ./configure --enable-dev-mode --enable-coverage

Matt Jordan reviewboard at asterisk.org
Fri Nov 7 16:22:39 CST 2014



> On Nov. 6, 2014, 5:04 a.m., wdoekes wrote:
> > Isn't the better fix to disable coverage for the shadow compilation?
> 
> Corey Farrell wrote:
>     Probably.  I have updated code but I won't have time to test until this weekend.  I'll update the review once I've had a chance to do some builds with it.

I'm kind of surprised by this, since the build agents compile with --enable-dev-mode and --enable-coverage:

https://bamboo.asterisk.org/bamboo/browse/AST-ATSF-410/artifact/C632TE/Coverage/coverage.tar.gz


- Matt


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4151/#review13701
-----------------------------------------------------------


On Nov. 6, 2014, 4:06 a.m., Corey Farrell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4151/
> -----------------------------------------------------------
> 
> (Updated Nov. 6, 2014, 4:06 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-24502
>     https://issues.asterisk.org/jira/browse/ASTERISK-24502
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> When coverage and dev-mode are enabled with DONT_OPTIMIZE, it causes build failure.  The double compilation does a 'shadow' build of each file with output to /dev/null.  Unfortunately when coverage is enabled, GCC tries writing to /dev/null.gcno (at least some versions do).  This prevents the build from proceeding.
> 
> The simple fix is to simply prevent COMPILE_DOUBLE when coverage is enabled, that is what I'm proposing here.  The other option would be to use a real output location instead of /dev/null, delete the file immediately after building.  I'm not sure that is needed, so I've proposed the simpler fix.
> 
> 
> Diffs
> -----
> 
>   /branches/11/Makefile.rules 427380 
> 
> Diff: https://reviewboard.asterisk.org/r/4151/diff/
> 
> 
> Testing
> -------
> 
> Build with these options now works in Linux Mint 17 (gcc 4.8.2-19ubuntu1).
> 
> 
> Thanks,
> 
> Corey Farrell
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20141107/6968e525/attachment.html>


More information about the asterisk-dev mailing list