[asterisk-dev] [Code Review]: Rip out PROC selection in Asterisk makefiles

opticron reviewboard at asterisk.org
Tue Apr 10 14:05:40 CDT 2012



> On April 10, 2012, 12:04 p.m., Tzafrir Cohen wrote:
> > This still has a surprising element: if I use:  ./configure CFLAGS="<flags>"  , I probably won't expect to get in practice CFLAGS="<flags> -march=native" (this is added later on in the Makefile directly).
> > 
> > Also: what happens in a cross-build? Will the test in configure.ac fail?

I've taken care of the first item in the patch I'm about to upload.

Checking the GCC 4.5.3 AVR cross compiler I have on my system, it appears to reject the flag.  The only cross compilers where I might worry that the result would be different are cross compilers where the targets are i386/x86_64, rs6000, mips, or alpha since these also have CPU auto-detection capabilities within GCC 4.6.3 and I don't currently have a cross-compiler I can use to test those.


- opticron


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


On April 10, 2012, 9:35 a.m., opticron wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1852/
> -----------------------------------------------------------
> 
> (Updated April 10, 2012, 9:35 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> The selection of PROC as k8 for -march on 64bit systems can cause gcc to create binaries that will not run on the local machine since it will optimize to use 3Dnow! and extended 3Dnow! instructions where possible.  This type of code shouldn't even really be in the Asterisk build system so I'm ripping it out in its entirety instead of changing k8 to native.  There is now a menuselect option that is available when a version of gcc that supports -march=native is being used to enable or disable tailoring of generated code to the instruction sets available on the local CPU.
> 
> 
> This addresses bug ASTERISK-19462.
>     https://issues.asterisk.org/jira/browse/ASTERISK-19462
> 
> 
> Diffs
> -----
> 
>   branches/1.8/Makefile 361490 
>   branches/1.8/Makefile.rules 361490 
>   branches/1.8/build_tools/cflags.xml 361490 
>   branches/1.8/build_tools/menuselect-deps.in 361490 
>   branches/1.8/codecs/gsm/Makefile 361490 
>   branches/1.8/codecs/gsm/src/k6opt.s 361490 
>   branches/1.8/codecs/lpc10/Makefile 361490 
>   branches/1.8/configure UNKNOWN 
>   branches/1.8/configure.ac 361490 
>   branches/1.8/makeopts.in 361490 
> 
> Diff: https://reviewboard.asterisk.org/r/1852/diff
> 
> 
> Testing
> -------
> 
> Ran this through the testsuite and it didn't break anything.
> 
> 
> Thanks,
> 
> opticron
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120410/f266f58a/attachment.htm>


More information about the asterisk-dev mailing list