Patchwork glib-2.0: fix qsort_t testing for uclibc

login
register
mail settings
Submitter Henning Heinold
Date Nov. 18, 2011, 11:59 a.m.
Message ID <1321617588-18376-1-git-send-email-heinold@inf.fu-berlin.de>
Download mbox | patch
Permalink /patch/15135/
State Accepted
Commit 812342e44e9e361a0fa93cfcfe65cf4dd6f2fb57
Headers show

Comments

Henning Heinold - Nov. 18, 2011, 11:59 a.m.
* instead of disabling the configure test and set it always true
  use the site files to set it true for glibc/eglibc and false
  for uclibc
* remove the patch
' tested only for uclibc
* bump PR

Signed-off-by: Henning Heinold <heinold@inf.fu-berlin.de>
---
 .../glib-2.0/remove.test.for.qsort_r.patch         |   53 --------------------
 meta/recipes-core/glib-2.0/glib-2.0_2.30.0.bb      |    6 +--
 meta/site/common-glibc                             |    1 +
 meta/site/common-uclibc                            |    1 +
 4 files changed, 3 insertions(+), 58 deletions(-)
 delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0/remove.test.for.qsort_r.patch
Richard Purdie - Nov. 18, 2011, 2:28 p.m.
On Fri, 2011-11-18 at 12:59 +0100, Henning Heinold wrote:
> * instead of disabling the configure test and set it always true
>   use the site files to set it true for glibc/eglibc and false
>   for uclibc
> * remove the patch
> ' tested only for uclibc
> * bump PR
> 
> Signed-off-by: Henning Heinold <heinold@inf.fu-berlin.de>
> ---
>  .../glib-2.0/remove.test.for.qsort_r.patch         |   53 --------------------
>  meta/recipes-core/glib-2.0/glib-2.0_2.30.0.bb      |    6 +--
>  meta/site/common-glibc                             |    1 +
>  meta/site/common-uclibc                            |    1 +
>  4 files changed, 3 insertions(+), 58 deletions(-)
>  delete mode 100644 meta/recipes-core/glib-2.0/glib-2.0/remove.test.for.qsort_r.patch

Merged to master, thanks. I'd been meaning to remove this patch!

Colin: Its one issue fixed at least :)

Cheers,

Richard

Patch

diff --git a/meta/recipes-core/glib-2.0/glib-2.0/remove.test.for.qsort_r.patch b/meta/recipes-core/glib-2.0/glib-2.0/remove.test.for.qsort_r.patch
deleted file mode 100644
index 5c0a07a..0000000
--- a/meta/recipes-core/glib-2.0/glib-2.0/remove.test.for.qsort_r.patch
+++ /dev/null
@@ -1,53 +0,0 @@ 
-while cross compiling we cannot execute run tests
-
-Upstream-Status: Inappropriate [configuration]
-
---- glib-2.30.0.orig/configure.ac	2011-09-29 16:57:35.000000000 +0200
-+++ glib-2.30.0/configure.ac	2011-09-29 17:00:19.931493488 +0200
-@@ -586,45 +586,7 @@
- dnl until we have checked this function is actually usable
- AC_CHECK_FUNC([qsort_r])
- 
--# BSD has a qsort_r with wrong argument order
--if test x$ac_cv_func_qsort_r = xyes ; then
--  AC_CACHE_CHECK([if qsort_r uses glibc compatible argument order], glib_cv_have_qsort_r, [
--  AC_RUN_IFELSE([AC_LANG_SOURCE([[
--  #define _GNU_SOURCE
--  #include <stdlib.h>
--
--  static int
--  cmp (const void *a, const void *b, void *c)
--  {
--    const int *ia = a;
--    const int *ib = b;
--
--    if (*ia < *ib)
--      return -1;
--    else if (*ia > *ib)
--      return 1;
--    else
--      return 0;
--  }
--
--  int
--  main (int argc, char **argv)
--  {
--    int arr[3] = { 1, 2, 0 };
--    int d = 3;
--
--    qsort_r (arr, 3, sizeof (int), cmp, &d);
--
--    if (arr[0] == 0 && arr[1] == 1 && arr[2] == 2)
--      return 0;
--    else
--      return 1;
--  }]])],[glib_cv_have_qsort_r=yes],[glib_cv_have_qsort_r=no])])
--fi
--
--if test x$glib_cv_have_qsort_r = xyes ; then
--  AC_DEFINE(HAVE_QSORT_R, 1, [Define to 1 if you have the 'qsort_r' function])
--fi
-+AC_DEFINE(HAVE_QSORT_R, 1, [Define to 1 if you have the 'qsort_r' function])
- 
- AC_CHECK_SIZEOF(char)
- AC_CHECK_SIZEOF(short)
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.30.0.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.30.0.bb
index 634a4e4..50e174e 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.30.0.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.30.0.bb
@@ -1,6 +1,6 @@ 
 require glib.inc
 
-PR = "r3"
+PR = "r4"
 PE = "1"
 
 DEPENDS += "libffi python-argparse-native"
@@ -9,14 +9,10 @@  DEPENDS_virtclass-nativesdk += "libffi-nativesdk python-argparse-native zlib-nat
 
 SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}"
 
-QSORT_PATCH = "file://remove.test.for.qsort_r.patch"
-QSORT_PATCH_virtclass-native = ""
-
 SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.bz2 \
            file://configure-libtool.patch \
            file://60_wait-longer-for-threads-to-die.patch \
            file://g_once_init_enter.patch \
-           ${QSORT_PATCH} \
           "
 SRC_URI[md5sum] = "fee101d9d7daa8ddfbae00325f307f3b"
 SRC_URI[sha256sum] = "ca9c731017ab370859e847f8b70079bc6dcf389dc0ccb0d0419925aff81b9687"
diff --git a/meta/site/common-glibc b/meta/site/common-glibc
index 364ab67..dc69703 100644
--- a/meta/site/common-glibc
+++ b/meta/site/common-glibc
@@ -39,6 +39,7 @@  glib_cv_long_long_format=${glib_cv_long_long_format=ll}
 # that to avoid a dependency loop.
 glib_cv___va_copy=${glib_cv___va_copy=yes}
 glib_cv_va_copy=${glib_cv_va_copy=yes}
+glib_cv_have_qsort_r=${glib_cv_have_qsort_r=yes}
 
 #dbus-glib
 ac_cv_have_abstract_sockets=${ac_cv_have_abstract_sockets=yes}
diff --git a/meta/site/common-uclibc b/meta/site/common-uclibc
index a264765..331c2a2 100644
--- a/meta/site/common-uclibc
+++ b/meta/site/common-uclibc
@@ -20,6 +20,7 @@  ac_cv_func_snprintf_c99=${ac_cv_func_snprintf_c99=yes}
 ac_cv_func_vsnprintf_c99=${ac_cv_func_vsnprintf_c99=yes}
 glib_cv_compliant_posix_memalign=${glib_cv_compliant_posix_memalign=1}
 glib_cv_long_long_format=${glib_cv_long_long_format=ll}
+glib_cv_have_qsort_r=${glib_cv_have_qsort_r=no}
 
 #dbus-glib
 ac_cv_have_abstract_sockets=${ac_cv_have_abstract_sockets=yes}