Git Product home page Git Product logo

Comments (16)

MayaPosch avatar MayaPosch commented on August 20, 2024 2

I managed to make the AngelScript runtime build on armv7l architectures by adding -Wa,-mimplicit-it=thumb when an armv7l architecture is detected, per the instructions here: https://wiki.ubuntu.com/ARM/Thumb2

This modifies only the projects/gnuc/Makefile file in the AngelScript build system. The AngelScript author has also been made aware of these changes.

Theoretically this modification should not impact building NymphCast on other platforms, but it should be tested regardless.

from nymphcast.

MayaPosch avatar MayaPosch commented on August 20, 2024 1

Reproduced under Debian Buster armhf with GCC 8.3.0.

g++ -Wall -fPIC -fno-strict-aliasing -o obj/as_callfunc_arm_gcc.o -c ../../source/as_callfunc_arm_gcc.S
../../source/as_callfunc_arm_gcc.S: Assembler messages:
../../source/as_callfunc_arm_gcc.S:336: Error: thumb conditional instruction should be in IT block -- `ldrge r0,[r6]'
../../source/as_callfunc_arm_gcc.S:338: Error: thumb conditional instruction should be in IT block -- `ldrge r1,[r6,#4]'
../../source/as_callfunc_arm_gcc.S:340: Error: thumb conditional instruction should be in IT block -- `ldrge r2,[r6,#8]'
../../source/as_callfunc_arm_gcc.S:342: Error: thumb conditional instruction should be in IT block -- `ldrge r3,[r6,#12]'
../../source/as_callfunc_arm_gcc.S:413: Error: thumb conditional instruction should be in IT block -- `ldrge r0,[r6]'
../../source/as_callfunc_arm_gcc.S:415: Error: thumb conditional instruction should be in IT block -- `ldrge r1,[r6,#4]'
../../source/as_callfunc_arm_gcc.S:416: Error: thumb conditional instruction should be in IT block -- `movlt r1,r5'
../../source/as_callfunc_arm_gcc.S:418: Error: thumb conditional instruction should be in IT block -- `ldrge r2,[r6,#8]'
../../source/as_callfunc_arm_gcc.S:419: Error: thumb conditional instruction should be in IT block -- `movlt r2,r5'
../../source/as_callfunc_arm_gcc.S:421: Error: thumb conditional instruction should be in IT block -- `ldrge r3,[r6,#12]'
../../source/as_callfunc_arm_gcc.S:422: Error: thumb conditional instruction should be in IT block -- `movlt r3,r5'
../../source/as_callfunc_arm_gcc.S:423: Error: thumb conditional instruction should be in IT block -- `movlt r5,#0'
../../source/as_callfunc_arm_gcc.S:503: Error: thumb conditional instruction should be in IT block -- `ldrge r1,[r6]'
../../source/as_callfunc_arm_gcc.S:505: Error: thumb conditional instruction should be in IT block -- `ldrge r2,[r6,#4]'
../../source/as_callfunc_arm_gcc.S:506: Error: thumb conditional instruction should be in IT block -- `movlt r2,r5'
../../source/as_callfunc_arm_gcc.S:508: Error: thumb conditional instruction should be in IT block -- `ldrge r3,[r6,#8]'
../../source/as_callfunc_arm_gcc.S:509: Error: thumb conditional instruction should be in IT block -- `movlt r3,r5'
../../source/as_callfunc_arm_gcc.S:510: Error: thumb conditional instruction should be in IT block -- `movlt r5,#0'
../../source/as_callfunc_arm_gcc.S:514: Error: thumb conditional instruction should be in IT block -- `ldrge r7,[r6,#12]'
../../source/as_callfunc_arm_gcc.S:515: Error: thumb conditional instruction should be in IT block -- `strge r7,[r6,#8]'
../../source/as_callfunc_arm_gcc.S:520: Error: thumb conditional instruction should be in IT block -- `movge r5,#4'
../../source/as_callfunc_arm_gcc.S:591: Error: thumb conditional instruction should be in IT block -- `ldrge r1,[r6]'
../../source/as_callfunc_arm_gcc.S:593: Error: thumb conditional instruction should be in IT block -- `ldrge r2,[r6,#4]'
../../source/as_callfunc_arm_gcc.S:595: Error: thumb conditional instruction should be in IT block -- `ldrge r3,[r6,#8]'
../../source/as_callfunc_arm_gcc.S:597: Error: thumb conditional instruction should be in IT block -- `movge r11,#4'
../../source/as_callfunc_arm_gcc.S:669: Error: thumb conditional instruction should be in IT block -- `ldrge r2,[r6]'
../../source/as_callfunc_arm_gcc.S:671: Error: thumb conditional instruction should be in IT block -- `ldrge r3,[r6,#4]'
../../source/as_callfunc_arm_gcc.S:673: Error: thumb conditional instruction should be in IT block -- `movge r11,#4'
../../source/as_callfunc_arm_gcc.S:675: Error: thumb conditional instruction should be in IT block -- `movge r11,#8'
../../source/as_callfunc_arm_gcc.S:676: Error: thumb conditional instruction should be in IT block -- `ldrlt r7,[r6,#8]'
../../source/as_callfunc_arm_gcc.S:677: Error: thumb conditional instruction should be in IT block -- `strlt r7,[r6,#12]'
make[1]: *** [Makefile:160: obj/as_callfunc_arm_gcc.o] Error 1

from nymphcast.

PureTryOut avatar PureTryOut commented on August 20, 2024 1

Yup that worked, thanks! 😄

from nymphcast.

MayaPosch avatar MayaPosch commented on August 20, 2024

That's in an AngelScript ASM file. I wonder if it's an AngelScript ARMv7 issue?

from nymphcast.

MayaPosch avatar MayaPosch commented on August 20, 2024

Looking at as_callfunc_arm_gcc.S, it appears that this issue is due to it trying to compile the ASM file for the Thumb ISA when it should use the regular ARM ISA. I'll have to see whether I can replicate this issue and maybe fix it in the Makefile.

from nymphcast.

PureTryOut avatar PureTryOut commented on August 20, 2024

Doesn't seem to work for me, it still fails on armv7.

https://gitlab.alpinelinux.org/PureTryOut/aports/-/jobs/90488

from nymphcast.

MayaPosch avatar MayaPosch commented on August 20, 2024

The Makefile checks with uname -m what the underlying system architecture is. What does the environment which you're running it in return? Since on Debian I got armv7l back, that's what I'm checking for.

from nymphcast.

PureTryOut avatar PureTryOut commented on August 20, 2024

Ah makes sense, but that isn't a reliable check. In Alpine's case, armhf and armv7 packages are actually built on a 32-bit capable aarch64 system. uname -m thus reports armv8l and the build system doesn't realize it's incorrect.

from nymphcast.

MayaPosch avatar MayaPosch commented on August 20, 2024

I have removed the use of uname. Instead the Makefile uses the -dumpmachine flag of GCC to determine the target architecture.

from nymphcast.

PureTryOut avatar PureTryOut commented on August 20, 2024

Still no luck sadly, not sure what's up... https://gitlab.alpinelinux.org/PureTryOut/aports/-/jobs/90618

from nymphcast.

MayaPosch avatar MayaPosch commented on August 20, 2024

I'm not sure what kind of GCC toolchain is used there. It should target arm-linux-gnu, no?

The Makefile just checks for a string that starts with arm-, so that covers a lot of territory.

from nymphcast.

PureTryOut avatar PureTryOut commented on August 20, 2024

Just the usual.

On my local (x86_64) machine gcc -dumpmachine gives me

▶ gcc -dumpmachine
x86_64-alpine-linux-musl

I'm guessing that should be armv7l-alpine-linux-musl on armv7?

from nymphcast.

MayaPosch avatar MayaPosch commented on August 20, 2024

It should start with arm- since the toolchain targets ARMv7. ARMv8 (64-bit) uses aarch64-.

from nymphcast.

MayaPosch avatar MayaPosch commented on August 20, 2024

I have changed the Makefile to output the GCC triplet, so we can more easily see what gcc -dumpmachine actually returns :)

from nymphcast.

PureTryOut avatar PureTryOut commented on August 20, 2024
GCC ARCH: armv7-alpine-linux-musleabihf

https://gitlab.alpinelinux.org/PureTryOut/aports/-/jobs/91563

from nymphcast.

MayaPosch avatar MayaPosch commented on August 20, 2024

Huh, that's an odd one. Only seen similar triplets with clang so far.

I have added the armv7- option as well to the Makefile. It better work now :)

from nymphcast.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.