]> code.ossystems Code Review - openembedded-core.git/commitdiff
libzypp: workaround to pass mips build
authorKevin Tian <kevin.tian@intel.com>
Wed, 8 Sep 2010 08:57:03 +0000 (16:57 +0800)
committerRichard Purdie <rpurdie@linux.intel.com>
Wed, 8 Sep 2010 13:39:00 +0000 (14:39 +0100)
libzypp failed due to GCC "internal compiler error: segmentation fault" error on
MIPS target. The cause is about boost tribool type usage. If having assignement
within conditional check as below:

if ( (a = b) )
...
<a is a tribool type, b is a normal bool type>

then gcc4.3.3 throws internal error. Then the workaround is to move assignement
out of the conditional check.

However I didn't find same case from web.

We can come back to recheck this issue after upgrading to gcc4.5.0 for MIPS. If
this issue is still there, we'll need more analysis to decide whether to report
to gcc upstream or to libzypp upstream.

This fixes [BUGID #277]

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
meta/recipes-extended/libzypp/libzypp/mips-workaround-gcc-tribool-error.patch [new file with mode: 0644]
meta/recipes-extended/libzypp/libzypp_git.bb

diff --git a/meta/recipes-extended/libzypp/libzypp/mips-workaround-gcc-tribool-error.patch b/meta/recipes-extended/libzypp/libzypp/mips-workaround-gcc-tribool-error.patch
new file mode 100644 (file)
index 0000000..849ce3d
--- /dev/null
@@ -0,0 +1,22 @@
+# with gcc 4.3.3 and MIPS target, gcc "internal compiler error: segmentation fault" error
+# occurs when compiling Applydeltarpm.cc. I didn't find the exact reason leading to this
+# error, but it should be related to how boost tribool type is interpreted by g++. So provide
+# this mips workaround for now. We'll come back later to check whether it's still required after
+# upgrading to 4.5.0.
+#
+# Signed-off-by Kevin Tian <kevin.tian@intel.com>, 2010-09-08
+
+diff --git a/zypp/repo/Applydeltarpm.cc b/zypp/repo/Applydeltarpm.cc
+index 7b382be..0d7a1f8 100644
+--- a/zypp/repo/Applydeltarpm.cc
++++ b/zypp/repo/Applydeltarpm.cc
+@@ -77,7 +77,8 @@ namespace zypp
+       else
+         {
+           // _last is 'indeterminate' or '!have'
+-          if ( (_last = have) )
++          _last = have;
++          if ( _last )
+             MIL << "Found executable " << prog << endl;
+           else
+             WAR << "No executable " << prog << endl;
index a2856d147571aa5be3d50341d61fc5aca0e1ff3a..44ea60d05454bb025b523adb738ad7cca33c1155 100644 (file)
@@ -10,11 +10,13 @@ DEPENDS  = "rpm boost gettext curl libxml2 zlib sat-solver expat openssl udev"
 
 S = "${WORKDIR}/git"
 PV = "0.0-git${SRCPV}"
-PR = "r0"
+PR = "r1"
 
 SRC_URI = "git://gitorious.org/opensuse/libzypp.git;protocol=git \
            file://no-doc.patch \
            file://rpm5.patch"
 
+SRC_URI_append_mips = " file://mips-workaround-gcc-tribool-error.patch"
+
 FILES_${PN} += "${libdir}/zypp ${datadir}/zypp ${datadir}/icons"
 FILES_${PN}-dev += "${datadir}/cmake"