[asterisk-bugs] [JIRA] (ASTERISK-26342) [patch] Disable -march=native when cross-compiling
Michael L. Young (JIRA)
noreply at issues.asterisk.org
Tue Sep 6 21:31:01 CDT 2016
[ https://issues.asterisk.org/jira/browse/ASTERISK-26342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael L. Young updated ASTERISK-26342:
----------------------------------------
External Issue ID: (was: https://issues.asterisk.org/jira/browse/ASTERISK-25289)
> [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
> Attachments: asterisk-13-configure-arch-native.patch
>
>
> 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