Revision: 4436
Author: [email protected]
Date: Fri Apr 16 04:47:23 2010
Log: Change SConstruct to allow for easy specification of target library
for arm cross-compilation.
Review URL: http://codereview.chromium.org/1667001
http://code.google.com/p/v8/source/detail?r=4436
Modified:
/branches/bleeding_edge/SConstruct
=======================================
--- /branches/bleeding_edge/SConstruct Wed Apr 14 11:48:05 2010
+++ /branches/bleeding_edge/SConstruct Fri Apr 16 04:47:23 2010
@@ -42,6 +42,18 @@
if ANDROID_TOP is None:
ANDROID_TOP=""
+# ARM_TARGET_LIB is the path to the dynamic library to use on the target
+# machine if cross-compiling to an arm machine. You will also need to set
+# the additional cross-compiling environment variables to the cross
compiler.
+ARM_TARGET_LIB = os.environ.get('ARM_TARGET_LIB')
+if ARM_TARGET_LIB:
+ ARM_LINK_FLAGS = ['-Wl,-rpath=' + ARM_TARGET_LIB + '/lib:' +
+ ARM_TARGET_LIB + '/usr/lib',
+ '-Wl,--dynamic-linker=' + ARM_TARGET_LIB +
+ '/lib/ld-linux.so.3']
+else:
+ ARM_LINK_FLAGS = ""
+
# TODO: Sort these issues out properly but as a temporary solution for gcc
4.4
# on linux we need these compiler flags to avoid crashes in the v8 test
suite
# and avoid dtoa.c strict aliasing issues
@@ -416,6 +428,9 @@
'mode:release': {
'CPPDEFINES': ['SK_RELEASE', 'NDEBUG']
}
+ },
+ 'arch:arm': {
+ 'LINKFLAGS': ARM_LINK_FLAGS
},
},
'msvc': {
@@ -480,6 +495,9 @@
'mode:release': {
'CPPDEFINES': ['SK_RELEASE', 'NDEBUG']
}
+ },
+ 'arch:arm': {
+ 'LINKFLAGS': ARM_LINK_FLAGS
},
'arch:ia32': {
'CCFLAGS': ['-m32'],
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev