* [PATCH 0/9 V3] rpm compilation on uclibc
@ 2012-06-15 6:12 Khem Raj
2012-06-15 6:12 ` [PATCH 1/9] uclibc_0.9.33.bb: Upgrade to latest git Khem Raj
` (9 more replies)
0 siblings, 10 replies; 19+ messages in thread
From: Khem Raj @ 2012-06-15 6:12 UTC (permalink / raw)
To: openembedded-core
This patch now can compile a uclibc sato image using rpm as packaging backend
fixes libzypp, zypper, sat-solver builds on uclibc
Upgrades uclibc-0.9.33 to latest on branch since we need
the fixes for glib-2.32.x to work correctly.
Fix glib-2.32.x build failure on x86_64/uclibc by caching
the relevant config variables (guint32/guint64) same patch was
applied to other architecture site files recently.
The following changes since commit ba380813c0198f95b1e786aa7f49b80c68cfe9b9:
gcc-configure-target: Fix sysroot option breakage I introduced (sorry) (2012-06-14 19:48:07 +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 (9):
uclibc_0.9.33.bb: Upgrade to latest git
site/x86_64-linux-uclibc: Cache definitions of guint32/guint64
rpm: Fix compilation on uclibc
rpm: Use link time check for libssp
sat-solver: Fix build on uclibc
libzypp: Fix build with uclibc
rpm: pass lrt and lpthread to link step explicitly for uclibc
zypper: Fix build on uclibc
libzypp: Define OECMAKE_CXX_LINK_FLAGS when compiling for uclibc
meta/recipes-core/uclibc/uclibc_0.9.33.bb | 4 +-
.../rpm/rpm/fstack-protector-configure-check.patch | 13 ++++
meta/recipes-devtools/rpm/rpm/rpmatch.patch | 42 +++++++++++++
meta/recipes-devtools/rpm/rpm/uclibc-support.patch | 63 ++++++++++++++++++++
meta/recipes-devtools/rpm/rpm_5.4.9.bb | 7 ++-
meta/recipes-extended/libzypp/libzypp/cstdio.patch | 49 +++++++++++++++
meta/recipes-extended/libzypp/libzypp_git.bb | 9 ++-
.../sat-solver/sat-solver/futimes.patch | 32 ++++++++++
meta/recipes-extended/sat-solver/sat-solver_git.bb | 3 +
meta/recipes-extended/zypper/zypper/rpmatch.patch | 23 +++++++
meta/recipes-extended/zypper/zypper_git.bb | 2 +
meta/site/x86_64-linux-uclibc | 3 +
12 files changed, 245 insertions(+), 5 deletions(-)
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
create mode 100644 meta/recipes-extended/zypper/zypper/rpmatch.patch
--
1.7.5.4
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 1/9] uclibc_0.9.33.bb: Upgrade to latest git
2012-06-15 6:12 [PATCH 0/9 V3] rpm compilation on uclibc Khem Raj
@ 2012-06-15 6:12 ` Khem Raj
2012-06-15 6:12 ` [PATCH 2/9] site/x86_64-linux-uclibc: Cache definitions of guint32/guint64 Khem Raj
` (8 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: Khem Raj @ 2012-06-15 6:12 UTC (permalink / raw)
To: openembedded-core
This is needed otherwise glib-2.0 wont run
correctly
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/recipes-core/uclibc/uclibc_0.9.33.bb | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-core/uclibc/uclibc_0.9.33.bb b/meta/recipes-core/uclibc/uclibc_0.9.33.bb
index 43c8f74..b72f9dd 100644
--- a/meta/recipes-core/uclibc/uclibc_0.9.33.bb
+++ b/meta/recipes-core/uclibc/uclibc_0.9.33.bb
@@ -1,8 +1,8 @@
-SRCREV="f7c18471f1ff8f3e54e462df0e96e19739869c78"
+SRCREV="7810e4f8027b5c4c8ceec6fefec4eb779362ebb5"
require uclibc.inc
-PR = "${INC_PR}.1"
+PR = "${INC_PR}.2"
PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
SRC_URI = "git://uclibc.org/uClibc.git;branch=${PV};protocol=git \
--
1.7.5.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 2/9] site/x86_64-linux-uclibc: Cache definitions of guint32/guint64
2012-06-15 6:12 [PATCH 0/9 V3] rpm compilation on uclibc Khem Raj
2012-06-15 6:12 ` [PATCH 1/9] uclibc_0.9.33.bb: Upgrade to latest git Khem Raj
@ 2012-06-15 6:12 ` Khem Raj
2012-06-15 6:12 ` [PATCH 3/9] rpm: Fix compilation on uclibc Khem Raj
` (7 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: Khem Raj @ 2012-06-15 6:12 UTC (permalink / raw)
To: openembedded-core
Without this glib 2.32.x wont build.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/site/x86_64-linux-uclibc | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/meta/site/x86_64-linux-uclibc b/meta/site/x86_64-linux-uclibc
index bad2ed9..2d269f7 100644
--- a/meta/site/x86_64-linux-uclibc
+++ b/meta/site/x86_64-linux-uclibc
@@ -60,6 +60,9 @@ am_cv_func_working_getline=${am_cv_func_working_getline=yes}
# glib-2.0
glib_cv_use_pid_surrogate=${glib_cv_use_pid_surrogate=yes}
+ac_cv_alignof_guint32=4
+ac_cv_alignof_guint64=8
+ac_cv_alignof_unsigned_long=8
# libidl
libIDL_cv_long_long_format=${libIDL_cv_long_long_format=ll}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 3/9] rpm: Fix compilation on uclibc
2012-06-15 6:12 [PATCH 0/9 V3] rpm compilation on uclibc Khem Raj
2012-06-15 6:12 ` [PATCH 1/9] uclibc_0.9.33.bb: Upgrade to latest git Khem Raj
2012-06-15 6:12 ` [PATCH 2/9] site/x86_64-linux-uclibc: Cache definitions of guint32/guint64 Khem Raj
@ 2012-06-15 6:12 ` Khem Raj
2012-06-15 6:12 ` [PATCH 4/9] rpm: Use link time check for libssp Khem Raj
` (6 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: Khem Raj @ 2012-06-15 6:12 UTC (permalink / raw)
To: openembedded-core
rpmatch is not there in uclibc therefore add logic to configure
to detect it.
x* wrappers need to be defined for uclibc as well.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/recipes-devtools/rpm/rpm/rpmatch.patch | 42 +++++++++++++
meta/recipes-devtools/rpm/rpm/uclibc-support.patch | 63 ++++++++++++++++++++
meta/recipes-devtools/rpm/rpm_5.4.9.bb | 4 +-
3 files changed, 108 insertions(+), 1 deletions(-)
create mode 100644 meta/recipes-devtools/rpm/rpm/rpmatch.patch
create mode 100644 meta/recipes-devtools/rpm/rpm/uclibc-support.patch
diff --git a/meta/recipes-devtools/rpm/rpm/rpmatch.patch b/meta/recipes-devtools/rpm/rpm/rpmatch.patch
new file mode 100644
index 0000000..8ea3490
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpmatch.patch
@@ -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 <raj.khem@gmail.com>
+
+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
diff --git a/meta/recipes-devtools/rpm/rpm/uclibc-support.patch b/meta/recipes-devtools/rpm/rpm/uclibc-support.patch
new file mode 100644
index 0000000..64746ce
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/uclibc-support.patch
@@ -0,0 +1,63 @@
+Define the x* wrappers for uclibc as well
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: rpm-5.4.9/rpmio/rpmio.h
+===================================================================
+--- rpm-5.4.9.orig/rpmio/rpmio.h 2010-09-29 07:54:30.000000000 -0700
++++ rpm-5.4.9/rpmio/rpmio.h 2012-06-12 07:29:19.610745014 -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.9/system.h
+===================================================================
+--- rpm-5.4.9.orig/system.h 2012-04-26 10:46:49.000000000 -0700
++++ rpm-5.4.9/system.h 2012-06-12 07:30:08.242747422 -0700
+@@ -410,7 +410,7 @@
+ #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))
+Index: rpm-5.4.9/lib/librpm.vers
+===================================================================
+--- rpm-5.4.9.orig/lib/librpm.vers 2011-04-10 15:55:23.000000000 -0700
++++ rpm-5.4.9/lib/librpm.vers 2012-06-12 07:29:19.610745014 -0700
+@@ -405,6 +405,10 @@
+ specedit;
+ strict_erasures;
+ XrpmtsiInit;
++ xmalloc;
++ xrealloc;
++ xcalloc;
++ xstrdup;
+ local:
+ *;
+ };
+Index: rpm-5.4.9/rpmio/librpmio.vers
+===================================================================
+--- rpm-5.4.9.orig/rpmio/librpmio.vers 2012-05-07 07:38:23.000000000 -0700
++++ rpm-5.4.9/rpmio/librpmio.vers 2012-06-12 07:29:19.626745024 -0700
+@@ -994,6 +994,10 @@
+ mongo_simple_int_command;
+ mongo_simple_str_command;
+ mongo_update;
++ xmalloc;
++ xrealloc;
++ xcalloc;
++ xstrdup;
+ local:
+ *;
+ };
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
index 51cf93b..404916a 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.9.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
@@ -43,7 +43,7 @@ LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
DEPENDS = "libpcre attr acl popt ossp-uuid file"
-PR = "r43"
+PR = "r44"
# 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.9-0.20120508.src.rpm;ex
file://rpm-ossp-uuid.patch \
file://rpm-packageorigin.patch \
file://rpm-pkgconfigdeps.patch \
+ file://uclibc-support.patch \
+ file://rpmatch.patch \
"
SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768"
--
1.7.5.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 4/9] rpm: Use link time check for libssp
2012-06-15 6:12 [PATCH 0/9 V3] rpm compilation on uclibc Khem Raj
` (2 preceding siblings ...)
2012-06-15 6:12 ` [PATCH 3/9] rpm: Fix compilation on uclibc Khem Raj
@ 2012-06-15 6:12 ` Khem Raj
2012-06-15 12:43 ` Richard Purdie
2012-09-24 20:36 ` McClintock Matthew-B29882
2012-06-15 6:12 ` [PATCH 5/9] sat-solver: Fix build on uclibc Khem Raj
` (5 subsequent siblings)
9 siblings, 2 replies; 19+ messages in thread
From: Khem Raj @ 2012-06-15 6:12 UTC (permalink / raw)
To: openembedded-core
-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
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../rpm/rpm/fstack-protector-configure-check.patch | 13 +++++++++++++
meta/recipes-devtools/rpm/rpm_5.4.9.bb | 1 +
2 files changed, 14 insertions(+), 0 deletions(-)
create mode 100644 meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch
diff --git a/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch b/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch
new file mode 100644
index 0000000..84d0430
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch
@@ -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])]
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
index 404916a..ccf015a 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.9.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
@@ -74,6 +74,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex
file://rpm-pkgconfigdeps.patch \
file://uclibc-support.patch \
file://rpmatch.patch \
+ file://fstack-protector-configure-check.patch \
"
SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768"
--
1.7.5.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 5/9] sat-solver: Fix build on uclibc
2012-06-15 6:12 [PATCH 0/9 V3] rpm compilation on uclibc Khem Raj
` (3 preceding siblings ...)
2012-06-15 6:12 ` [PATCH 4/9] rpm: Use link time check for libssp Khem Raj
@ 2012-06-15 6:12 ` Khem Raj
2012-06-15 12:55 ` Richard Purdie
2012-06-15 13:07 ` Bernhard Reutner-Fischer
2012-06-15 6:12 ` [PATCH 6/9] libzypp: Fix build with uclibc Khem Raj
` (4 subsequent siblings)
9 siblings, 2 replies; 19+ messages in thread
From: Khem Raj @ 2012-06-15 6:12 UTC (permalink / raw)
To: openembedded-core
futimes is not available on uclibc so use utimes
qsort is also not as expected by sat-solver therefore
for uclibc we resort to using internal version of
qsort
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../sat-solver/sat-solver/futimes.patch | 32 ++++++++++++++++++++
meta/recipes-extended/sat-solver/sat-solver_git.bb | 3 ++
2 files changed, 35 insertions(+), 0 deletions(-)
create mode 100644 meta/recipes-extended/sat-solver/sat-solver/futimes.patch
diff --git a/meta/recipes-extended/sat-solver/sat-solver/futimes.patch b/meta/recipes-extended/sat-solver/sat-solver/futimes.patch
new file mode 100644
index 0000000..b24d852
--- /dev/null
+++ b/meta/recipes-extended/sat-solver/sat-solver/futimes.patch
@@ -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 <raj.khem@gmail.com>
+
+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;
+ }
diff --git a/meta/recipes-extended/sat-solver/sat-solver_git.bb b/meta/recipes-extended/sat-solver/sat-solver_git.bb
index b0382f6..b0daa6a 100644
--- a/meta/recipes-extended/sat-solver/sat-solver_git.bb
+++ b/meta/recipes-extended/sat-solver/sat-solver_git.bb
@@ -20,6 +20,7 @@ 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"
@@ -28,6 +29,8 @@ EXTRA_OECMAKE += "-DRPM5=RPM5 -DOE_CORE=OE_CORE"
EXTRA_OECMAKE += " -DLIB=${@os.path.basename('${libdir}')}"
+TUNE_CCARGS_libc-uclibc_append = " -DUSE_OWN_QSORT=1 "
+
inherit cmake pkgconfig
RDEPENDS_${PN} = "rpm-libs"
--
1.7.5.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 6/9] libzypp: Fix build with uclibc
2012-06-15 6:12 [PATCH 0/9 V3] rpm compilation on uclibc Khem Raj
` (4 preceding siblings ...)
2012-06-15 6:12 ` [PATCH 5/9] sat-solver: Fix build on uclibc Khem Raj
@ 2012-06-15 6:12 ` Khem Raj
2012-06-15 6:12 ` [PATCH 7/9] rpm: pass lrt and lpthread to link step explicitly for uclibc Khem Raj
` (3 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: Khem Raj @ 2012-06-15 6:12 UTC (permalink / raw)
To: openembedded-core
cstdio 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.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
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
diff --git a/meta/recipes-extended/libzypp/libzypp/cstdio.patch b/meta/recipes-extended/libzypp/libzypp/cstdio.patch
new file mode 100644
index 0000000..a021d58
--- /dev/null
+++ b/meta/recipes-extended/libzypp/libzypp/cstdio.patch
@@ -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 <raj.khem@gmail.com>
+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 )
+ {
diff --git a/meta/recipes-extended/libzypp/libzypp_git.bb b/meta/recipes-extended/libzypp/libzypp_git.bb
index 90ee8c4..ca32e73 100644
--- a/meta/recipes-extended/libzypp/libzypp_git.bb
+++ b/meta/recipes-extended/libzypp/libzypp_git.bb
@@ -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 = "r22"
+PR = "r23"
SRC_URI = "git://github.com/openSUSE/libzypp.git;protocol=git \
file://no-doc.patch \
@@ -24,6 +24,7 @@ SRC_URI = "git://github.com/openSUSE/libzypp.git;protocol=git \
file://hardcode-lib-fix.patch \
file://close.patch \
file://libzypp-rpm549.patch \
+ file://cstdio.patch \
"
SRC_URI_append_mips = " file://mips-workaround-gcc-tribool-error.patch"
@@ -32,7 +33,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"
@@ -46,6 +50,8 @@ FILES_${PN}-pkgmgt = "${bindir}/package-manager \
EXTRA_OECMAKE += " -DLIB=${@os.path.basename('${libdir}')}"
+LDFLAGS += "-lpthread"
+
PACKAGE_ARCH = "${MACHINE_ARCH}"
AVOID_CONSTRUCTOR = ""
--
1.7.5.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 7/9] rpm: pass lrt and lpthread to link step explicitly for uclibc
2012-06-15 6:12 [PATCH 0/9 V3] rpm compilation on uclibc Khem Raj
` (5 preceding siblings ...)
2012-06-15 6:12 ` [PATCH 6/9] libzypp: Fix build with uclibc Khem Raj
@ 2012-06-15 6:12 ` Khem Raj
2012-06-15 6:12 ` [PATCH 8/9] zypper: Fix build on uclibc Khem Raj
` (2 subsequent siblings)
9 siblings, 0 replies; 19+ messages in thread
From: Khem Raj @ 2012-06-15 6:12 UTC (permalink / raw)
To: openembedded-core
These need to appear in DT_NEEDED for librpmio.so
for uclibc somehow it does not get added to link
cmdline so we do it explicitly.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/recipes-devtools/rpm/rpm_5.4.9.bb | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
index ccf015a..8e892a8 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.9.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
@@ -182,6 +182,8 @@ EXTRA_OECONF += "--verbose \
CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE"
+LDFLAGS_append_libc-uclibc = "-lrt -lpthread"
+
PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm-dbg python-rpm-staticdev python-rpm perl-module-rpm perl-module-rpm-dev ${PN}-locale"
SOLIBS = "5.4.so"
--
1.7.5.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 8/9] zypper: Fix build on uclibc
2012-06-15 6:12 [PATCH 0/9 V3] rpm compilation on uclibc Khem Raj
` (6 preceding siblings ...)
2012-06-15 6:12 ` [PATCH 7/9] rpm: pass lrt and lpthread to link step explicitly for uclibc Khem Raj
@ 2012-06-15 6:12 ` Khem Raj
2012-06-15 6:12 ` [PATCH 9/9] libzypp: Define OECMAKE_CXX_LINK_FLAGS when compiling for uclibc Khem Raj
2012-06-18 16:48 ` [PATCH 0/9 V3] rpm compilation on uclibc Saul Wold
9 siblings, 0 replies; 19+ messages in thread
From: Khem Raj @ 2012-06-15 6:12 UTC (permalink / raw)
To: openembedded-core
uclibc does not have rpmatch() so we define
it if zypper is being compiled for uclibc
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/recipes-extended/zypper/zypper/rpmatch.patch | 23 +++++++++++++++++++++
meta/recipes-extended/zypper/zypper_git.bb | 2 +
2 files changed, 25 insertions(+), 0 deletions(-)
create mode 100644 meta/recipes-extended/zypper/zypper/rpmatch.patch
diff --git a/meta/recipes-extended/zypper/zypper/rpmatch.patch b/meta/recipes-extended/zypper/zypper/rpmatch.patch
new file mode 100644
index 0000000..a750a3b
--- /dev/null
+++ b/meta/recipes-extended/zypper/zypper/rpmatch.patch
@@ -0,0 +1,23 @@
+rpmatch() is missing in uclibc so we provide a local definition
+in form of a macro
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: git/src/utils/prompt.h
+===================================================================
+--- git.orig/src/utils/prompt.h 2012-06-06 15:51:00.899112775 -0700
++++ git/src/utils/prompt.h 2012-06-06 15:52:17.003116762 -0700
+@@ -172,4 +172,12 @@
+ return errstr;
+ }
+
++#ifdef __UCLIBC__
++#define rpmatch(line) \
++ ( (line == NULL)? -1 : \
++ (*line == 'y' || *line == 'Y')? 1 : \
++ (*line == 'n' || *line == 'N')? 0 : \
++ -1 )
++#endif /* __UCLIBC__ */
++
+ #endif /*ZYPPERPROMPT_H_*/
diff --git a/meta/recipes-extended/zypper/zypper_git.bb b/meta/recipes-extended/zypper/zypper_git.bb
index 0a1df5d..c5d7c61 100644
--- a/meta/recipes-extended/zypper/zypper_git.bb
+++ b/meta/recipes-extended/zypper/zypper_git.bb
@@ -16,6 +16,7 @@ SRC_URI = "git://github.com/openSUSE/zypper.git;protocol=git \
file://dso_linking_change_build_fix.patch \
file://rpm5-flag.patch \
file://gcc-scope.patch \
+ file://rpmatch.patch \
"
S = "${WORKDIR}/git"
@@ -25,3 +26,4 @@ RDEPENDS_${PN} = "rpm-libs"
RRECOMMENDS_${PN} = "procps util-linux-uuidgen"
PACKAGE_ARCH = "${MACHINE_ARCH}"
+OECMAKE_CXX_LINK_FLAGS_libc-uclibc += "-lintl"
--
1.7.5.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 9/9] libzypp: Define OECMAKE_CXX_LINK_FLAGS when compiling for uclibc
2012-06-15 6:12 [PATCH 0/9 V3] rpm compilation on uclibc Khem Raj
` (7 preceding siblings ...)
2012-06-15 6:12 ` [PATCH 8/9] zypper: Fix build on uclibc Khem Raj
@ 2012-06-15 6:12 ` Khem Raj
2012-06-18 16:48 ` [PATCH 0/9 V3] rpm compilation on uclibc Saul Wold
9 siblings, 0 replies; 19+ messages in thread
From: Khem Raj @ 2012-06-15 6:12 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/recipes-extended/libzypp/libzypp_git.bb | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-extended/libzypp/libzypp_git.bb b/meta/recipes-extended/libzypp/libzypp_git.bb
index ca32e73..471ee1d 100644
--- a/meta/recipes-extended/libzypp/libzypp_git.bb
+++ b/meta/recipes-extended/libzypp/libzypp_git.bb
@@ -49,8 +49,7 @@ FILES_${PN}-pkgmgt = "${bindir}/package-manager \
"
EXTRA_OECMAKE += " -DLIB=${@os.path.basename('${libdir}')}"
-
-LDFLAGS += "-lpthread"
+OECMAKE_CXX_LINK_FLAGS_libc-uclibc += "-pthread"
PACKAGE_ARCH = "${MACHINE_ARCH}"
--
1.7.5.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH 4/9] rpm: Use link time check for libssp
2012-06-15 6:12 ` [PATCH 4/9] rpm: Use link time check for libssp Khem Raj
@ 2012-06-15 12:43 ` Richard Purdie
2012-06-15 14:34 ` Khem Raj
2012-09-24 20:36 ` McClintock Matthew-B29882
1 sibling, 1 reply; 19+ messages in thread
From: Richard Purdie @ 2012-06-15 12:43 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Thu, 2012-06-14 at 23:12 -0700, Khem Raj wrote:
> -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
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> .../rpm/rpm/fstack-protector-configure-check.patch | 13 +++++++++++++
> meta/recipes-devtools/rpm/rpm_5.4.9.bb | 1 +
> 2 files changed, 14 insertions(+), 0 deletions(-)
> create mode 100644 meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch
>
> diff --git a/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch b/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch
> new file mode 100644
> index 0000000..84d0430
> --- /dev/null
> +++ b/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch
This is a rather subtle patch with no header information (author,
explaination, upstream status).
Cheers,
Richard
> @@ -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])]
> diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
> index 404916a..ccf015a 100644
> --- a/meta/recipes-devtools/rpm/rpm_5.4.9.bb
> +++ b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
> @@ -74,6 +74,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex
> file://rpm-pkgconfigdeps.patch \
> file://uclibc-support.patch \
> file://rpmatch.patch \
> + file://fstack-protector-configure-check.patch \
> "
>
> SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768"
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 5/9] sat-solver: Fix build on uclibc
2012-06-15 6:12 ` [PATCH 5/9] sat-solver: Fix build on uclibc Khem Raj
@ 2012-06-15 12:55 ` Richard Purdie
2012-06-15 14:35 ` Khem Raj
2012-06-15 13:07 ` Bernhard Reutner-Fischer
1 sibling, 1 reply; 19+ messages in thread
From: Richard Purdie @ 2012-06-15 12:55 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Thu, 2012-06-14 at 23:12 -0700, Khem Raj wrote:
> futimes is not available on uclibc so use utimes
> qsort is also not as expected by sat-solver therefore
> for uclibc we resort to using internal version of
> qsort
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> .../sat-solver/sat-solver/futimes.patch | 32 ++++++++++++++++++++
> meta/recipes-extended/sat-solver/sat-solver_git.bb | 3 ++
> 2 files changed, 35 insertions(+), 0 deletions(-)
> create mode 100644 meta/recipes-extended/sat-solver/sat-solver/futimes.patch
>
> diff --git a/meta/recipes-extended/sat-solver/sat-solver/futimes.patch b/meta/recipes-extended/sat-solver/sat-solver/futimes.patch
> new file mode 100644
> index 0000000..b24d852
> --- /dev/null
> +++ b/meta/recipes-extended/sat-solver/sat-solver/futimes.patch
> @@ -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 <raj.khem@gmail.com>
> +
> +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;
> + }
> diff --git a/meta/recipes-extended/sat-solver/sat-solver_git.bb b/meta/recipes-extended/sat-solver/sat-solver_git.bb
> index b0382f6..b0daa6a 100644
> --- a/meta/recipes-extended/sat-solver/sat-solver_git.bb
> +++ b/meta/recipes-extended/sat-solver/sat-solver_git.bb
> @@ -20,6 +20,7 @@ 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"
> @@ -28,6 +29,8 @@ EXTRA_OECMAKE += "-DRPM5=RPM5 -DOE_CORE=OE_CORE"
>
> EXTRA_OECMAKE += " -DLIB=${@os.path.basename('${libdir}')}"
>
> +TUNE_CCARGS_libc-uclibc_append = " -DUSE_OWN_QSORT=1 "
> +
I suspect you mean TUNE_CCARGS_append_libc-uclibc here?
Cheers,
Richard
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 5/9] sat-solver: Fix build on uclibc
2012-06-15 6:12 ` [PATCH 5/9] sat-solver: Fix build on uclibc Khem Raj
2012-06-15 12:55 ` Richard Purdie
@ 2012-06-15 13:07 ` Bernhard Reutner-Fischer
1 sibling, 0 replies; 19+ messages in thread
From: Bernhard Reutner-Fischer @ 2012-06-15 13:07 UTC (permalink / raw)
To: oe-core
On 15 June 2012 08:12, Khem Raj <raj.khem@gmail.com> wrote:
> futimes is not available on uclibc so use utimes
futimes is non-standard, use futimens instead (or utimes as in this case).
> qsort is also not as expected by sat-solver therefore
> for uclibc we resort to using internal version of
> qsort
What does that mean, please elaborate? uClibc does have qsort{,_r}..
thanks,
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 4/9] rpm: Use link time check for libssp
2012-06-15 12:43 ` Richard Purdie
@ 2012-06-15 14:34 ` Khem Raj
0 siblings, 0 replies; 19+ messages in thread
From: Khem Raj @ 2012-06-15 14:34 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Fri, Jun 15, 2012 at 5:43 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Thu, 2012-06-14 at 23:12 -0700, Khem Raj wrote:
>> -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
>>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> ---
>> .../rpm/rpm/fstack-protector-configure-check.patch | 13 +++++++++++++
>> meta/recipes-devtools/rpm/rpm_5.4.9.bb | 1 +
>> 2 files changed, 14 insertions(+), 0 deletions(-)
>> create mode 100644 meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch
>>
>> diff --git a/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch b/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch
>> new file mode 100644
>> index 0000000..84d0430
>> --- /dev/null
>> +++ b/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch
>
>
> This is a rather subtle patch with no header information (author,
> explaination, upstream status).
oversight on my part. I have added a patch header to it and updated
the pull request.
>
> Cheers,
>
> Richard
>
>> @@ -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])]
>> diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
>> index 404916a..ccf015a 100644
>> --- a/meta/recipes-devtools/rpm/rpm_5.4.9.bb
>> +++ b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
>> @@ -74,6 +74,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex
>> file://rpm-pkgconfigdeps.patch \
>> file://uclibc-support.patch \
>> file://rpmatch.patch \
>> + file://fstack-protector-configure-check.patch \
>> "
>>
>> SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768"
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 5/9] sat-solver: Fix build on uclibc
2012-06-15 12:55 ` Richard Purdie
@ 2012-06-15 14:35 ` Khem Raj
0 siblings, 0 replies; 19+ messages in thread
From: Khem Raj @ 2012-06-15 14:35 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Fri, Jun 15, 2012 at 5:55 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Thu, 2012-06-14 at 23:12 -0700, Khem Raj wrote:
>> futimes is not available on uclibc so use utimes
>> qsort is also not as expected by sat-solver therefore
>> for uclibc we resort to using internal version of
>> qsort
>>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> ---
>> .../sat-solver/sat-solver/futimes.patch | 32 ++++++++++++++++++++
>> meta/recipes-extended/sat-solver/sat-solver_git.bb | 3 ++
>> 2 files changed, 35 insertions(+), 0 deletions(-)
>> create mode 100644 meta/recipes-extended/sat-solver/sat-solver/futimes.patch
>>
>> diff --git a/meta/recipes-extended/sat-solver/sat-solver/futimes.patch b/meta/recipes-extended/sat-solver/sat-solver/futimes.patch
>> new file mode 100644
>> index 0000000..b24d852
>> --- /dev/null
>> +++ b/meta/recipes-extended/sat-solver/sat-solver/futimes.patch
>> @@ -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 <raj.khem@gmail.com>
>> +
>> +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;
>> + }
>> diff --git a/meta/recipes-extended/sat-solver/sat-solver_git.bb b/meta/recipes-extended/sat-solver/sat-solver_git.bb
>> index b0382f6..b0daa6a 100644
>> --- a/meta/recipes-extended/sat-solver/sat-solver_git.bb
>> +++ b/meta/recipes-extended/sat-solver/sat-solver_git.bb
>> @@ -20,6 +20,7 @@ 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"
>> @@ -28,6 +29,8 @@ EXTRA_OECMAKE += "-DRPM5=RPM5 -DOE_CORE=OE_CORE"
>>
>> EXTRA_OECMAKE += " -DLIB=${@os.path.basename('${libdir}')}"
>>
>> +TUNE_CCARGS_libc-uclibc_append = " -DUSE_OWN_QSORT=1 "
>> +
>
> I suspect you mean TUNE_CCARGS_append_libc-uclibc here?
indeed good catch. This was incorrect and it worked because it overwrote
TUNE_CCARGS and I did not see it because the options I wanted
was still present and it was building.
I have updated the pull tree with this changed.
>
> Cheers,
>
> Richard
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 0/9 V3] rpm compilation on uclibc
2012-06-15 6:12 [PATCH 0/9 V3] rpm compilation on uclibc Khem Raj
` (8 preceding siblings ...)
2012-06-15 6:12 ` [PATCH 9/9] libzypp: Define OECMAKE_CXX_LINK_FLAGS when compiling for uclibc Khem Raj
@ 2012-06-18 16:48 ` Saul Wold
9 siblings, 0 replies; 19+ messages in thread
From: Saul Wold @ 2012-06-18 16:48 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On 06/14/2012 11:12 PM, Khem Raj wrote:
>
> This patch now can compile a uclibc sato image using rpm as packaging backend
> fixes libzypp, zypper, sat-solver builds on uclibc
> Upgrades uclibc-0.9.33 to latest on branch since we need
> the fixes for glib-2.32.x to work correctly.
> Fix glib-2.32.x build failure on x86_64/uclibc by caching
> the relevant config variables (guint32/guint64) same patch was
> applied to other architecture site files recently.
>
> The following changes since commit ba380813c0198f95b1e786aa7f49b80c68cfe9b9:
>
> gcc-configure-target: Fix sysroot option breakage I introduced (sorry) (2012-06-14 19:48:07 +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 (9):
> uclibc_0.9.33.bb: Upgrade to latest git
> site/x86_64-linux-uclibc: Cache definitions of guint32/guint64
> rpm: Fix compilation on uclibc
> rpm: Use link time check for libssp
> sat-solver: Fix build on uclibc
> libzypp: Fix build with uclibc
> rpm: pass lrt and lpthread to link step explicitly for uclibc
> zypper: Fix build on uclibc
> libzypp: Define OECMAKE_CXX_LINK_FLAGS when compiling for uclibc
>
> meta/recipes-core/uclibc/uclibc_0.9.33.bb | 4 +-
> .../rpm/rpm/fstack-protector-configure-check.patch | 13 ++++
> meta/recipes-devtools/rpm/rpm/rpmatch.patch | 42 +++++++++++++
> meta/recipes-devtools/rpm/rpm/uclibc-support.patch | 63 ++++++++++++++++++++
> meta/recipes-devtools/rpm/rpm_5.4.9.bb | 7 ++-
> meta/recipes-extended/libzypp/libzypp/cstdio.patch | 49 +++++++++++++++
> meta/recipes-extended/libzypp/libzypp_git.bb | 9 ++-
> .../sat-solver/sat-solver/futimes.patch | 32 ++++++++++
> meta/recipes-extended/sat-solver/sat-solver_git.bb | 3 +
> meta/recipes-extended/zypper/zypper/rpmatch.patch | 23 +++++++
> meta/recipes-extended/zypper/zypper_git.bb | 2 +
> meta/site/x86_64-linux-uclibc | 3 +
> 12 files changed, 245 insertions(+), 5 deletions(-)
> 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
> create mode 100644 meta/recipes-extended/zypper/zypper/rpmatch.patch
>
Merged Updated set into OE-Core
Thanks
Sau!
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 4/9] rpm: Use link time check for libssp
2012-06-15 6:12 ` [PATCH 4/9] rpm: Use link time check for libssp Khem Raj
2012-06-15 12:43 ` Richard Purdie
@ 2012-09-24 20:36 ` McClintock Matthew-B29882
2012-09-24 21:18 ` Khem Raj
1 sibling, 1 reply; 19+ messages in thread
From: McClintock Matthew-B29882 @ 2012-09-24 20:36 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Fri, Jun 15, 2012 at 1:12 AM, Khem Raj <raj.khem@gmail.com> wrote:
> -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
Won't this still break on systems without libssp where sstate-cache
was built on systems with libssp?
-M
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> .../rpm/rpm/fstack-protector-configure-check.patch | 13 +++++++++++++
> meta/recipes-devtools/rpm/rpm_5.4.9.bb | 1 +
> 2 files changed, 14 insertions(+), 0 deletions(-)
> create mode 100644 meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch
>
> diff --git a/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch b/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch
> new file mode 100644
> index 0000000..84d0430
> --- /dev/null
> +++ b/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch
> @@ -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])]
> diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
> index 404916a..ccf015a 100644
> --- a/meta/recipes-devtools/rpm/rpm_5.4.9.bb
> +++ b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
> @@ -74,6 +74,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex
> file://rpm-pkgconfigdeps.patch \
> file://uclibc-support.patch \
> file://rpmatch.patch \
> + file://fstack-protector-configure-check.patch \
> "
>
> SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768"
> --
> 1.7.5.4
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 4/9] rpm: Use link time check for libssp
2012-09-24 20:36 ` McClintock Matthew-B29882
@ 2012-09-24 21:18 ` Khem Raj
2012-09-24 22:30 ` McClintock Matthew-B29882
0 siblings, 1 reply; 19+ messages in thread
From: Khem Raj @ 2012-09-24 21:18 UTC (permalink / raw)
To: McClintock Matthew-B29882; +Cc: Patches and discussions about the oe-core layer
On Mon, Sep 24, 2012 at 1:36 PM, McClintock Matthew-B29882
<B29882@freescale.com> wrote:
>
> Won't this still break on systems without libssp where sstate-cache
> was built on systems with libssp?
these two systems are not same IMO so native sstate should not be
shared here it will break more than rpm.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 4/9] rpm: Use link time check for libssp
2012-09-24 21:18 ` Khem Raj
@ 2012-09-24 22:30 ` McClintock Matthew-B29882
0 siblings, 0 replies; 19+ messages in thread
From: McClintock Matthew-B29882 @ 2012-09-24 22:30 UTC (permalink / raw)
To: Khem Raj; +Cc: McClintock Matthew-B29882, Patches, about the oe-core layer
On Mon, Sep 24, 2012 at 4:18 PM, Khem Raj <raj.khem@gmail.com> wrote:
> On Mon, Sep 24, 2012 at 1:36 PM, McClintock Matthew-B29882
> <B29882@freescale.com> wrote:
>>
>> Won't this still break on systems without libssp where sstate-cache
>> was built on systems with libssp?
>
> these two systems are not same IMO so native sstate should not be
> shared here it will break more than rpm.
If you build a binary and it depends on libssp it's its going to break
if that changes between builds. Can we just always disable libssp?
-M
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2012-09-24 22:43 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-15 6:12 [PATCH 0/9 V3] rpm compilation on uclibc Khem Raj
2012-06-15 6:12 ` [PATCH 1/9] uclibc_0.9.33.bb: Upgrade to latest git Khem Raj
2012-06-15 6:12 ` [PATCH 2/9] site/x86_64-linux-uclibc: Cache definitions of guint32/guint64 Khem Raj
2012-06-15 6:12 ` [PATCH 3/9] rpm: Fix compilation on uclibc Khem Raj
2012-06-15 6:12 ` [PATCH 4/9] rpm: Use link time check for libssp Khem Raj
2012-06-15 12:43 ` Richard Purdie
2012-06-15 14:34 ` Khem Raj
2012-09-24 20:36 ` McClintock Matthew-B29882
2012-09-24 21:18 ` Khem Raj
2012-09-24 22:30 ` McClintock Matthew-B29882
2012-06-15 6:12 ` [PATCH 5/9] sat-solver: Fix build on uclibc Khem Raj
2012-06-15 12:55 ` Richard Purdie
2012-06-15 14:35 ` Khem Raj
2012-06-15 13:07 ` Bernhard Reutner-Fischer
2012-06-15 6:12 ` [PATCH 6/9] libzypp: Fix build with uclibc Khem Raj
2012-06-15 6:12 ` [PATCH 7/9] rpm: pass lrt and lpthread to link step explicitly for uclibc Khem Raj
2012-06-15 6:12 ` [PATCH 8/9] zypper: Fix build on uclibc Khem Raj
2012-06-15 6:12 ` [PATCH 9/9] libzypp: Define OECMAKE_CXX_LINK_FLAGS when compiling for uclibc Khem Raj
2012-06-18 16:48 ` [PATCH 0/9 V3] rpm compilation on uclibc Saul Wold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox