crosswalk: fix build on ARM 95/44295/2
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 14 Jul 2015 17:19:24 +0000 (17:19 +0000)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 20 Jul 2015 20:07:49 +0000 (20:07 +0000)
Import build changes from Leon Anavi <leon.anavi@konsulko.com>
git tree, in order to fix crosswalk builds on Tizen.

What happens here is that the crosswalk target does lots of
things out of their business, like trying to enforce a certain
name for gcc and hardcoding patches at the toolchain.

It is up to bitbake toolchain to come with the proper tools
to build the target. Whatever those tools are named, the
target should build.

While here, remove bad spaces from those recipes.

Change-Id: I86df8dd7ebaebb20dd0ac9674ce9ca6ab3102e42
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
19 files changed:
meta-tizen-common-share/recipes-crosswalk/crosswalk/crosswalk-extraconf.inc
meta-tizen-common-share/recipes-crosswalk/crosswalk/crosswalk-thirdparty-extraconf.inc
meta-tizen-common-share/recipes-crosswalk/crosswalk/crosswalk-thirdparty.inc
meta-tizen-common-share/recipes-crosswalk/crosswalk/crosswalk.inc
meta-tizen-common-share/recipes-crosswalk/crosswalk/crosswalk_git.bb
meta-tizen-common-share/recipes-crosswalk/crosswalk/files/armv6/include.gypi [new file with mode: 0644]
meta-tizen-common-share/recipes-crosswalk/crosswalk/files/armv6/oe-defaults.gypi [moved from meta-tizen-common-share/recipes-crosswalk/crosswalk/files/arm/oe-defaults.gypi with 100% similarity]
meta-tizen-common-share/recipes-crosswalk/crosswalk/files/armv7a/include.gypi [moved from meta-tizen-common-share/recipes-crosswalk/crosswalk/files/arm/include.gypi with 100% similarity]
meta-tizen-common-share/recipes-crosswalk/crosswalk/files/armv7a/oe-defaults.gypi [new file with mode: 0644]
meta-tizen-common-share/recipes-crosswalk/crosswalk/files/fix-crosbuild.patch
meta-tizen-common-share/recipes-crosswalk/crosswalk/files/fix-egl-version.patch [new file with mode: 0644]
meta-tizen-common-share/recipes-crosswalk/crosswalk/files/genericx86-64/include.gypi [new file with mode: 0644]
meta-tizen-common-share/recipes-crosswalk/crosswalk/files/genericx86-64/oe-defaults.gypi [new file with mode: 0644]
meta-tizen-common-share/recipes-crosswalk/crosswalk/files/romley-ivb/include.gypi [new file with mode: 0644]
meta-tizen-common-share/recipes-crosswalk/crosswalk/files/romley-ivb/oe-defaults.gypi [new file with mode: 0644]
meta-tizen-common-share/recipes-crosswalk/crosswalk/files/valleyisland-64/include.gypi [new file with mode: 0644]
meta-tizen-common-share/recipes-crosswalk/crosswalk/files/valleyisland-64/oe-defaults.gypi [new file with mode: 0644]
meta-tizen-common-share/recipes-crosswalk/tizen-extensions-crosswalk/tizen-extensions-crosswalk.inc
meta-tizen-common-share/recipes-crosswalk/tizen-extensions-crosswalk/tizen-extensions-crosswalk_git.bb

index ace3956..2744c0e 100644 (file)
@@ -4,36 +4,40 @@ DEPENDS += "crosswalk-thirdparty"
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/crosswalk:"
 
+SRC_URI += "\
+            file://include.gypi \
+            file://oe-defaults.gypi \
+            "
+SRC_URI += "file://fix-crosbuild.patch"
+SRC_URI += "file://fix-egl-version.patch"
+
 # This comes from the chromium recipe:
 # http://layers.openembedded.org/layerindex/recipe/4969/
 # It allows architecture specific configuration
-SRC_URI += "${INCLUDE_GYPI}"
-SRC_URI += "${OE_DEFAULTS_GYPI}"
-
-SRC_URI += "file://fix-crosbuild.patch"
-
-INCLUDE_GYPI_i586 = "file://include.gypi"
-INCLUDE_GYPI_x86-64 = "file://include.gypi"
-INCLUDE_GYPI_arm = "file://include.gypi"
-OE_DEFAULTS_GYPI_i586 = "file://oe-defaults.gypi"
-OE_DEFAULTS_GYPI_x86-64 = "file://oe-defaults.gypi"
-OE_DEFAULTS_GYPI_arm = "file://oe-defaults.gypi"
+COMPATIBLE_MACHINE = "(-)"
+COMPATIBLE_MACHINE_i586 = "(.*)"
+COMPATIBLE_MACHINE_x86-64 = "(.*)"
+COMPATIBLE_MACHINE_armv6 = "(.*)"
+COMPATIBLE_MACHINE_armv7a = "(.*)"
+COMPATIBLE_MACHINE_romley-ivb = "(.*)"
+COMPATIBLE_MACHINE_valleyisland-64 = "(.*)"
+COMPATIBLE_MACHINE_rpi2 = "(.*)"
 
 RDEPENDS_${PN} += "libpulsecommon"
 
 do_compile_prepend() {
 
   CC_host="gcc"; export CC_host
   CXX_host="g++"; export CXX_host
-
   LD="${CXX}" export LD
   CC="${CC}" export CC
   CXX="${CXX}" export CXX
   GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -I${WORKDIR}/oe-defaults.gypi -I${WORKDIR}/include.gypi"
   GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Dhost_clang=0 "
-
   mkdir -p src/out
   tar -zxvf ${STAGING_DIR_HOST}${prefix}/share/crosswalk-thirdparty/out.tgz
+ CC_host="gcc"; export CC_host
+ CXX_host="g++"; export CXX_host
+
+ LD="${CXX}" export LD
+ CC="${CC}" export CC
+ CXX="${CXX}" export CXX
+ GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -I${WORKDIR}/oe-defaults.gypi -I${WORKDIR}/include.gypi"
+ GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Dhost_clang=0 "
+ mkdir -p src/out
+ tar -zxvf ${STAGING_DIR_HOST}${prefix}/share/crosswalk-thirdparty/out.tgz
 }
 
 do_configure() {
index 2b61259..97e3fcf 100644 (file)
@@ -2,20 +2,24 @@ inherit gettext
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/crosswalk:"
 
+SRC_URI += "\
+            file://include.gypi \
+            file://oe-defaults.gypi \
+            "
+SRC_URI += "file://fix-crosbuild.patch"
+SRC_URI += "file://fix-egl-version.patch"
+
 # This comes from the chromium recipe:
 # http://layers.openembedded.org/layerindex/recipe/4969/
 # It allows architecture specific configuration
-SRC_URI += "${INCLUDE_GYPI}"
-SRC_URI += "${OE_DEFAULTS_GYPI}"
-
-SRC_URI += "file://fix-crosbuild.patch"
-
-INCLUDE_GYPI_i586 = "file://include.gypi"
-INCLUDE_GYPI_x86-64 = "file://include.gypi"
-INCLUDE_GYPI_arm = "file://include.gypi"
-OE_DEFAULTS_GYPI_i586 = "file://oe-defaults.gypi"
-OE_DEFAULTS_GYPI_x86-64 = "file://oe-defaults.gypi"
-OE_DEFAULTS_GYPI_arm = "file://oe-defaults.gypi"
+COMPATIBLE_MACHINE = "(-)"
+COMPATIBLE_MACHINE_i586 = "(.*)"
+COMPATIBLE_MACHINE_x86-64 = "(.*)"
+COMPATIBLE_MACHINE_armv6 = "(.*)"
+COMPATIBLE_MACHINE_armv7a = "(.*)"
+COMPATIBLE_MACHINE_romley-ivb = "(.*)"
+COMPATIBLE_MACHINE_valleyisland-64 = "(.*)"
+COMPATIBLE_MACHINE_rpi2 = "(.*)"
 
 RDEPENDS_${PN} += "libpulsecommon"
 
@@ -23,14 +27,14 @@ DEPENDS += "yasm-native"
 
 do_compile_prepend() {
 
   CC_host="gcc"; export CC_host
   CXX_host="g++"; export CXX_host
+ CC_host="gcc"; export CC_host
+ CXX_host="g++"; export CXX_host
 
   LD="${CXX}" export LD
   CC="${CC}" export CC
   CXX="${CXX}" export CXX
   GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -I${WORKDIR}/oe-defaults.gypi -I${WORKDIR}/include.gypi"
   GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Dhost_clang=0 "
+ LD="${CXX}" export LD
+ CC="${CC}" export CC
+ CXX="${CXX}" export CXX
+ GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -I${WORKDIR}/oe-defaults.gypi -I${WORKDIR}/include.gypi"
+ GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Dhost_clang=0 "
 }
 
 do_configure() {
index f82a691..68859ac 100644 (file)
@@ -127,8 +127,8 @@ do_compile() {
  
  GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Duse_ozone=1"
  
- # disable nacl if necessary
- GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Ddisable_nacl=1"
+ # Force gold binary from chroot ld.gold provided by binutils-gold
+ GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Ddisable_nacl=1 -Dlinux_use_bundled_binutils=0 -Dlinux_use_bundled_gold=0 "
  
  # Linking fails when fatal ld warnings are enabled. See XWALK-1379.
  GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Ddisable_fatal_linker_warnings=1"
@@ -138,6 +138,9 @@ do_compile() {
  # sysroot variable is automatically set for cross compilation to use arm-sysroot provided by Chromium project
  # sysroot usage is not needed, we need to use arm libraries from the virtualized environment.
  #
+
+ GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Dsysroot= "
+
  # Crosswalk build fails if the fpu selected in the gcc option is different from neon in case of arm7 compilation
  # So force it.
  
@@ -146,6 +149,7 @@ do_compile() {
  # --no-parallel is added because chroot does not mount a /dev/shm, this will
  # cause python multiprocessing.SemLock error.
  export GYP_GENERATORS='ninja'
+ export GYP_DEFINES="$GYP_DEFINES arm_float_abi=hard"
  ./src/xwalk/gyp_xwalk src/xwalk/xwalk-thirdparty.gyp \
  --no-parallel \
  ${GYP_EXTRA_FLAGS} \
@@ -153,6 +157,7 @@ do_compile() {
  -Dclang=0 \
  -Dlinux_use_bundled_binutils=0 \
  -Dlinux_use_bundled_gold=0 \
+ -Dlinux_use_gold_flags=1 \
  -Dtizen=1 \
  -Dpython_ver=2.7 \
  -Duse_aura=1 \
index 1a2e832..ca4eab1 100644 (file)
@@ -151,8 +151,8 @@ do_compile() {
  
  GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Duse_ozone=1"
  
- # disable nacl if necessary
- GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Ddisable_nacl=1"
+ # Force gold binary from chroot ld.gold provided by binutils-gold
+ GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Ddisable_nacl=1 -Dlinux_use_bundled_binutils=0 -Dlinux_use_bundled_gold=0 "
  
  # Linking fails when fatal ld warnings are enabled. See XWALK-1379.
  GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Ddisable_fatal_linker_warnings=1"
@@ -162,6 +162,9 @@ do_compile() {
  # sysroot variable is automatically set for cross compilation to use arm-sysroot provided by Chromium project
  # sysroot usage is not needed, we need to use arm libraries from the virtualized environment.
  #
+
+ GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Dsysroot= "
+
  # Crosswalk build fails if the fpu selected in the gcc option is different from neon in case of arm7 compilation
  # So force it.
  
@@ -170,6 +173,7 @@ do_compile() {
  # --no-parallel is added because chroot does not mount a /dev/shm, this will
  # cause python multiprocessing.SemLock error.
  export GYP_GENERATORS='ninja'
+ export GYP_DEFINES="$GYP_DEFINES arm_float_abi=hard"
  ./src/xwalk/gyp_xwalk src/xwalk/xwalk.gyp \
  --no-parallel \
  ${GYP_EXTRA_FLAGS} \
@@ -177,6 +181,7 @@ do_compile() {
  -Dclang=0 \
  -Dlinux_use_bundled_binutils=0 \
  -Dlinux_use_bundled_gold=0 \
+ -Dlinux_use_gold_flags=1 \
  -Dtizen=1 \
  -Dpython_ver=2.7 \
  -Duse_aura=1 \
@@ -190,7 +195,9 @@ do_compile() {
  -Duse_system_nspr=1 \
  -Duse_system_yasm=1 \
  -Dshared_process_mode=1 \
- -Denable_hidpi=1
+ -Denable_hidpi=1 \
+ -Dwerror= \
+ -Dskia_warnings_as_errors=0
  
  ninja ${PARALLEL_MAKE} -C src/out/Release xwalk xwalk_launcher xwalk_application_tools widget-manifest-parser
  
index d8c6eff..3ca9b1b 100644 (file)
@@ -4,7 +4,7 @@ PRIORITY = "10"
 
 LIC_FILES_CHKSUM ??= "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
 
-SRC_URI += "git://review.tizen.org/platform/framework/web/crosswalk;tag=4c34a63b5fd4244d48cf29490c20fe1aca799ef9;nobranch=1"
+SRC_URI += "git://review.tizen.org/platform/framework/web/crosswalk;tag=e02d90f63d504e1126cdb98e24cd0bd168b0d4d9;nobranch=1"
 
 BBCLASSEXTEND += " native "
 
diff --git a/meta-tizen-common-share/recipes-crosswalk/crosswalk/files/armv6/include.gypi b/meta-tizen-common-share/recipes-crosswalk/crosswalk/files/armv6/include.gypi
new file mode 100644 (file)
index 0000000..2c88271
--- /dev/null
@@ -0,0 +1,8 @@
+{
+  'variables': {
+    # Configure for armv6 compilation
+    'target_arch': 'arm',
+    'armv7': 0,
+    'arm_neon': 0,
+  }
+}
diff --git a/meta-tizen-common-share/recipes-crosswalk/crosswalk/files/armv7a/oe-defaults.gypi b/meta-tizen-common-share/recipes-crosswalk/crosswalk/files/armv7a/oe-defaults.gypi
new file mode 100644 (file)
index 0000000..27e1cfe
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  'variables': {
+    'use_system_bzip2': 1,
+    'disable_nacl': 1,
+    'proprietary_codecs': 1,
+    'v8_use_snapshot': 1,
+    'use_system_ffmpeg': 0,
+    'linux_use_tcmalloc': 0,
+    'linux_link_kerberos': 0,
+    'use_kerberos': 0,
+    'use_cups': 0,
+    'use_gnome_keyring': 0,
+    'linux_link_gnome_keyring': 0
+  }, 
+}
index 47e034b..6ccd3a3 100644 (file)
@@ -19,3 +19,14 @@ index 5ce3249..329623f 100644
                  ],
                }],
              ],
+@@ -5824,8 +5825,8 @@
+       # Set default ARM cross compiling on linux.  These can be overridden
+       # using CC/CXX/etc environment variables.
+       'make_global_settings': [
+-        ['CC', '<!(which arm-linux-gnueabihf-gcc)'],
+-        ['CXX', '<!(which arm-linux-gnueabihf-g++)'],
++        ['CC', '$(CC)'],
++        ['CXX', '$(CXX)'],
+         ['CC.host', '<(host_cc)'],
+         ['CXX.host', '<(host_cxx)'],
+       ],
diff --git a/meta-tizen-common-share/recipes-crosswalk/crosswalk/files/fix-egl-version.patch b/meta-tizen-common-share/recipes-crosswalk/crosswalk/files/fix-egl-version.patch
new file mode 100644 (file)
index 0000000..1e552eb
--- /dev/null
@@ -0,0 +1,14 @@
+diff --git a/src/ozone/wayland/wayland.gyp b/src/ozone/wayland/wayland.gyp
+index 652ada2..6010a09 100644
+--- a/src/ozone/wayland/wayland.gyp
++++ b/src/ozone/wayland/wayland.gyp
+@@ -20,7 +20,7 @@
+       'type': 'static_library',
+       'variables': {
+         'WAYLAND_VERSION': '1.4.0',
+-        'MESA_VERSION': '9.1.3',
++        'MESA_VERSION': '1.0.0',
+         'wayland_packages': [
+           'egl >= <(MESA_VERSION)',
+           'wayland-client >= <(WAYLAND_VERSION)',
+
diff --git a/meta-tizen-common-share/recipes-crosswalk/crosswalk/files/genericx86-64/include.gypi b/meta-tizen-common-share/recipes-crosswalk/crosswalk/files/genericx86-64/include.gypi
new file mode 100644 (file)
index 0000000..c2e2a7d
--- /dev/null
@@ -0,0 +1,5 @@
+{
+  'variables': {
+    'target_arch': 'x64',
+  }
+}
diff --git a/meta-tizen-common-share/recipes-crosswalk/crosswalk/files/genericx86-64/oe-defaults.gypi b/meta-tizen-common-share/recipes-crosswalk/crosswalk/files/genericx86-64/oe-defaults.gypi
new file mode 100644 (file)
index 0000000..0a6e8e8
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  'variables': {
+    'use_system_bzip2': 1,
+    'disable_nacl': 1,
+    'proprietary_codecs': 0,
+    'v8_use_snapshot': 1,
+    'use_system_ffmpeg': 0,
+    'linux_use_tcmalloc': 1,
+    'linux_link_kerberos': 0,
+    'use_kerberos': 0,
+    'use_cups': 0,
+    'use_gnome_keyring': 0,
+    'linux_link_gnome_keyring': 0,
+  }, 
+}
diff --git a/meta-tizen-common-share/recipes-crosswalk/crosswalk/files/romley-ivb/include.gypi b/meta-tizen-common-share/recipes-crosswalk/crosswalk/files/romley-ivb/include.gypi
new file mode 100644 (file)
index 0000000..c2e2a7d
--- /dev/null
@@ -0,0 +1,5 @@
+{
+  'variables': {
+    'target_arch': 'x64',
+  }
+}
diff --git a/meta-tizen-common-share/recipes-crosswalk/crosswalk/files/romley-ivb/oe-defaults.gypi b/meta-tizen-common-share/recipes-crosswalk/crosswalk/files/romley-ivb/oe-defaults.gypi
new file mode 100644 (file)
index 0000000..0a6e8e8
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  'variables': {
+    'use_system_bzip2': 1,
+    'disable_nacl': 1,
+    'proprietary_codecs': 0,
+    'v8_use_snapshot': 1,
+    'use_system_ffmpeg': 0,
+    'linux_use_tcmalloc': 1,
+    'linux_link_kerberos': 0,
+    'use_kerberos': 0,
+    'use_cups': 0,
+    'use_gnome_keyring': 0,
+    'linux_link_gnome_keyring': 0,
+  }, 
+}
diff --git a/meta-tizen-common-share/recipes-crosswalk/crosswalk/files/valleyisland-64/include.gypi b/meta-tizen-common-share/recipes-crosswalk/crosswalk/files/valleyisland-64/include.gypi
new file mode 100644 (file)
index 0000000..c2e2a7d
--- /dev/null
@@ -0,0 +1,5 @@
+{
+  'variables': {
+    'target_arch': 'x64',
+  }
+}
diff --git a/meta-tizen-common-share/recipes-crosswalk/crosswalk/files/valleyisland-64/oe-defaults.gypi b/meta-tizen-common-share/recipes-crosswalk/crosswalk/files/valleyisland-64/oe-defaults.gypi
new file mode 100644 (file)
index 0000000..0a6e8e8
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  'variables': {
+    'use_system_bzip2': 1,
+    'disable_nacl': 1,
+    'proprietary_codecs': 0,
+    'v8_use_snapshot': 1,
+    'use_system_ffmpeg': 0,
+    'linux_use_tcmalloc': 1,
+    'linux_link_kerberos': 0,
+    'use_kerberos': 0,
+    'use_cups': 0,
+    'use_gnome_keyring': 0,
+    'linux_link_gnome_keyring': 0,
+  }, 
+}
index 2b53bdb..4c7dd7a 100644 (file)
@@ -118,9 +118,7 @@ do_compile() {
  
  
  export GYP_GENERATORS='ninja'
- GYP_OPTIONS="--depth=. -Dtizen=1 -Dextension_build_type=Debug -Dextension_host_os=pc"
- GYP_OPTIONS="$GYP_OPTIONS -Ddisplay_type=wayland"
+ GYP_OPTIONS="--depth=. -Dtizen=1 -Dextension_build_type=Release -Dextension_host_os=ivi -Ddisplay_type=wayland"
  
  ./tools/gyp/gyp $GYP_OPTIONS tizen-wrt.gyp
  
index 041e3bd..776f926 100644 (file)
@@ -4,7 +4,7 @@ PRIORITY = "10"
 
 LIC_FILES_CHKSUM ??= "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
 
-SRC_URI += "git://review.tizen.org/platform/framework/web/tizen-extensions-crosswalk;tag=a79b3c4abb9c5b9a50b0a82d3b57b9c83788f8e7;nobranch=1"
+SRC_URI += "git://review.tizen.org/platform/framework/web/tizen-extensions-crosswalk;tag=68cfc61d4b96a335e5ba58c3997a4fbb629759fb;nobranch=1"
 
 BBCLASSEXTEND += " native "