[asterisk-bugs] [JIRA] (ASTERISK-26342) [patch] Disable -march=native when cross-compiling

Asterisk Team (JIRA) noreply at issues.asterisk.org
Tue Sep 6 15:59:01 CDT 2016


    [ https://issues.asterisk.org/jira/browse/ASTERISK-26342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=232168#comment-232168 ] 

Asterisk Team commented on ASTERISK-26342:
------------------------------------------

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

> [patch] Disable -march=native when cross-compiling
> --------------------------------------------------
>
>                 Key: ASTERISK-26342
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26342
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: General
>    Affects Versions: 13.11.0
>         Environment: AstLinux 1.2.7 x86_64 (cross-compiled via Buildroot)
>            Reporter: abelbeck
>
> The resulting fix for issue ASTERISK-25289 did not take into account for "cross-compiling".
> http://git.asterisk.org/gitweb/?p=asterisk/asterisk.git;a=commit;h=3be6fa1e4b920fe1ccec67e4a78e101354a767d9
> Our project has cross-compiled Asterisk for many years, we pass CFLAGS and the resulting AST_NATIVE_ARCH was undefined, it worked.
> Then with Asterisk 13.11.0 the resulting binary crashed with illegal operand at startup, shortly after reading "/etc/localtime".
> After much head-scratching and hair-pulling I discovered this change where -march=native was being defined behind our back.
> Adding:
> {noformat}
> menuselect/menuselect --disable BUILD_NATIVE menuselect.makeopts
> {noformat}
> solves the problem, but it would seem less fragile and better to first test for "cross-compiling" and set AST_NATIVE_ARCH=0, then proceed as per the previous fix.
> Patch attached.  Works in my testing.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list