[oe,meta-browser] firefox: Fix Build QA error compile-host-path

Message ID 20170703192432.38081-1-raj.khem@gmail.com
State New
Headers show

Commit Message

Khem Raj July 3, 2017, 7:24 p.m.
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 .../firefox/firefox/remove_AC_PATH_XTRA.patch      | 59 ++++++++++++++++++++++
 recipes-mozilla/firefox/firefox_45.9.0esr.bb       |  1 +
 2 files changed, 60 insertions(+)
 create mode 100644 recipes-mozilla/firefox/firefox/remove_AC_PATH_XTRA.patch

-- 
2.13.2

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Patch

diff --git a/recipes-mozilla/firefox/firefox/remove_AC_PATH_XTRA.patch b/recipes-mozilla/firefox/firefox/remove_AC_PATH_XTRA.patch
new file mode 100644
index 0000000..69d297e
--- /dev/null
+++ b/recipes-mozilla/firefox/firefox/remove_AC_PATH_XTRA.patch
@@ -0,0 +1,59 @@ 
+Drop unused X_* flags.
+
+There are actually causing harm doing cross builds since they are picking
+up $includedir which  is /usr/include and pouring that into CFLAGS in
+case of cairo, which ends up referening to build host's include paths
+
+Luckily, we have a QA check to catch such issues
+
+ERROR: firefox-45.9.0esr-r0 do_package_qa: QA Issue: firefox: The compile log indicates that host include and/or library paths were used.
+         Please check the log '/mnt/a/oe/build/tmp/work/corei7-64-bec-linux/firefox/45.9.0esr-r0/temp/log.do_compile' for more information. [compile-host-path]
+
+This patch fixes it
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: firefox-45.9.0esr/configure
+===================================================================
+--- firefox-45.9.0esr.orig/configure
++++ firefox-45.9.0esr/configure
+@@ -30605,10 +30605,6 @@ sed 's/$/,/' >> $CONFIG_STATUS <<EOF
+     (''' MACOS_SDK_DIR ''', r''' $MACOS_SDK_DIR ''')
+     (''' MACOS_PRIVATE_FRAMEWORKS_DIR ''', r''' $MACOS_PRIVATE_FRAMEWORKS_DIR ''')
+     (''' GMAKE ''', r''' $GMAKE ''')
+-    (''' X_CFLAGS ''', r''' $X_CFLAGS ''')
+-    (''' X_PRE_LIBS ''', r''' $X_PRE_LIBS ''')
+-    (''' X_LIBS ''', r''' $X_LIBS ''')
+-    (''' X_EXTRA_LIBS ''', r''' $X_EXTRA_LIBS ''')
+     (''' SOLARIS_SUNPRO_CC ''', r''' $SOLARIS_SUNPRO_CC ''')
+     (''' SOLARIS_SUNPRO_CXX ''', r''' $SOLARIS_SUNPRO_CXX ''')
+     (''' MOZ_THUMB2 ''', r''' $MOZ_THUMB2 ''')
+Index: firefox-45.9.0esr/js/src/configure
+===================================================================
+--- firefox-45.9.0esr.orig/js/src/configure
++++ firefox-45.9.0esr/js/src/configure
+@@ -17188,10 +17188,6 @@ sed 's/$/,/' >> $CONFIG_STATUS <<EOF
+     (''' MACOSX_DEPLOYMENT_TARGET ''', r''' $MACOSX_DEPLOYMENT_TARGET ''')
+     (''' MACOS_SDK_DIR ''', r''' $MACOS_SDK_DIR ''')
+     (''' GMAKE ''', r''' $GMAKE ''')
+-    (''' X_CFLAGS ''', r''' $X_CFLAGS ''')
+-    (''' X_PRE_LIBS ''', r''' $X_PRE_LIBS ''')
+-    (''' X_LIBS ''', r''' $X_LIBS ''')
+-    (''' X_EXTRA_LIBS ''', r''' $X_EXTRA_LIBS ''')
+     (''' MOZILLA_SYMBOLVERSION ''', r''' $MOZILLA_SYMBOLVERSION ''')
+     (''' JS_SHELL_NAME ''', r''' $JS_SHELL_NAME ''')
+     (''' JS_CONFIG_NAME ''', r''' $JS_CONFIG_NAME ''')
+Index: firefox-45.9.0esr/gfx/cairo/cairo/src/moz.build
+===================================================================
+--- firefox-45.9.0esr.orig/gfx/cairo/cairo/src/moz.build
++++ firefox-45.9.0esr/gfx/cairo/cairo/src/moz.build
+@@ -246,9 +246,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt':
+     CFLAGS += CONFIG['MOZ_QT_CFLAGS']
+     CXXFLAGS += CONFIG['MOZ_QT_CFLAGS']
+ 
+-if CONFIG['MOZ_X11']:
+-    CFLAGS += CONFIG['XCFLAGS']
+-
+ if CONFIG['MOZ_ENABLE_CAIRO_FT']:
+     CFLAGS += CONFIG['CAIRO_FT_CFLAGS']
+     CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
diff --git a/recipes-mozilla/firefox/firefox_45.9.0esr.bb b/recipes-mozilla/firefox/firefox_45.9.0esr.bb
index 54d1713..812652e 100644
--- a/recipes-mozilla/firefox/firefox_45.9.0esr.bb
+++ b/recipes-mozilla/firefox/firefox_45.9.0esr.bb
@@ -43,6 +43,7 @@  SRC_URI = "https://archive.mozilla.org/pub/firefox/releases/${PV}/source/firefox
            file://0002-use-pkg-config-to-find-nspr.patch \
            file://0003-do-not-link-against-crmf-library-it-is-not-there.patch \
            file://gcc7.patch \
+           file://remove_AC_PATH_XTRA.patch \
 "
 
 SRC_URI[archive.md5sum] = "f4d83c5150fc5085db20d71862497eb8"