On Wednesday 15 September 2010 23:17:08 Jérémy Lal wrote:
> On 15/09/2010 21:38, Konstantinos Margaritis wrote:
> > Package: libv8
> > Version: 2.2.24-5
> > Severity: wishlist
> >
> >
> > Armhf is a new ARM port (higher base requirements than armel, namely,
> > armv7-a, thumb2, vfpv3-d16 and float-abi=hard) for now residing in
> > debian-ports.org. Since libv8 supports ARM, it would be appreciated it
> > if you could add armhf to the list of supported architectures in libv8.
>
> Sure,
> before we do that, could you try building v8 for armhf ?
> I'd hesitate much less if i knew it builds ok.
I played around with the package, it compiled with plain settings, but it was
rather unoptimised (armv5t, etc). So I decided to make it to build a
specialized version for armhf (armv7-a basically, float-abi=hard is implied in
the compiler settings as it is the default). I attach the patch I used.
Thanks
Konstantinos
diff -ruN libv8-2.2.24/debian/control libv8-2.2.24.armhf//debian/control
--- libv8-2.2.24/debian/control 2010-08-04 20:26:31.000000000 +0000
+++ libv8-2.2.24.armhf//debian/control 2010-09-15 23:36:08.226766241 +0000
@@ -12,7 +12,7 @@
Package: libv8-dev
Section: libdevel
-Architecture: i386 amd64 armel mipsel
+Architecture: i386 amd64 armel armhf mipsel
Depends: libv8-2.2.24 (= ${binary:Version}), ${misc:Depends}
Description: Development files for the V8 JavaScript Engine
V8 is Google's open source, high performance JavaScript engine. It is written
@@ -22,7 +22,7 @@
V8 JavaScript Engine
Package: libv8-2.2.24
-Architecture: i386 amd64 armel mipsel
+Architecture: i386 amd64 armel armhf mipsel
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: V8 JavaScript Engine
V8 is Google's open source, high performance JavaScript engine. It is written
@@ -34,7 +34,7 @@
Package: libv8-dbg
Priority: extra
Section: debug
-Architecture: i386 amd64 armel mipsel
+Architecture: i386 amd64 armel armhf mipsel
Depends: libv8-2.2.24 (= ${binary:Version}), ${misc:Depends}
Description: Development symbols for the V8 JavaScript Engine
V8 is Google's open source, high performance JavaScript engine. It is written
Binary files libv8-2.2.24/.sconsign.dblite and libv8-2.2.24.armhf//.sconsign.dblite differ
diff -ruN libv8-2.2.24/SConstruct libv8-2.2.24.armhf//SConstruct
--- libv8-2.2.24/SConstruct 2010-09-16 10:06:58.000000000 +0000
+++ libv8-2.2.24.armhf//SConstruct 2010-09-16 10:06:32.296766735 +0000
@@ -217,6 +217,16 @@
'CCFLAGS': ['-m32'],
'LINKFLAGS': ['-m32']
},
+ 'arch:armv7l': {
+ 'CPPDEFINES': ['V8_TARGET_ARCH_ARM'],
+ 'unalignedaccesses:on' : {
+ 'CPPDEFINES' : ['CAN_USE_UNALIGNED_ACCESSES=1']
+ },
+ 'unalignedaccesses:off' : {
+ 'CPPDEFINES' : ['CAN_USE_UNALIGNED_ACCESSES=0']
+ },
+ 'CCFLAGS': ['-march=armv7-a']
+ },
'arch:mips': {
'CPPDEFINES': ['V8_TARGET_ARCH_MIPS'],
'simulator:none': {
@@ -338,6 +348,12 @@
# used by the arm simulator.
'WARNINGFLAGS': ['/wd4996']
},
+ 'arch:armv7l': {
+ 'CPPDEFINES': ['V8_TARGET_ARCH_ARM'],
+ # /wd4996 is to silence the warning about sscanf
+ # used by the arm simulator.
+ 'WARNINGFLAGS': ['/wd4996']
+ },
'arch:mips': {
'CPPDEFINES': ['V8_TARGET_ARCH_MIPS'],
},
@@ -437,6 +453,9 @@
'arch:arm': {
'LINKFLAGS': ARM_LINK_FLAGS
},
+ 'arch:armv7l': {
+ 'LINKFLAGS': ARM_LINK_FLAGS
+ },
},
'msvc': {
'all': {
@@ -504,6 +523,9 @@
'arch:arm': {
'LINKFLAGS': ARM_LINK_FLAGS
},
+ 'arch:armv7l': {
+ 'LINKFLAGS': ARM_LINK_FLAGS
+ },
'arch:ia32': {
'CCFLAGS': ['-m32'],
'LINKFLAGS': ['-m32']
@@ -677,7 +699,7 @@
'help': 'the os to build for (' + OS_GUESS + ')'
},
'arch': {
- 'values':['arm', 'ia32', 'x64', 'mips'],
+ 'values':['arm', 'armv7l', 'ia32', 'x64', 'mips'],
'default': ARCH_GUESS,
'help': 'the architecture to build for (' + ARCH_GUESS + ')'
},
Binary files libv8-2.2.24/tools/js2c.pyc and libv8-2.2.24.armhf//tools/js2c.pyc differ
Binary files libv8-2.2.24/tools/jsmin.pyc and libv8-2.2.24.armhf//tools/jsmin.pyc differ
diff -ruN libv8-2.2.24/tools/utils.py libv8-2.2.24.armhf//tools/utils.py
--- libv8-2.2.24/tools/utils.py 2010-09-16 10:06:58.000000000 +0000
+++ libv8-2.2.24.armhf//tools/utils.py 2010-09-15 23:55:29.776765243 +0000
@@ -66,7 +66,10 @@
def GuessArchitecture():
id = platform.machine()
if id.startswith('arm'):
- return 'arm'
+ if id == 'armv7l':
+ return 'armv7l'
+ else:
+ return 'arm'
elif id == 'i86pc':
return 'ia32'
elif id == 'amd64':
Binary files libv8-2.2.24/tools/utils.pyc and libv8-2.2.24.armhf//tools/utils.pyc differ