Package: libv8-3.14
Severity: wishlist
Version: 3.14.5.8-8
Tags: patch

Attatched is a debdiff to make libv8-3.14 build correctly on raspbian (and hence run on armv6 systems running raspbian). There are two parts to the patch.

1: Changes to debian/rules to supply appropriate configuration options
2: A small change to the upstream build process to not assume hardfloat implies vfpv3. I don't think this should have any impact on debian armhf as you set things explicitly but if you are concerned you might want to talk to upstream (and you might want to talk to them anyway to push this upstream).

It would be good if you could apply this since carrying patches like this locally is a pain (especially for a package that seems like it will be changing source package names from time to time therefore subverting our tracking)

No intent to NMU
diff -Nru libv8-3.14-3.14.5.8/debian/changelog 
libv8-3.14-3.14.5.8/debian/changelog
--- libv8-3.14-3.14.5.8/debian/changelog        2014-05-06 19:35:22.000000000 
+0000
+++ libv8-3.14-3.14.5.8/debian/changelog        2014-05-24 03:12:01.000000000 
+0000
@@ -1,3 +1,9 @@
+libv8-3.14 (3.14.5.8-8+rpi1) jessie-staging; urgency=medium
+
+  * Add Raspbian support to configuration logic.
+
+ -- Peter Michael Green <plugw...@raspbian.org>  Sat, 24 May 2014 03:08:09 
+0000
+
 libv8-3.14 (3.14.5.8-8) unstable; urgency=medium
 
   * Add 0004_hurd.patch, add Architecture: hurd-i386.
diff -Nru 
libv8-3.14-3.14.5.8/debian/patches/dont-assume-hardfloat-means-vfpv3.diff 
libv8-3.14-3.14.5.8/debian/patches/dont-assume-hardfloat-means-vfpv3.diff
--- libv8-3.14-3.14.5.8/debian/patches/dont-assume-hardfloat-means-vfpv3.diff   
1970-01-01 00:00:00.000000000 +0000
+++ libv8-3.14-3.14.5.8/debian/patches/dont-assume-hardfloat-means-vfpv3.diff   
2014-05-25 02:53:57.000000000 +0000
@@ -0,0 +1,13 @@
+Description: don't assume hardfloat means vfpv3
+Author: Peter Michael Green <plugw...@raspbian.org>
+
+--- libv8-3.14-3.14.5.8.orig/build/common.gypi
++++ libv8-3.14-3.14.5.8/build/common.gypi
+@@ -157,7 +157,6 @@
+           [ 'v8_use_arm_eabi_hardfloat=="true"', {
+             'defines': [
+               'USE_EABI_HARDFLOAT=1',
+-              'CAN_USE_VFP3_INSTRUCTIONS',
+             ],
+             'target_conditions': [
+               ['_toolset=="target"', {
diff -Nru libv8-3.14-3.14.5.8/debian/patches/series 
libv8-3.14-3.14.5.8/debian/patches/series
--- libv8-3.14-3.14.5.8/debian/patches/series   2014-05-06 19:25:10.000000000 
+0000
+++ libv8-3.14-3.14.5.8/debian/patches/series   2014-05-25 02:53:22.000000000 
+0000
@@ -9,3 +9,4 @@
 0012_loongson_force_cache_flush.patch
 0013_gcc_48_compat.patch
 0014_cve_2013_6639_6640.patch
+dont-assume-hardfloat-means-vfpv3.diff
diff -Nru libv8-3.14-3.14.5.8/debian/rules libv8-3.14-3.14.5.8/debian/rules
--- libv8-3.14-3.14.5.8/debian/rules    2014-05-06 18:21:42.000000000 +0000
+++ libv8-3.14-3.14.5.8/debian/rules    2014-05-25 03:06:45.000000000 +0000
@@ -80,9 +80,15 @@
 ifeq (armhf, $(DEB_HOST_ARCH))
 CXXFLAGS += -fno-tree-sink
 CXXFLAGS += -Wno-psabi
+ifeq ($(shell dpkg-vendor --derives-from raspbian && echo true),true)
+# enable vfpv2, disable armv7
+GYPFLAGS += -Darmv7=0 -Darm_fpu=vfpv2 -Darm_neon=0 
-Dv8_use_arm_eabi_hardfloat=true
+DEB_MAKE_EXTRA_ARGS += vfp3=off
+else
 # enable armv7 vfpv3
 GYPFLAGS += -Darmv7=1 -Darm_fpu=vfpv3 -Darm_neon=0 
-Dv8_use_arm_eabi_hardfloat=true
 endif
+endif
 
 ifeq (armel, $(DEB_HOST_ARCH))
 # hints can be found there:
_______________________________________________
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel

Reply via email to