diff options
author | tsutsui <tsutsui@pkgsrc.org> | 2013-06-23 04:26:49 +0000 |
---|---|---|
committer | tsutsui <tsutsui@pkgsrc.org> | 2013-06-23 04:26:49 +0000 |
commit | 8f67b9acd48f949f0593968e57bec3901da56bda (patch) | |
tree | 487d599ea4cd0c547565a61b69cb6157fae0a04e /devel/glib2/patches | |
parent | 1797c4e90f91ff229b891579316155ac1617eafb (diff) | |
download | pkgsrc-8f67b9acd48f949f0593968e57bec3901da56bda.tar.gz |
Fix build failure on NetBSD/arm 6.1. PR/47941
- fix configure scripts to detect !G_ATOMIC_LOCK_FREE correctly
(use AC_TRY_LINK rather than AC_TRY_COMPILE to see if symbols are defined)
- fix prototype mismatches in !G_ATOMIC_LOCK_FREE case
(note no binary changes in G_ATOMIC_LOCK_FREE case)
"please commit it" from agc@.
Diffstat (limited to 'devel/glib2/patches')
-rw-r--r-- | devel/glib2/patches/patch-aa | 53 | ||||
-rw-r--r-- | devel/glib2/patches/patch-ak | 31 | ||||
-rw-r--r-- | devel/glib2/patches/patch-ce | 25 |
3 files changed, 92 insertions, 17 deletions
diff --git a/devel/glib2/patches/patch-aa b/devel/glib2/patches/patch-aa index 06d374d7d24..8455754151f 100644 --- a/devel/glib2/patches/patch-aa +++ b/devel/glib2/patches/patch-aa @@ -1,8 +1,8 @@ -$NetBSD: patch-aa,v 1.54 2012/10/06 20:44:05 prlw1 Exp $ +$NetBSD: patch-aa,v 1.55 2013/06/23 04:26:49 tsutsui Exp $ ---- configure.orig 2012-09-24 01:26:24.000000000 +0000 +--- configure.orig 2013-06-09 22:53:42.000000000 +0000 +++ configure -@@ -721,6 +721,7 @@ GIO +@@ -724,6 +724,7 @@ GIO GSPAWN GLIB_DEBUG_FLAGS G_MODULE_NEED_USCORE @@ -10,7 +10,7 @@ $NetBSD: patch-aa,v 1.54 2012/10/06 20:44:05 prlw1 Exp $ G_MODULE_BROKEN_RTLD_GLOBAL G_MODULE_HAVE_DLERROR G_MODULE_LDFLAGS -@@ -21565,6 +21566,8 @@ else +@@ -21108,6 +21109,8 @@ else # ifdef _MSC_VER # include <malloc.h> # define alloca _alloca @@ -19,7 +19,7 @@ $NetBSD: patch-aa,v 1.54 2012/10/06 20:44:05 prlw1 Exp $ # else # ifdef HAVE_ALLOCA_H # include <alloca.h> -@@ -22610,8 +22613,8 @@ else +@@ -22153,8 +22156,8 @@ else fi @@ -30,7 +30,7 @@ $NetBSD: patch-aa,v 1.54 2012/10/06 20:44:05 prlw1 Exp $ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined(__SUNPRO_C) || (__SUNPRO_C >= 0x550) -@@ -24210,16 +24213,48 @@ fi +@@ -23807,16 +23810,48 @@ fi case $host in *-*-solaris* ) @@ -80,7 +80,7 @@ $NetBSD: patch-aa,v 1.54 2012/10/06 20:44:05 prlw1 Exp $ esac if test "$ac_cv_func_statfs" = yes; then : -@@ -25231,10 +25266,11 @@ if test x"$glib_native_win32" = xyes; th +@@ -24829,10 +24864,11 @@ if test x"$glib_native_win32" = xyes; th G_MODULE_LDFLAGS= else export SED @@ -93,7 +93,7 @@ $NetBSD: patch-aa,v 1.54 2012/10/06 20:44:05 prlw1 Exp $ G_MODULE_HAVE_DLERROR=0 if test -z "$G_MODULE_IMPL"; then case "$host" in -@@ -25452,13 +25488,13 @@ if test "$G_MODULE_IMPL" = "G_MODULE_IM +@@ -25050,13 +25086,13 @@ if test "$G_MODULE_IMPL" = "G_MODULE_IM LIBS="$G_MODULE_LIBS $LIBS" LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS" echo "void glib_plugin_test(void) { }" > plugin.c @@ -110,7 +110,7 @@ $NetBSD: patch-aa,v 1.54 2012/10/06 20:44:05 prlw1 Exp $ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RTLD_GLOBAL brokenness" >&5 $as_echo_n "checking for RTLD_GLOBAL brokenness... " >&6; } if ${glib_cv_rtldglobal_broken+:} false; then : -@@ -25568,6 +25604,56 @@ fi +@@ -25166,6 +25202,56 @@ fi LIBS="$LIBS_orig" fi @@ -167,7 +167,7 @@ $NetBSD: patch-aa,v 1.54 2012/10/06 20:44:05 prlw1 Exp $ if test -z "$G_MODULE_IMPL"; then G_MODULE_IMPL=0 G_MODULE_SUPPORTED=false -@@ -25578,7 +25664,7 @@ fi +@@ -25176,7 +25262,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the suffix of module shared libraries" >&5 $as_echo_n "checking for the suffix of module shared libraries... " >&6; } export SED @@ -176,7 +176,7 @@ $NetBSD: patch-aa,v 1.54 2012/10/06 20:44:05 prlw1 Exp $ eval $shrext_cmds module=yes eval std_shrext=$shrext_cmds # chop the initial dot -@@ -25602,6 +25688,7 @@ fi +@@ -25200,6 +25286,7 @@ fi @@ -184,7 +184,7 @@ $NetBSD: patch-aa,v 1.54 2012/10/06 20:44:05 prlw1 Exp $ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gspawn implementation" >&5 $as_echo_n "checking for gspawn implementation... " >&6; } case "$host" in -@@ -26543,62 +26630,8 @@ if test x"$have_threads" = xposix; then +@@ -26177,62 +26264,8 @@ if test x"$have_threads" = xposix; then G_THREAD_LIBS="-lpthread -lthread" ;; *) @@ -249,7 +249,7 @@ $NetBSD: patch-aa,v 1.54 2012/10/06 20:44:05 prlw1 Exp $ ;; esac -@@ -27112,6 +27145,7 @@ case $host in +@@ -26746,6 +26779,7 @@ case $host in ;; *-*-openbsd*) LDFLAGS="$LDFLAGS -pthread" @@ -257,3 +257,30 @@ $NetBSD: patch-aa,v 1.54 2012/10/06 20:44:05 prlw1 Exp $ ;; *) G_THREAD_LIBS_FOR_GTHREAD="$G_THREAD_LIBS" +@@ -26844,7 +26878,7 @@ volatile int atomic = 2;\ + return 0; + } + _ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : ++if ac_fn_c_try_link "$LINENO"; then : + glib_cv_g_atomic_lock_free=yes + else + glib_cv_g_atomic_lock_free=no +@@ -26865,7 +26899,7 @@ volatile int atomic = 2;\ + return 0; + } + _ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : ++if ac_fn_c_try_link "$LINENO"; then : + as_fn_error $? "GLib must be build with -march=i486 or later." "$LINENO" 5 + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +@@ -26896,7 +26930,7 @@ __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4; + return 0; + } + _ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : ++if ac_fn_c_try_link "$LINENO"; then : + + else + diff --git a/devel/glib2/patches/patch-ak b/devel/glib2/patches/patch-ak index a5ae005407f..86af6c001df 100644 --- a/devel/glib2/patches/patch-ak +++ b/devel/glib2/patches/patch-ak @@ -1,6 +1,6 @@ -$NetBSD: patch-ak,v 1.15 2013/04/19 22:21:41 prlw1 Exp $ +$NetBSD: patch-ak,v 1.16 2013/06/23 04:26:49 tsutsui Exp $ ---- configure.ac.orig 2013-03-25 20:37:16.000000000 +0000 +--- configure.ac.orig 2013-06-09 22:53:13.000000000 +0000 +++ configure.ac @@ -858,7 +858,7 @@ int main (void) AC_MSG_RESULT($g_have_gnuc_visibility) @@ -158,3 +158,30 @@ $NetBSD: patch-ak,v 1.15 2013/04/19 22:21:41 prlw1 Exp $ ;; *) G_THREAD_LIBS_FOR_GTHREAD="$G_THREAD_LIBS" +@@ -2390,7 +2423,7 @@ AC_CACHE_CHECK([for lock-free atomic int + glib_cv_g_atomic_lock_free=yes + ;; + *) +- AC_TRY_COMPILE([], ++ AC_TRY_LINK([], + [volatile int atomic = 2;\ + __sync_bool_compare_and_swap (&atomic, 2, 3);], + [glib_cv_g_atomic_lock_free=yes], +@@ -2398,7 +2431,7 @@ AC_CACHE_CHECK([for lock-free atomic int + if test "$glib_cv_g_atomic_lock_free" = "no"; then + SAVE_CFLAGS="${CFLAGS}" + CFLAGS="-march=i486" +- AC_TRY_COMPILE([], ++ AC_TRY_LINK([], + [volatile int atomic = 2;\ + __sync_bool_compare_and_swap (&atomic, 2, 3);], + [AC_MSG_ERROR([GLib must be build with -march=i486 or later.])], +@@ -2416,7 +2449,7 @@ case $host in + # Some compilers support atomic operations but do not define + # __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4, like clang + if test x"$glib_cv_g_atomic_lock_free" = xyes; then +- AC_TRY_COMPILE([], ++ AC_TRY_LINK([], + [__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4;], + [], + [AC_DEFINE(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4, 1, [ compiler supports atomic operations])]) diff --git a/devel/glib2/patches/patch-ce b/devel/glib2/patches/patch-ce index 3e64c3e2f9c..0379cbd1b5e 100644 --- a/devel/glib2/patches/patch-ce +++ b/devel/glib2/patches/patch-ce @@ -1,9 +1,9 @@ -$NetBSD: patch-ce,v 1.5 2012/04/30 13:53:48 drochner Exp $ +$NetBSD: patch-ce,v 1.6 2013/06/23 04:26:49 tsutsui Exp $ Fix inconsistency of .hidden attributes, leading to link error on amd64, reported by Tobias Nygren. ---- glib/gatomic.c.orig 2012-03-12 00:42:41.000000000 +0000 +--- glib/gatomic.c.orig 2013-06-09 22:03:17.000000000 +0000 +++ glib/gatomic.c @@ -22,6 +22,7 @@ #include "config.h" @@ -13,3 +13,24 @@ reported by Tobias Nygren. /** * SECTION:atomic_operations +@@ -682,7 +683,7 @@ gsize + static pthread_mutex_t g_atomic_lock = PTHREAD_MUTEX_INITIALIZER; + + gint +-(g_atomic_int_get) (volatile gint *atomic) ++(g_atomic_int_get) (const volatile gint *atomic) + { + gint value; + +@@ -797,9 +798,9 @@ guint + + + gpointer +-(g_atomic_pointer_get) (volatile void *atomic) ++(g_atomic_pointer_get) (const volatile void *atomic) + { +- volatile gpointer *ptr = atomic; ++ const volatile gpointer *ptr = atomic; + gpointer value; + + pthread_mutex_lock (&g_atomic_lock); |