Patchwork [06/16] libzypp: fix compilatoin with gcc 4.6.0

login
register
mail settings
Submitter Nitin A Kamble
Date May 10, 2011, 9:16 p.m.
Message ID <520e750344d82cc40b301c16ed4d527680b8f55d.1305062028.git.nitin.a.kamble@intel.com>
Download mbox | patch
Permalink /patch/3687/
State New, archived
Headers show

Comments

Nitin A Kamble - May 10, 2011, 9:16 p.m.
From: Nitin A Kamble <nitin.a.kamble@intel.com>

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
 .../libzypp/fix_for_compile_wth_gcc-4.6.0.patch    |   22 ++++++++++++++++++++
 meta/recipes-extended/libzypp/libzypp_git.bb       |    3 +-
 2 files changed, 24 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-extended/libzypp/libzypp/fix_for_compile_wth_gcc-4.6.0.patch

Patch

diff --git a/meta/recipes-extended/libzypp/libzypp/fix_for_compile_wth_gcc-4.6.0.patch b/meta/recipes-extended/libzypp/libzypp/fix_for_compile_wth_gcc-4.6.0.patch
new file mode 100644
index 0000000..0f17b48
--- /dev/null
+++ b/meta/recipes-extended/libzypp/libzypp/fix_for_compile_wth_gcc-4.6.0.patch
@@ -0,0 +1,22 @@ 
+Upstream-Status: Pending
+
+Fix following compilation errors with gcc 4.6.0
+Nitin A Kamble <nitin.a.kamble@intel.com> 2011/05/09
+
+| i586-poky-linux-g++: error: unrecognized option '--as-needed'
+| make[2]: *** [zypp/libzypp.so.810.1.0] Error 1
+
+
+Index: git/zypp/CMakeLists.txt
+===================================================================
+--- git.orig/zypp/CMakeLists.txt
++++ git/zypp/CMakeLists.txt
+@@ -903,7 +903,7 @@ SET_LOGGROUP( "satsolver" ${zypp_sat_SRC
+ ADD_LIBRARY(zypp SHARED ${zypp_lib_SRCS})
+ SET_TARGET_PROPERTIES( zypp PROPERTIES VERSION "${LIBZYPP_VERSION_INFO}" )
+ SET_TARGET_PROPERTIES( zypp PROPERTIES SOVERSION "${LIBZYPP_SOVERSION_INFO}" )
+-SET_TARGET_PROPERTIES( zypp PROPERTIES LINK_FLAGS "--as-needed" )
++SET_TARGET_PROPERTIES( zypp PROPERTIES LINK_FLAGS "-Wl,--as-needed" )
+ ADD_DEPENDENCIES(zypp schema_header)
+ # System libraries
+ SET(UTIL_LIBRARY util)
diff --git a/meta/recipes-extended/libzypp/libzypp_git.bb b/meta/recipes-extended/libzypp/libzypp_git.bb
index f8535af..824f7a1 100644
--- a/meta/recipes-extended/libzypp/libzypp_git.bb
+++ b/meta/recipes-extended/libzypp/libzypp_git.bb
@@ -14,7 +14,7 @@  RDEPENDS_${PN} = "sat-solver"
 S = "${WORKDIR}/git"
 SRCREV = "15b6c52260bbc52b3d8e585e271b67e10cc7c433"
 PV = "0.0-git${SRCPV}"
-PR = "r9"
+PR = "r10"
 
 SRC_URI = "git://gitorious.org/opensuse/libzypp.git;protocol=git \
            file://no-doc.patch \
@@ -22,6 +22,7 @@  SRC_URI = "git://gitorious.org/opensuse/libzypp.git;protocol=git \
            file://rpm5-no-rpmdbinit.patch \
 	   file://config-release.patch \
 	   file://libzypp-pokyarch.patch \
+	   file://fix_for_compile_wth_gcc-4.6.0.patch \
           "
 
 SRC_URI_append_mips = " file://mips-workaround-gcc-tribool-error.patch"