armv7-a : For thumb inter-working we require an architecture which supports blx

439 views
Skip to first unread message

AJ ONeal

unread,
Dec 15, 2010, 8:04:58 PM12/15/10
to v8-u...@googlegroups.com
Isn't scons supposed to auto-guess my architecture when not cross-compiling?


touch foo.cc
g++ -march=armv7-a -mtune=cortex-a8 -mfpu=vfp -dM -E foo.cc || grep -i ARM
#define __ARMEL__ 1
#define __arm__ 1
#define __ARM_ARCH_7A__ 1
#define __ARM_EABI__ 1


svn checkout http://v8.googlecode.com/svn/trunk/ v8-read-only
cd v8-read-only
scons mode=debug snapshot=on library=shared


g++ -o obj/debug/arm/macro-assembler-arm.os -c -Wall -Werror -W -Wno-unused-parameter -Wnon-virtual-dtor -pedantic -g -O0 -ansi -fno-rtti -fno-exceptions -fvisibility=hidden -Wall -Werror -W -Wno-unused-parameter -Wnon-virtual-dtor -pedantic -g -O0 -ansi -fPIC -DV8_TARGET_ARCH_ARM -DENABLE_DISASSEMBLER -DDEBUG -DV8_SHARED -DENABLE_VMSTATE_TRACKING -DENABLE_LOGGING_AND_PROFILING -DV8_ENABLE_CHECKS -DENABLE_DEBUGGER_SUPPORT -Isrc src/arm/macro-assembler-arm.cc
src/arm/macro-assembler-arm.cc:61:3: error: #error "For thumb inter-working we require an architecture which supports blx"


AJ ONeal

Erik Corry

unread,
Dec 17, 2010, 4:33:03 AM12/17/10
to v8-u...@googlegroups.com
16. dec. 2010 02.04 skrev AJ ONeal <cool...@gmail.com>:
> Isn't scons supposed to auto-guess my architecture when not cross-compiling?

Just because you are compiling on an ARMv7, it doesn't mean you want
to build a VM that doesn't work on an older CPU.

I think
export CFLAGS=-march=armv7-a
should work for you. If you don't care about CPUs without VFP then
you should use
export CFLAGS=-march=armv7-a -DCAN_USE_VFP_INSTRUCTIONS=1

> --
> v8-users mailing list
> v8-u...@googlegroups.com
> http://groups.google.com/group/v8-users

--
Erik Corry, Software Engineer
Google Denmark ApS - Frederiksborggade 20B, 1 sal,
1360 København K - Denmark - CVR nr. 28 86 69 84

AJ ONeal

unread,
Dec 17, 2010, 11:32:45 AM12/17/10
to v8-u...@googlegroups.com
Certainly it shouldn't default to build for a version of ARM that is known to not work.

Shouldn't it at least auto-guess armv5te?
Isn't that the oldest generation of ARM that will build?


AJ ONeal

Rodolph Perfetta

unread,
Dec 17, 2010, 2:57:17 PM12/17/10
to v8-u...@googlegroups.com
The minimun requirements are: armv4 without interworking or armv5t with interworking.

The build system will default to whatever your compiler defaults are, which here seem to be armv4t with interworking hence the error.

as Erik explained you can manually add some compiler options such as "-march=armv7-a -mfpu=vfp -mfloat-abi=vfp" if you want the the latest ISA and floating point support. Alternatively you could disable interworking (-mno-thumb-interwork but I am not 100% sure on this one).

Cheers,
Rodolph.

AJ ONeal

unread,
Dec 17, 2010, 3:02:07 PM12/17/10
to v8-u...@googlegroups.com
Thanks, forgive my ignorance.

How do I go about setting my compiler (gcc) defaults?

AJ ONeal

AJ ONeal

unread,
Dec 17, 2010, 3:03:28 PM12/17/10
to v8-u...@googlegroups.com
As I understand it scons doesn't read from the environment variables, hence the need to specifically import them, correct?

AJ ONeal

pikpik

unread,
Dec 17, 2010, 3:29:09 PM12/17/10
to v8-users
Hi,

On Dec 17, 3:03 pm, AJ ONeal <coola...@gmail.com> wrote:
> As I understand it scons doesn't read from the environment variables, hence
> the need to specifically import them, correct?

I think SCons does read from the environment variables. I had trouble
with this for quite some time, but it does work.

To see if it will take your variables, you could try the following
script.

scons-test.sh:

CC=orange \
CXX=apple \
scons $@

Save, "chmod u+x scons-test.sh," run, and look in SCons' output for
"orange" or "apple."

I hope this helps,
pikpik
Reply all
Reply to author
Forward
0 new messages