Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix angelscript build on non-x86 arches - fixes #2119 and fixes #2194 #2195

Closed
wants to merge 2 commits into from

Conversation

jcowgill
Copy link
Contributor

This is my fix for #2119 and #2194. I have compile tested it on x86_64 and mips64el. Incredibly I have no ARM hardware so I am currently building it there with QEMU. That'll probably take at least another hour though.


For the build failures on 64-bit arches, angelscript was using __LP64__ to test for x86_64. Use the correct define instead.

For ARM architectures, ensure the native function calling file is built on all ARM arches and not just when building for android.

…ixes supertuxkart#2194

For the build failures on 64-bit arches, angelscript was using __LP64__ to
test for x86_64. Use the correct define instead.

For ARM architectures, ensure the native function calling file is built on all
ARM arches and not just when building for android. Also add the nesseary
-Wa,-mimplicit-it option when building the assembly file.
@jcowgill
Copy link
Contributor Author

The original ARM build failed, but adding -Wa,-mimplicit-it=always to the compile options for the assembly file makes it build successfully.

@auriamg
Copy link
Member

auriamg commented May 17, 2015

Thanks for the pull requests, though since some parts affect angelscript directly, I will try to get these changes upstream

EDIT: After verifying, these architectures actually do not appear to be supported by angelscript ( see http://www.angelcode.com/angelscript/features.html ) - they are also pretty uncommon architectures so I don't think we care STK not running there

@Vincent-C
Copy link

@jcowgill It looks like only armel FTBFS now:

/«PKGBUILDDIR»/lib/angelscript/source/as_callfunc_arm_gcc.S: Assembler messages:
/«PKGBUILDDIR»/lib/angelscript/source/as_callfunc_arm_gcc.S:88: Error: selected processor does not support ARM mode `blx r4'
/«PKGBUILDDIR»/lib/angelscript/source/as_callfunc_arm_gcc.S:136: Error: selected processor does not support ARM mode `blx r4'
/«PKGBUILDDIR»/lib/angelscript/source/as_callfunc_arm_gcc.S:183: Error: selected processor does not support ARM mode `blx r4'
/«PKGBUILDDIR»/lib/angelscript/source/as_callfunc_arm_gcc.S:221: Error: selected processor does not support ARM mode `blx r4'
/«PKGBUILDDIR»/lib/angelscript/source/as_callfunc_arm_gcc.S:258: Error: selected processor does not support ARM mode `blx r4'

Not knowing how portable the ARM assembly in angelscript actually is...perhaps it's best to just use the AS_MAX_PORTABILITY define for armel? Is there a way to distinguish armel from armhf/arm64?

@auriamg Not sure if you saw @jcowgill's reply in #2194 or not, but that page does mention that angelscript is supported for arm, amongst a variety of other CPU architectures.

The assembly code will not compile on that arch.
@jcowgill
Copy link
Contributor Author

Lovely, blx is an ARMv5 instruction and Debian armel is only ARMv4t. Looking at the source (bear in mind I don't know ARM very well), it also uses a lot of ldmia ... pc instructions which don't cause the correct Thumb mode change on ARMv4t, but do on ARMv5. So I think the best solution is to just disable the ARM assembly parts on v4 until they can be fixed (if that ever happens).

Is there a way to distinguish armel from armhf/arm64?

Yes __ARM_ARCH_4T__ is defined on armel, but not the others. I'll push a fix to disable it there in a minute.

@hiker
Copy link
Contributor

hiker commented Aug 1, 2015

@auriamg This sounds like a patch to be potentially useful upstream (in case that they want to support those platforms), but not for us at this stage then. Can it be closed?

@auriamg
Copy link
Member

auriamg commented Aug 2, 2015

Given that STK doesn't support those architectures then I would agree this should be submitted upstream, not here. Closing this PR

@auriamg auriamg closed this Aug 2, 2015
buildroot-auto-update pushed a commit to buildroot/buildroot that referenced this pull request Sep 20, 2016
Our build system has detected that angelscript can't be
cross-compiled properly. This has been also reported to
supertuxkart [1], and although the developers were open
to take patches fixing STK embedded angelscript, it was
pointed out that non-x86 architectures were not officially
supported and of little interest [2].

Hence, let's constrain the package selection and the host
architecture to x86.

[1] supertuxkart/stk-code#2569
[2] supertuxkart/stk-code#2195

Fixes: http://autobuild.buildroot.net/results/655/655f046b3bb5f7a4ea492328b608e409d6769689/
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants