Re: [asterisk-dev] Compiler feature requirements

2018-01-29 Thread Corey Farrell
This will definitely break any compilers older than gcc-4.1.2, but no 
major distribution (that I know of) has a supported release with this.  
CentOS 6 is the only major distro that will even use the __sync [1] 
methods. All other major distro's have gcc >= 4.7.0 which implements 
__atomic built-ins.


I tested OSX El Capitain, the configure script detected __atomic 
built-ins so this will not create any new issues for Mac.


[1] https://gist.github.com/coreyfarrell/c096dd335afee5502a6faee2a507b012

On 01/26/2018 03:20 PM, Matt Fredrickson wrote:

On Wed, Jan 24, 2018 at 3:50 PM, Corey Farrell  wrote:

I've posted ASTERISK-27619 [1] proposing that we drop support for GCC
versions older than 4.1.2.  Specifically we'd be requiring that either
__sync or __atomic builtin functions be available (I'm unsure what this will
do to clang requirements).  gcc-4.1.2 was released in February 2007 and was
the version provided by CentOS 5.  I've posted a PR to the jansson project
[2] which will make reference counting thread safe, but I'm getting
push-back on the parts needed to provide a replacement function for old
compilers.  Since reference counting in jansson was never thread safe before
I think they'd rather just leave it as is for old compilers.

Obviously this proposal is for Asterisk 16+ only.  Does this matter to any
distributions that will be supported beyond this October?

[1] https://issues.asterisk.org/jira/browse/ASTERISK-27619
[2] https://github.com/akheron/jansson/pull/389

As long as we don't impact any major, currently supported
distributions that may use earlier versions than gcc-4.1.2, I'm ok
with moving things forward as suggested.  Especially since this is
isolated to master/proposed-16.

Anybody else have any thoughts?




--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] Compiler feature requirements

2018-01-26 Thread Matt Fredrickson
On Wed, Jan 24, 2018 at 3:50 PM, Corey Farrell  wrote:
> I've posted ASTERISK-27619 [1] proposing that we drop support for GCC
> versions older than 4.1.2.  Specifically we'd be requiring that either
> __sync or __atomic builtin functions be available (I'm unsure what this will
> do to clang requirements).  gcc-4.1.2 was released in February 2007 and was
> the version provided by CentOS 5.  I've posted a PR to the jansson project
> [2] which will make reference counting thread safe, but I'm getting
> push-back on the parts needed to provide a replacement function for old
> compilers.  Since reference counting in jansson was never thread safe before
> I think they'd rather just leave it as is for old compilers.
>
> Obviously this proposal is for Asterisk 16+ only.  Does this matter to any
> distributions that will be supported beyond this October?
>
> [1] https://issues.asterisk.org/jira/browse/ASTERISK-27619
> [2] https://github.com/akheron/jansson/pull/389

As long as we don't impact any major, currently supported
distributions that may use earlier versions than gcc-4.1.2, I'm ok
with moving things forward as suggested.  Especially since this is
isolated to master/proposed-16.

Anybody else have any thoughts?

-- 
Matthew Fredrickson
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev


Re: [asterisk-dev] Compiler feature requirements

2018-01-25 Thread Corey Farrell
I've posted a patch for this [1] so anyone who wants to test the 
proposed changes can.  This is really a question about non-GCC compilers 
since we already know which versions of GCC work.  Note that we cannot 
use __sync_fetch_and_nand as the original implementation in 4.1 was 
broken.  If we need __sync_fetch_and_nand or __sync_nand_and_fetch we 
would need to require gcc-4.4.  I've looked into the ast_flags macro's, 
implementing them with atomic operations would would not require nand 
functions.


[1] https://gerrit.asterisk.org/8049


On 01/24/2018 04:50 PM, Corey Farrell wrote:
I've posted ASTERISK-27619 [1] proposing that we drop support for GCC 
versions older than 4.1.2.  Specifically we'd be requiring that either 
__sync or __atomic builtin functions be available (I'm unsure what 
this will do to clang requirements).  gcc-4.1.2 was released in 
February 2007 and was the version provided by CentOS 5.  I've posted a 
PR to the jansson project [2] which will make reference counting 
thread safe, but I'm getting push-back on the parts needed to provide 
a replacement function for old compilers. Since reference counting in 
jansson was never thread safe before I think they'd rather just leave 
it as is for old compilers.


Obviously this proposal is for Asterisk 16+ only.  Does this matter to 
any distributions that will be supported beyond this October?


[1] https://issues.asterisk.org/jira/browse/ASTERISK-27619
[2] https://github.com/akheron/jansson/pull/389



--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-dev

[asterisk-dev] Compiler feature requirements

2018-01-24 Thread Corey Farrell
I've posted ASTERISK-27619 [1] proposing that we drop support for GCC 
versions older than 4.1.2.  Specifically we'd be requiring that either 
__sync or __atomic builtin functions be available (I'm unsure what this 
will do to clang requirements).  gcc-4.1.2 was released in February 2007 
and was the version provided by CentOS 5.  I've posted a PR to the 
jansson project [2] which will make reference counting thread safe, but 
I'm getting push-back on the parts needed to provide a replacement 
function for old compilers.  Since reference counting in jansson was 
never thread safe before I think they'd rather just leave it as is for 
old compilers.


Obviously this proposal is for Asterisk 16+ only.  Does this matter to 
any distributions that will be supported beyond this October?


[1] https://issues.asterisk.org/jira/browse/ASTERISK-27619
[2] https://github.com/akheron/jansson/pull/389

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-dev