Prelink/ld bug and rpm compilation on uclibc
cover Prelink/ld bug and rpm compilation on uclibc
This patch fixes bunch of recipes to build on uclibc binutils patch fixes the prelink problem recently seen on powerpc
The following changes since commit e3113827810e98eb1b012f0b280fb917199704c1:
webkit-gtk: Use glib as unicode backend to avoid browser crash (2012-05-30 17:37:58 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib kraj/misc-updates
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/misc-updates
Khem Raj (7):
binutils_2.22: Backport to fix bogus textrels
rpm: Fix compilation on uclibc
pth: Mark incompatible with uclibc
libtool: Let -fstack-protector passed to link step
rpm: Use link time check for libssp
sat-solver: Fix build on uclibc
libzypp: Fix build with uclibc
.../binutils/binutils/0001-PR-ld-13470.patch | 82 ++++++++++++++++++++ meta/recipes-devtools/binutils/binutils_2.22.bb | 3 +- meta/recipes-devtools/libtool/libtool-2.4.2.inc | 3 +- .../libtool/libtool/respect-fstack-protector.patch | 53 +++++++++++++ .../rpm/rpm/fstack-protector-configure-check.patch | 13 +++ meta/recipes-devtools/rpm/rpm/rpmatch.patch | 42 ++++++++++ meta/recipes-devtools/rpm/rpm/uclibc-support.patch | 69 ++++++++++++++++ meta/recipes-devtools/rpm/rpm_5.4.0.bb | 5 +- meta/recipes-extended/libzypp/libzypp/cstdio.patch | 49 ++++++++++++ meta/recipes-extended/libzypp/libzypp_git.bb | 10 ++- .../sat-solver/sat-solver/futimes.patch | 32 ++++++++ meta/recipes-extended/sat-solver/sat-solver_git.bb | 7 +- meta/recipes-support/pth/pth_2.0.7.bb | 12 +++- 13 files changed, 371 insertions(+), 9 deletions(-) create mode 100644 meta/recipes-devtools/binutils/binutils/0001-PR-ld-13470.patch create mode 100644 meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch create mode 100644 meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch create mode 100644 meta/recipes-devtools/rpm/rpm/rpmatch.patch create mode 100644 meta/recipes-devtools/rpm/rpm/uclibc-support.patch create mode 100644 meta/recipes-extended/libzypp/libzypp/cstdio.patch create mode 100644 meta/recipes-extended/sat-solver/sat-solver/futimes.patch
Signature · 1 line
1.7.5.4
PATCH 1/7 binutils_2.22: Backport to fix bogus textrels
This is reported by prelinker which does not
go well with textrels.
--- .../binutils/binutils/0001-PR-ld-13470.patch | 82 ++++++++++++++++++++ meta/recipes-devtools/binutils/binutils_2.22.bb | 3 +- 2 files changed, 84 insertions(+), 1 deletions(-) create mode 100644 meta/recipes-devtools/binutils/binutils/0001-PR-ld-13470.patch
meta/recipes-devtools/binutils/binutils/0001-PR-ld-13470.patch new file +82 -0
@@ -0,0 +1,82 @@ +From 82fdddd1c4e37881db9b4c6a944261521c6f10ac Mon Sep 17 00:00:00 2001 +From: Alan Modra <[email protected]> +Date: Sat, 3 Dec 2011 00:57:59 +0000 +Subject: [PATCH] PR ld/13470 * elf32-ppc.c + (ppc_elf_copy_indirect_symbol): Revert substantive + change in 2011-07-01 commit. Comment. * + elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise. + +--- + bfd/ChangeLog | 7 +++++++ + bfd/elf32-ppc.c | 14 ++++++++++---- + bfd/elf64-ppc.c | 14 ++++++++++---- + 3 files changed, 27 insertions(+), 8 deletions(-) + + +Upstream-Status: Backport + +Signed-off-by: Khem Raj <[email protected]> +Index: binutils-2.22/bfd/elf32-ppc.c +=================================================================== +--- binutils-2.22.orig/bfd/elf32-ppc.c 2011-11-21 01:29:21.000000000 -0800 ++++ binutils-2.22/bfd/elf32-ppc.c 2012-05-31 14:28:48.273784929 -0700 +@@ -2987,10 +2987,6 @@ + edir->elf.needs_plt |= eind->elf.needs_plt; + edir->elf.pointer_equality_needed |= eind->elf.pointer_equality_needed; + +- /* If we were called to copy over info for a weak sym, that's all. */ +- if (eind->elf.root.type != bfd_link_hash_indirect) +- return; +- + if (eind->dyn_relocs != NULL) + { + if (edir->dyn_relocs != NULL) +@@ -3022,6 +3018,16 @@ + eind->dyn_relocs = NULL; + } + ++ /* If we were called to copy over info for a weak sym, that's all. ++ You might think dyn_relocs need not be copied over; After all, ++ both syms will be dynamic or both non-dynamic so we're just ++ moving reloc accounting around. However, ELIMINATE_COPY_RELOCS ++ code in ppc_elf_adjust_dynamic_symbol needs to check for ++ dyn_relocs in read-only sections, and it does so on what is the ++ DIR sym here. */ ++ if (eind->elf.root.type != bfd_link_hash_indirect) ++ return; ++ + /* Copy over the GOT refcount entries that we may have already seen to + the symbol which just became indirect. */ + edir->elf.got.refcount += eind->elf.got.refcount; +Index: binutils-2.22/bfd/elf64-ppc.c +=================================================================== +--- binutils-2.22.orig/bfd/elf64-ppc.c 2011-11-21 01:29:24.000000000 -0800 ++++ binutils-2.22/bfd/elf64-ppc.c 2012-05-31 14:28:48.285784951 -0700 +@@ -4435,10 +4435,6 @@ + edir->elf.ref_regular_nonweak |= eind->elf.ref_regular_nonweak; + edir->elf.needs_plt |= eind->elf.needs_plt; + +- /* If we were called to copy over info for a weak sym, that's all. */ +- if (eind->elf.root.type != bfd_link_hash_indirect) +- return; +- + /* Copy over any dynamic relocs we may have on the indirect sym. */ + if (eind->dyn_relocs != NULL) + { +@@ -4471,6 +4467,16 @@ + eind->dyn_relocs = NULL; + } + ++ /* If we were called to copy over info for a weak sym, that's all. ++ You might think dyn_relocs need not be copied over; After all, ++ both syms will be dynamic or both non-dynamic so we're just ++ moving reloc accounting around. However, ELIMINATE_COPY_RELOCS ++ code in ppc64_elf_adjust_dynamic_symbol needs to check for ++ dyn_relocs in read-only sections, and it does so on what is the ++ DIR sym here. */ ++ if (eind->elf.root.type != bfd_link_hash_indirect) ++ return; ++ + /* Copy over got entries that we may have already seen to the + symbol which just became indirect. */ + if (eind->elf.got.glist != NULL)
meta/recipes-devtools/binutils/binutils_2.22.bb +2 -1
@@ -1,6 +1,6 @@ require binutils.inc -PR = "r8" +PR = "r9" LIC_FILES_CHKSUM="\ file://src-release;endline=17;md5=4830a9ef968f3b18dd5e9f2c00db2d35\
@@ -32,6 +32,7 @@ SRC_URI = "\ file://binutils-powerpc-e5500.patch \ file://binutils-armv5e.patch \ file://mips64-default-ld-emulation.patch \ + file://0001-PR-ld-13470.patch \ " SRC_URI[md5sum] = "ee0f10756c84979622b992a4a61ea3f5"
Signature · 1 line
1.7.5.4
PATCH 2/7 rpm: Fix compilation on uclibc
rpmatch is not there in uclibc therefore add logic to configure to detect it.
x* wrappers need to be defined for uclibc as well.
--- meta/recipes-devtools/rpm/rpm/rpmatch.patch | 42 ++++++++++++ meta/recipes-devtools/rpm/rpm/uclibc-support.patch | 69 ++++++++++++++++++++ meta/recipes-devtools/rpm/rpm_5.4.0.bb | 4 +- 3 files changed, 114 insertions(+), 1 deletions(-) create mode 100644 meta/recipes-devtools/rpm/rpm/rpmatch.patch create mode 100644 meta/recipes-devtools/rpm/rpm/uclibc-support.patch
meta/recipes-devtools/rpm/rpm/rpmatch.patch new file +42 -0
@@ -0,0 +1,42 @@ +Add configure check for rpmatch() and +creates a compatable macro if it is not provided by the C library. + +This is needed for uclibc since it does not have the above function +implemented. + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <[email protected]> + +Index: rpm-5.4.0/configure.ac +=================================================================== +--- rpm-5.4.0.orig/configure.ac 2012-05-31 15:40:05.985990822 -0700 ++++ rpm-5.4.0/configure.ac 2012-05-31 15:41:15.601995311 -0700 +@@ -800,7 +800,7 @@ + ftok getaddrinfo getattrlist getcwd getdelim getline getmode getnameinfo dnl + getpassphrase getxattr getwd iconv inet_aton lchflags lchmod lchown dnl + lgetxattr lsetxattr lutimes madvise mempcpy mkdtemp mkstemp mtrace dnl +- posix_fadvise posix_fallocate putenv realpath regcomp __secure_getenv dnl ++ posix_fadvise posix_fallocate putenv realpath regcomp rpmatch __secure_getenv dnl + setattrlist setenv setlocale setmode setxattr dnl + sigaddset sigdelset sigemptyset sighold sigrelse sigpause dnl + sigprocmask sigsuspend sigaction dnl +Index: rpm-5.4.0/system.h +=================================================================== +--- rpm-5.4.0.orig/system.h 2012-05-31 15:40:05.997991504 -0700 ++++ rpm-5.4.0/system.h 2012-05-31 15:42:04.941997731 -0700 +@@ -410,6 +410,14 @@ + #endif /* defined(__GNUC__) */ + #endif /* HAVE_MCHECK_H */ + ++#ifndef HAVE_RPMATCH ++#define rpmatch(line) \ ++ ( (line == NULL)? -1 : \ ++ (*line == 'y' || *line == 'Y')? 1 : \ ++ (*line == 'n' || *line == 'N')? 0 : \ ++ -1 ) ++#endif ++ + /* Retrofit glibc __progname */ + #if defined __GLIBC__ && __GLIBC__ >= 2 + #if __GLIBC_MINOR__ >= 1
meta/recipes-devtools/rpm/rpm/uclibc-support.patch new file +69 -0
69 lines not on this page · raw message
meta/recipes-devtools/rpm/rpm_5.4.0.bb +3 -1
@@ -45,7 +45,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1" DEPENDS = "bzip2 zlib db openssl elfutils expat libpcre attr acl popt ${extrarpmdeps}" extrarpmdeps = "python perl file" extrarpmdeps_virtclass-native = "python-native file-native" -PR = "r38" +PR = "r39" # rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed # in order to extract the distribution SRPM into a format we can extract...
@@ -72,6 +72,8 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.0-0.20101229.src.rpm;ex file://rpm-resolvedep.patch \ file://rpm-respect-arch.patch \ file://rpm_fix_for_automake-1.12.patch \ + file://uclibc-support.patch \ + file://rpmatch.patch \ " # file://rpm-autoconf.patch \
Signature · 1 line
1.7.5.4
Re: [PATCH 2/7] rpm: Fix compilation on uclibc
Quoted 4 lines · Khem Raj
rpmatch is not there in uclibc therefore add logic to configure to detect it.
x* wrappers need to be defined for uclibc as well.
Khem,
This patch set (07f0f1b217f7a2c1) will fail when Mark's recent rpm upgrades are pulled. You may want to pull in Mark's upgrades here and base your patch on that.
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=mhatle/rpm
-b
Quoted 163 lines
Signed-off-by Khem Raj <[email protected]>---
meta/recipes-devtools/rpm/rpm/rpmatch.patch | 42 ++++++++++++meta/recipes-devtools/rpm/rpm/uclibc-support.patch| 69 ++++++++++++++++++++ meta/recipes-devtools/rpm/rpm_5.4.0.bb | 4 +-3 files changed, 114 insertions(+), 1 deletions(-)create mode 100644
meta/recipes-devtools/rpm/rpm/rpmatch.patchcreate mode 100644meta/recipes-devtools/rpm/rpm/uclibc-support.patchmeta/recipes-devtools/rpm/rpm/rpmatch.patch new file +42
-0@@ -0,0 +1,42 @@ +Add configure check for rpmatch() and +creates a compatable macro if it is not provided by the C library. + +This is needed for uclibc since it does not have the above function +implemented. + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <[email protected]> + +Index: rpm-5.4.0/configure.ac +=================================================================== +--- rpm-5.4.0.orig/configure.ac 2012-05-31 15:40:05.985990822 -0700 ++++ rpm-5.4.0/configure.ac 2012-05-31 15:41:15.601995311 -0700 +@@ -800,7 +800,7 @@ + ftok getaddrinfo getattrlist getcwd getdelim getline getmode getnameinfo dnl + getpassphrase getxattr getwd iconv inet_aton lchflags lchmod lchown dnl + lgetxattr lsetxattr lutimes madvise mempcpy mkdtemp mkstemp mtrace dnl +- posix_fadvise posix_fallocate putenv realpath regcomp __secure_getenv dnl ++ posix_fadvise posix_fallocate putenv realpath regcomp rpmatch __secure_getenv dnl + setattrlist setenv setlocale setmode setxattr dnl + sigaddset sigdelset sigemptyset sighold sigrelse sigpause dnl + sigprocmask sigsuspend sigaction dnl +Index: rpm-5.4.0/system.h +=================================================================== +--- rpm-5.4.0.orig/system.h 2012-05-31 15:40:05.997991504 -0700 ++++ rpm-5.4.0/system.h 2012-05-31 15:42:04.941997731 -0700 +@@ -410,6 +410,14 @@ + #endif /* defined(__GNUC__) */ + #endif /* HAVE_MCHECK_H */ + ++#ifndef HAVE_RPMATCH ++#define rpmatch(line) \ ++ ( (line == NULL)? -1 : \ ++ (*line == 'y' || *line == 'Y')? 1 : \ ++ (*line == 'n' || *line == 'N')? 0 : \ ++ -1 ) ++#endif ++ + /* Retrofit glibc __progname */ + #if defined __GLIBC__ && __GLIBC__ >= 2 + #if __GLIBC_MINOR__ >= 1meta/recipes-devtools/rpm/rpm/uclibc-support.patch new file +69
-0@@ -0,0 +1,69 @@ +Define the x* wrappers for uclibc as well + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <[email protected]> + +Index: rpm-5.4.0/rpmio/rpmio.h +=================================================================== +--- rpm-5.4.0.orig/rpmio/rpmio.h 2010-09-29 07:54:30.000000000 -0700 ++++ rpm-5.4.0/rpmio/rpmio.h 2012-05-31 16:05:26.042065540 -0700 +@@ -23,7 +23,8 @@ + */ + /*@{*/ + #if !defined(__LCLINT__) && !defined(__UCLIBC__) && defined(__GLIBC__) && \ +- (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) ++ (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) && \ ++ !defined(__UCLIBC__) + #define USE_COOKIE_SEEK_POINTER 1 + typedef _IO_off64_t _libio_off_t; + typedef _libio_off_t * _libio_pos_t; +Index: rpm-5.4.0/system.h +=================================================================== +--- rpm-5.4.0.orig/system.h 2010-09-27 14:24:39.000000000 -0700 ++++ rpm-5.4.0/system.h 2012-05-31 16:08:07.334073348 -0700 +@@ -402,12 +402,12 @@ + #endif /* defined(__LCLINT__) */ + + /* Memory allocation via macro defs to get meaningful locations from mtrace() */ +-#if defined(__GNUC__) ++#if defined(__GNUC__) || defined(__UCLIBC__) + #define xmalloc(_size) (malloc(_size) ? : vmefail(_size)) + #define xcalloc(_nmemb, _size) (calloc((_nmemb), (_size)) ? : vmefail(_size)) + #define xrealloc(_ptr, _size) (realloc((_ptr), (_size)) ? : vmefail(_size)) + #define xstrdup(_str) (strcpy((malloc(strlen(_str)+1) ? : vmefail(strlen(_str)+1)), (_str))) +-#endif /* defined(__GNUC__) */ ++#endif /* defined(__GNUC__) */ + #endif /* HAVE_MCHECK_H */ + + /* Retrofit glibc __progname */ +Index: rpm-5.4.0/lib/librpm.vers +=================================================================== +--- rpm-5.4.0.orig/lib/librpm.vers 2010-09-27 16:12:48.000000000 -0700 ++++ rpm-5.4.0/lib/librpm.vers 2012-05-31 16:05:26.042065540 -0700 +@@ -405,6 +405,10 @@ + specedit; + strict_erasures; + XrpmtsiInit; ++ xmalloc; ++ xrealloc; ++ xcalloc; ++ xstrdup; + local: + *; + }; +Index: rpm-5.4.0/rpmio/librpmio.vers +=================================================================== +--- rpm-5.4.0.orig/rpmio/librpmio.vers 2012-05-31 16:13:34.034089141 -0700 ++++ rpm-5.4.0/rpmio/librpmio.vers 2012-05-31 16:13:56.542090245 -0700 +@@ -881,6 +881,10 @@ + mongo_simple_int_command; + mongo_simple_str_command; + mongo_update; ++ xmalloc; ++ xrealloc; ++ xcalloc; ++ xstrdup; + local: + *; + };meta/recipes-devtools/rpm/rpm_5.4.0.bb +0
-0@@ -45,7 +45,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"DEPENDS = "bzip2 zlib db openssl elfutils expat libpcre attr acl popt ${extrarpmdeps}" extrarpmdeps = "python perl file"
extrarpmdeps_virtclass-native = "python-native file-native"meta/recipes-devtools/rpm/rpm_5.4.0.bb +1
-1-PR = "r38" +PR = "r39"# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed # in order to extract the distribution SRPM into a format we can extract...meta/recipes-devtools/rpm/rpm_5.4.0.bb +2
-0@@ -72,6 +72,8 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.0-0.20101229.src.rpm;ex file://rpm-resolvedep.patch \ file://rpm-respect-arch.patch \ file://rpm_fix_for_automake-1.12.patch \ + file://uclibc-support.patch \ + file://rpmatch.patch \"
# file://rpm-autoconf.patch \
--
1.7.5.4_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 3 lines
Elizabeth Flanagan Yocto Project Build and Release
PATCH 3/7 pth: Mark incompatible with uclibc
In reply to Khem Rajpth does not work with uclibc
--- meta/recipes-support/pth/pth_2.0.7.bb | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-)
meta/recipes-support/pth/pth_2.0.7.bb +10 -2
@@ -3,9 +3,17 @@ HOMEPAGE = "http://www.gnu.org/software/pth/" SECTION = "libs" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;beginline=12;endline=15;md5=a48af114a80c222cafd37f24370a77b1" -PR = "r1" +PR = "r2" -SRC_URI = "${GNU_MIRROR}/pth/pth-${PV}.tar.gz" +python __anonymous () { + import bb, re + uc_os = (re.match('.*uclibc*', d.getVar('TARGET_OS', True)) != None) + if uc_os: + raise bb.parse.SkipPackage("incompatible with uClibc") +} + +SRC_URI = "${GNU_MIRROR}/pth/pth-${PV}.tar.gz \ + " SRC_URI[md5sum] = "9cb4a25331a4c4db866a31cbe507c793" SRC_URI[sha256sum] = "72353660c5a2caafd601b20e12e75d865fd88f6cf1a088b306a3963f0bc77232"
Signature · 1 line
1.7.5.4
PATCH 4/7 libtool: Let -fstack-protector passed to link step
In reply to Khem Rajlinker should add -lssp to linker cmdline when -fstack-protector therefore add this knowledge to libtool otherwise packages will fail to link
--- meta/recipes-devtools/libtool/libtool-2.4.2.inc | 3 +- .../libtool/libtool/respect-fstack-protector.patch | 53 ++++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletions(-) create mode 100644 meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch
meta/recipes-devtools/libtool/libtool-2.4.2.inc +2 -1
@@ -8,7 +8,7 @@ LICENSE = "GPLv2 & LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ file://libltdl/COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06" -INC_PR = "r3" +INC_PR = "r4" SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \ file://trailingslash.patch \
@@ -18,6 +18,7 @@ SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \ file://fix-final-rpath.patch \ file://avoid_absolute_paths_for_general_utils.patch \ file://fix-rpath.patch \ + file://respect-fstack-protector.patch \ " SRC_URI[md5sum] = "d2f3b7d4627e69e13514a40e72a24d50"
meta/recipes-devtools/libtool/libtool/respect-fstack-protector.patch new file +53 -0
53 lines not on this page · raw message
Signature · 1 line
1.7.5.4
PATCH 5/7 rpm: Use link time check for libssp
In reply to Khem Raj-fstack-protector needs libssp to link with
so when checking for this option support we
need to find if libssp is staged in root file
system
--- .../rpm/rpm/fstack-protector-configure-check.patch | 13 +++++++++++++ meta/recipes-devtools/rpm/rpm_5.4.0.bb | 1 + 2 files changed, 14 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch
meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch new file +13 -0
@@ -0,0 +1,13 @@ +Index: rpm-5.4.0/configure.ac +=================================================================== +--- rpm-5.4.0.orig/configure.ac 2012-06-01 11:41:19.741480143 -0700 ++++ rpm-5.4.0/configure.ac 2012-06-01 11:41:51.773481676 -0700 +@@ -193,7 +193,7 @@ + my_save_cflags="$CFLAGS" + CFLAGS=$c + AC_MSG_CHECKING([whether GCC supports $c]) +- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([])], + [AC_MSG_RESULT([yes])] + [my_cflags=$c], + [AC_MSG_RESULT([no])]
meta/recipes-devtools/rpm/rpm_5.4.0.bb +1 -0
@@ -74,6 +74,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.0-0.20101229.src.rpm;ex file://rpm_fix_for_automake-1.12.patch \ file://uclibc-support.patch \ file://rpmatch.patch \ + file://fstack-protector-configure-check.patch \ " # file://rpm-autoconf.patch \
Signature · 1 line
1.7.5.4
PATCH 6/7 sat-solver: Fix build on uclibc
In reply to Khem Rajfutimes is not available on uclibc so use utimes
--- .../sat-solver/sat-solver/futimes.patch | 32 ++++++++++++++++++++ meta/recipes-extended/sat-solver/sat-solver_git.bb | 7 +++- 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-extended/sat-solver/sat-solver/futimes.patch
meta/recipes-extended/sat-solver/sat-solver/futimes.patch new file +32 -0
@@ -0,0 +1,32 @@ +This patch uses utimes instead of futimes for uclibc +since futimes is not available + +Upstream-Status: Pending +Signed-off-by: Khem Raj <[email protected]> + +Index: git/examples/solv.c +=================================================================== +--- git.orig/examples/solv.c 2012-06-01 12:06:22.041552848 -0700 ++++ git/examples/solv.c 2012-06-01 12:49:17.417677449 -0700 +@@ -1027,7 +1027,8 @@ + int flags; + + cinfo = repo->appdata; +- if (!(fp = fopen(calccachepath(repo, repoext), "r"))) ++ const char* fname = calccachepath(repo, repoext); ++ if (!(fp = fopen(fname, "r"))) + return 0; + if (fseek(fp, -sizeof(mycookie), SEEK_END) || fread(mycookie, sizeof(mycookie), 1, fp) != 1) + { +@@ -1068,7 +1069,11 @@ + memcpy(cinfo->extcookie, myextcookie, sizeof(myextcookie)); + } + if (mark) ++#ifdef __UCLIBC__ ++ utimes(fname, 0); /* try to set modification time */ ++#else + futimes(fileno(fp), 0); /* try to set modification time */ ++#endif + fclose(fp); + return 1; + }
meta/recipes-extended/sat-solver/sat-solver_git.bb +5 -2
@@ -8,7 +8,7 @@ DEPENDS = "libcheck rpm zlib expat db" SRCREV = "0a7378d5f482f477a01cf1690d76871ab8bdcc32" PV = "0.0-git${SRCPV}" -PR = "r13" +PR = "r14" PARALLEL_MAKE=""
@@ -20,14 +20,17 @@ SRC_URI = "git://github.com/openSUSE/sat-solver.git;protocol=git \ file://sat-solver_core.patch \ file://fix_gcc-4.6.0_compile_issue.patch \ file://0001-sat_xfopen.c-Forward-port-to-zlib-1.2.6-gzFile.patch \ + file://futimes.patch \ " S = "${WORKDIR}/git" -EXTRA_OECMAKE += "-DRPM5=RPM5 -DOE_CORE=OE_CORE" +EXTRA_OECMAKE += "-DRPM5=RPM5 -DOE_CORE=OE_CORE -DUSE_OWN_QSORT=1" EXTRA_OECMAKE += " -DLIB=${@os.path.basename('${libdir}')}" +TUNE_CCARGS += "-DUSE_OWN_QSORT=1" + inherit cmake pkgconfig RDEPENDS_${PN} = "rpm-libs"
Signature · 1 line
1.7.5.4
PATCH 7/7 libzypp: Fix build with uclibc
In reply to Khem Rajcstdio is included indrectly with eglibc based systems but not with uclibc based systems and use of functions like ::eof are then reported as warnings. Therefore we include cstdio explicitly.
--- meta/recipes-extended/libzypp/libzypp/cstdio.patch | 49 ++++++++++++++++++++ meta/recipes-extended/libzypp/libzypp_git.bb | 10 +++- 2 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-extended/libzypp/libzypp/cstdio.patch
meta/recipes-extended/libzypp/libzypp/cstdio.patch new file +49 -0
@@ -0,0 +1,49 @@ +include cstdio to get definitions of ::xxx functions which +are now reported by gcc-4.7 as wanrings and warnings are treated +as errors + +Signed-off-by: Khem Raj <[email protected]> +Upstream-Status: Pending + +Index: git/zypp/ExternalProgram.cc +=================================================================== +--- git.orig/zypp/ExternalProgram.cc 2012-06-01 16:25:17.098304709 -0700 ++++ git/zypp/ExternalProgram.cc 2012-06-01 16:25:37.254305681 -0700 +@@ -22,6 +22,7 @@ + #include <cstring> // strsignal + #include <iostream> + #include <sstream> ++#include <cstdio> + + #include "zypp/base/Logger.h" + #include "zypp/base/String.h" +Index: git/zypp/PluginScript.cc +=================================================================== +--- git.orig/zypp/PluginScript.cc 2012-06-01 16:21:37.814294089 -0700 ++++ git/zypp/PluginScript.cc 2012-06-01 16:24:41.002302961 -0700 +@@ -14,6 +14,7 @@ + + #include <iostream> + #include <sstream> ++#include <cstdio> + + #include "zypp/base/LogTools.h" + #include "zypp/base/DefaultIntegral.h" +@@ -336,7 +337,7 @@ + if ( fd == -1 ) + ZYPP_THROW( PluginScriptException( "Bad file descriptor" ) ); + +- ::clearerr( filep ); ++ std::clearerr( filep ); + std::string data; + { + PluginDebugBuffer _debug( data ); // dump receive buffer if PLUGIN_DEBUG +@@ -370,7 +371,7 @@ + int retval = select( fd+1, &rfds, NULL, NULL, &tv ); + if ( retval > 0 ) // FD_ISSET( fd, &rfds ) will be true. + { +- ::clearerr( filep ); ++ std::clearerr( filep ); + } + else if ( retval == 0 ) + {
meta/recipes-extended/libzypp/libzypp_git.bb +8 -2
@@ -11,7 +11,7 @@ DEPENDS = "rpm boost curl libxml2 zlib sat-solver expat openssl udev libproxy" S = "${WORKDIR}/git" SRCREV = "15b6c52260bbc52b3d8e585e271b67e10cc7c433" PV = "0.0-git${SRCPV}" -PR = "r20" +PR = "r21" SRC_URI = "git://github.com/openSUSE/libzypp.git;protocol=git \ file://no-doc.patch \
@@ -23,6 +23,7 @@ SRC_URI = "git://github.com/openSUSE/libzypp.git;protocol=git \ file://fix_for_compile_wth_gcc-4.6.0.patch \ file://hardcode-lib-fix.patch \ file://close.patch \ + file://cstdio.patch \ " SRC_URI_append_mips = " file://mips-workaround-gcc-tribool-error.patch"
@@ -31,7 +32,10 @@ SRC_URI_append_mips = " file://mips-workaround-gcc-tribool-error.patch" SRC_URI_append_arm = " file://arm-workaround-global-constructor.patch" # rpmdb2solv from sat-solver is run from libzypp -RDEPENDS_${PN} = "sat-solver rpm-libs gzip gnupg" +RDEPENDS_${PN} = "sat-solver rpm-libs gzip ${RDEPGNUPG}" + +RDEPGNUPG = "gnupg" +RDEPGNUPG_libc-uclibc = "" PACKAGES =+ "${PN}-pkgmgt"
@@ -45,6 +49,8 @@ FILES_${PN}-pkgmgt = "${bindir}/package-manager \ EXTRA_OECMAKE += " -DLIB=${@os.path.basename('${libdir}')}" +LDFLAGS += "-lpthread" + PACKAGE_ARCH = "${MACHINE_ARCH}" AVOID_CONSTRUCTOR = ""
Signature · 1 line
1.7.5.4