Hi. I tried compiling AS on Jetson Tegra K1 which uses ARM processor. I used the gnuc makefile and everything compiles except as_callfunc_arm.cpp.s. It returns error about THUMB instruction not being in IT block. The whole log:
ubuntu@tegra-ubuntu:~/Downloads/sdk (2)/angelscript/projects/gnuc$ make
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_atomic.o -c ../../source/as_atomic.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_builder.o -c ../../source/as_builder.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_bytecode.o -c ../../source/as_bytecode.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_callfunc.o -c ../../source/as_callfunc.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_callfunc_arm.o -c ../../source/as_callfunc_arm.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_callfunc_mips.o -c ../../source/as_callfunc_mips.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_callfunc_ppc.o -c ../../source/as_callfunc_ppc.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_callfunc_ppc_64.o -c ../../source/as_callfunc_ppc_64.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_callfunc_sh4.o -c ../../source/as_callfunc_sh4.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_callfunc_x86.o -c ../../source/as_callfunc_x86.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_callfunc_x64_gcc.o -c ../../source/as_callfunc_x64_gcc.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_callfunc_x64_mingw.o -c ../../source/as_callfunc_x64_mingw.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_compiler.o -c ../../source/as_compiler.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_context.o -c ../../source/as_context.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_configgroup.o -c ../../source/as_configgroup.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_datatype.o -c ../../source/as_datatype.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_generic.o -c ../../source/as_generic.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_gc.o -c ../../source/as_gc.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_globalproperty.o -c ../../source/as_globalproperty.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_memory.o -c ../../source/as_memory.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_module.o -c ../../source/as_module.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_objecttype.o -c ../../source/as_objecttype.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_outputbuffer.o -c ../../source/as_outputbuffer.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_parser.o -c ../../source/as_parser.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_restore.o -c ../../source/as_restore.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_scriptcode.o -c ../../source/as_scriptcode.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_scriptengine.o -c ../../source/as_scriptengine.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_scriptfunction.o -c ../../source/as_scriptfunction.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_scriptnode.o -c ../../source/as_scriptnode.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_scriptobject.o -c ../../source/as_scriptobject.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_string.o -c ../../source/as_string.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_string_util.o -c ../../source/as_string_util.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_thread.o -c ../../source/as_thread.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_tokenizer.o -c ../../source/as_tokenizer.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_typeinfo.o -c ../../source/as_typeinfo.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -o obj/as_variablescope.o -c ../../source/as_variablescope.cpp
g++ -Wall -fPIC -fno-strict-aliasing -DAS_MAX_PORTABILITY -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:309: Error: thumb conditional instruction should be in IT block -- `ldrge r0,[r6]'
../../source/as_callfunc_arm_gcc.S:311: Error: thumb conditional instruction should be in IT block -- `ldrge r1,[r6,#4]'
../../source/as_callfunc_arm_gcc.S:313: Error: thumb conditional instruction should be in IT block -- `ldrge r2,[r6,#8]'
../../source/as_callfunc_arm_gcc.S:315: Error: thumb conditional instruction should be in IT block -- `ldrge r3,[r6,#12]'
../../source/as_callfunc_arm_gcc.S:386: Error: thumb conditional instruction should be in IT block -- `ldrge r0,[r6]'
../../source/as_callfunc_arm_gcc.S:388: Error: thumb conditional instruction should be in IT block -- `ldrge r1,[r6,#4]'
../../source/as_callfunc_arm_gcc.S:389: Error: thumb conditional instruction should be in IT block -- `movlt r1,r5'
../../source/as_callfunc_arm_gcc.S:391: Error: thumb conditional instruction should be in IT block -- `ldrge r2,[r6,#8]'
../../source/as_callfunc_arm_gcc.S:392: Error: thumb conditional instruction should be in IT block -- `movlt r2,r5'
../../source/as_callfunc_arm_gcc.S:394: Error: thumb conditional instruction should be in IT block -- `ldrge r3,[r6,#12]'
../../source/as_callfunc_arm_gcc.S:395: Error: thumb conditional instruction should be in IT block -- `movlt r3,r5'
../../source/as_callfunc_arm_gcc.S:396: Error: thumb conditional instruction should be in IT block -- `movlt r5,#0'
../../source/as_callfunc_arm_gcc.S:476: Error: thumb conditional instruction should be in IT block -- `ldrge r1,[r6]'
../../source/as_callfunc_arm_gcc.S:478: Error: thumb conditional instruction should be in IT block -- `ldrge r2,[r6,#4]'
../../source/as_callfunc_arm_gcc.S:479: Error: thumb conditional instruction should be in IT block -- `movlt r2,r5'
../../source/as_callfunc_arm_gcc.S:481: Error: thumb conditional instruction should be in IT block -- `ldrge r3,[r6,#8]'
../../source/as_callfunc_arm_gcc.S:482: Error: thumb conditional instruction should be in IT block -- `movlt r3,r5'
../../source/as_callfunc_arm_gcc.S:483: Error: thumb conditional instruction should be in IT block -- `movlt r5,#0'
../../source/as_callfunc_arm_gcc.S:487: Error: thumb conditional instruction should be in IT block -- `ldrge r7,[r6,#12]'
../../source/as_callfunc_arm_gcc.S:488: Error: thumb conditional instruction should be in IT block -- `strge r7,[r6,#8]'
../../source/as_callfunc_arm_gcc.S:493: Error: thumb conditional instruction should be in IT block -- `movge r5,#4'
../../source/as_callfunc_arm_gcc.S:564: Error: thumb conditional instruction should be in IT block -- `ldrge r1,[r6]'
../../source/as_callfunc_arm_gcc.S:566: Error: thumb conditional instruction should be in IT block -- `ldrge r2,[r6,#4]'
../../source/as_callfunc_arm_gcc.S:568: Error: thumb conditional instruction should be in IT block -- `ldrge r3,[r6,#8]'
../../source/as_callfunc_arm_gcc.S:570: Error: thumb conditional instruction should be in IT block -- `movge r11,#4'
../../source/as_callfunc_arm_gcc.S:642: Error: thumb conditional instruction should be in IT block -- `ldrge r2,[r6]'
../../source/as_callfunc_arm_gcc.S:644: Error: thumb conditional instruction should be in IT block -- `ldrge r3,[r6,#4]'
../../source/as_callfunc_arm_gcc.S:646: Error: thumb conditional instruction should be in IT block -- `movge r11,#4'
../../source/as_callfunc_arm_gcc.S:648: Error: thumb conditional instruction should be in IT block -- `movge r11,#8'
../../source/as_callfunc_arm_gcc.S:649: Error: thumb conditional instruction should be in IT block -- `ldrlt r7,[r6,#8]'
../../source/as_callfunc_arm_gcc.S:650: Error: thumb conditional instruction should be in IT block -- `strlt r7,[r6,#12]'
make: *** [obj/as_callfunc_arm_gcc.o] Error 1
You can also see I tried compiling with -DAS_MAX_PORTABILITY with the idea it will not use the ASM at all, but it still compiled it and threw the error. Is there some kind of flag I need to change? The ASM has defined blocks for THUMB1, THUMB2 and ARM, so techniclly I could disable THUMB and fallback to ARM?
Compiler:
For some reason I cannot post the whole g++ -v here. So I posted it here: http://pastebin.com/n4uXrVXb