[asterisk-dev] [Code Review] fix detection of gcc attributes in menuselect

Tilghman Lesher tilghman at meg.abyt.es
Wed Aug 10 10:06:04 CDT 2011


On Tue, Aug 9, 2011 at 11:35 AM, Tzafrir Cohen <tzafrir.cohen at xorcom.com> wrote:
> On Sun, Aug 07, 2011 at 06:43:05AM -0000, Tilghman Lesher wrote:
>>
>> -----------------------------------------------------------
>> https://reviewboard.asterisk.org/r/1330/#review3998
>> -----------------------------------------------------------
>>
>>
>> The tests you've shown suggests that you've broken the test by
>> modifying it.  Again, you must test this on Asterisk, first, as that
>> is where the compilation will either fail or the Asterisk modules will
>> fail to load.  The test in menuselect JUST simplifies the process of
>> determining when to encode the workaround for a broken compiler.
>
> How can you tell that it is broken?
>
> Anyway, I applied the same fix on Asterisk, and I get:
>
> Before:
>
> before:
>
> centos4: /* #undef HAVE_ATTRIBUTE_weakref */
> centos5: /* #undef HAVE_ATTRIBUTE_weakref */
> centos6: #define HAVE_ATTRIBUTE_weakref 1
> sarge: /* #undef HAVE_ATTRIBUTE_weakref */
> etch: /* #undef HAVE_ATTRIBUTE_weakref */
> lenny: #define HAVE_ATTRIBUTE_weakref 1
> squeeze: #define HAVE_ATTRIBUTE_weakref
> wheezy: /* #undef HAVE_ATTRIBUTE_weakref */
>
>
> After:
>
> centos4: #define HAVE_ATTRIBUTE_weakref 1
> centos5: #define HAVE_ATTRIBUTE_weakref 1
> centos6: #define HAVE_ATTRIBUTE_weakref 1
> sarge: /* #undef HAVE_ATTRIBUTE_weakref */
> etch: #define HAVE_ATTRIBUTE_weakref 1
> lenny: #define HAVE_ATTRIBUTE_weakref 1
> squeeze: #define HAVE_ATTRIBUTE_weakref 1
> wheezy: #define HAVE_ATTRIBUTE_weakref 1
>
> Asterisk builds fine. What run-time tests do you need to verify it works
> properly?

Try disabling res_adsi in menuselect, compile app_voicemail, and start
Asterisk, either with autoload=yes or an explicit load of
app_voicemail.  The loading of app_voicemail should fail on any
distribution where the compiler is broken, such as this one, due to
the lack of res_adsi.  On other distributions, which have a compiler
such as gcc 4.4, where the bug is not present, app_voicemail should
load fine.



More information about the asterisk-dev mailing list