[asterisk-bugs] [Asterisk 0012289]: [patch] Cannot compile asterisk with DONT_OPTIMIZE on a 2.4 kernel and an old version of Slackware
noreply at bugs.digium.com
noreply at bugs.digium.com
Sun May 18 05:47:44 CDT 2008
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=12289
======================================================================
Reported By: francesco_r
Assigned To: Corydon76
======================================================================
Project: Asterisk
Issue ID: 12289
Category: Utilities/General
Reproducibility: always
Severity: minor
Priority: normal
Status: feedback
Asterisk Version: SVN
SVN Branch (only for SVN checkouts, not tarball releases): 1.4
SVN Revision (number only!): 110395
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 03-24-2008 11:11 CDT
Last Modified: 05-18-2008 05:47 CDT
======================================================================
Summary: [patch] Cannot compile asterisk with DONT_OPTIMIZE
on a 2.4 kernel and an old version of Slackware
Description:
I use Slackware 11 (gcc 3.4.6)
[CC] chan_phone.c -> chan_phone.o
In file included from /usr/src/asterisk-1.4/include/asterisk/cdr.h:49,
from
/usr/src/asterisk-1.4/include/asterisk/channel.h:115,
from chan_phone.c:57:
/usr/src/asterisk-1.4/include/asterisk/utils.h: In function
`_ast_asprintf':
/usr/src/asterisk-1.4/include/asterisk/utils.h:476: sorry, unimplemented:
functi on '_ast_asprintf' can never be inlined because it
uses variable argument lists
make[1]: *** [chan_phone.o] Error 1
======================================================================
----------------------------------------------------------------------
davidw - 05-18-08 05:47
----------------------------------------------------------------------
That didn't help. However it might be worth noting that
<http://gcc.gnu.org/onlinedocs/gcc/Inline.html#Inline> says that varargs is
incompatible with inlining in gcc anyway, so I think the difference between
compiler versions is that the newer version is generating a warning (which
might well be turned off), and the older version was, erroneously,
generating an error.
I've noticed that other parts of the code use gcc extensions (blocks as
expresssions, cf. BCPL VALOF), so even, which I suspect id doesn't,
standard C allows inlining of variadics, you are constrained by gcc
limitations.
As such, the real solution is to declare the functions without inline
(which will mean moving them, or wrapping them in the conditional that is
used to prevent the generation of multiple out of line copies, in the
current code).
Issue History
Date Modified Username Field Change
======================================================================
05-18-08 05:47 davidw Note Added: 0086989
======================================================================
More information about the asterisk-bugs
mailing list