Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/3] libglib bump + host-ffi dependency resolved
@ 2011-12-06 11:45 Daniel Mack
  2011-12-06 11:45 ` [Buildroot] [PATCH 1/3] libffi: remove invalid variable 'includedir' in .pc file Daniel Mack
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Daniel Mack @ 2011-12-06 11:45 UTC (permalink / raw)
  To: buildroot

In order to build libglib2 in version 2.30.2, libffi is required to
provide host builds.

Daniel Mack (3):
  libffi: remove invalid variable 'includedir' in .pc file
  libffi: enable host target
  libglib2: bump to version 2.30.2

 package/libffi/libffi.mk                           |    7 +++-
 package/libglib2/Config.in                         |    1 +
 ...ib2-configure.ac-fix-cross-compile-builds.patch |   39 ++++++++++++++++++++
 ...b2-fix-compilation-with-no-builtin-atomic.patch |   25 -------------
 package/libglib2/libglib2.mk                       |   11 ++++--
 5 files changed, 52 insertions(+), 31 deletions(-)
 create mode 100644 package/libglib2/libglib2-configure.ac-fix-cross-compile-builds.patch
 delete mode 100644 package/libglib2/libglib2-fix-compilation-with-no-builtin-atomic.patch

-- 
1.7.7.3

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 1/3] libffi: remove invalid variable 'includedir' in .pc file
  2011-12-06 11:45 [Buildroot] [PATCH 0/3] libglib bump + host-ffi dependency resolved Daniel Mack
@ 2011-12-06 11:45 ` Daniel Mack
  2011-12-11 22:41   ` Peter Korsgaard
  2011-12-06 11:45 ` [Buildroot] [PATCH 2/3] libffi: enable host target Daniel Mack
  2011-12-06 11:45 ` [Buildroot] [PATCH 3/3] libglib2: bump to version 2.30.2 Daniel Mack
  2 siblings, 1 reply; 7+ messages in thread
From: Daniel Mack @ 2011-12-06 11:45 UTC (permalink / raw)
  To: buildroot

Fixes the following error:

  Variable 'includedir' not defined in '/home/daniel/buildroot/output/host/usr/arm-unknown-linux-gnueabi/sysroot/usr/lib/pkgconfig/libffi.pc'

Also, use $(SED) instead of 'sed -i'.

Signed-off-by: Daniel Mack <zonque@gmail.com>
---
 package/libffi/libffi.mk |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/package/libffi/libffi.mk b/package/libffi/libffi.mk
index 660a034..5ada36d 100644
--- a/package/libffi/libffi.mk
+++ b/package/libffi/libffi.mk
@@ -13,7 +13,8 @@ LIBFFI_INSTALL_STAGING = YES
 # accordingly
 define LIBFFI_MOVE_STAGING_HEADERS
 	mv $(STAGING_DIR)/usr/lib/libffi-*/include/*.h $(STAGING_DIR)/usr/include/
-	sed -i '/^includedir.*/d' $(STAGING_DIR)/usr/lib/pkgconfig/libffi.pc
+	$(SED) '/^includedir.*/d' $(STAGING_DIR)/usr/lib/pkgconfig/libffi.pc
+	$(SED) '/^Cflags:.*/d' $(STAGING_DIR)/usr/lib/pkgconfig/libffi.pc
 	rm -rf $(TARGET_DIR)/usr/lib/libffi-*
 endef
 
@@ -23,7 +24,8 @@ LIBFFI_POST_INSTALL_STAGING_HOOKS += LIBFFI_MOVE_STAGING_HEADERS
 define LIBFFI_MOVE_TARGET_HEADERS
 	install -d $(TARGET_DIR)/usr/include/
 	mv $(TARGET_DIR)/usr/lib/libffi-*/include/*.h $(TARGET_DIR)/usr/include/
-	sed -i '/^includedir.*/d' $(TARGET_DIR)/usr/lib/pkgconfig/libffi.pc
+	$(SED) '/^includedir.*/d' $(STAGING_DIR)/usr/lib/pkgconfig/libffi.pc
+	$(SED) '/^Cflags:.*/d' $(STAGING_DIR)/usr/lib/pkgconfig/libffi.pc
 	rm -rf $(TARGET_DIR)/usr/lib/libffi-*
 endef
 
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 2/3] libffi: enable host target
  2011-12-06 11:45 [Buildroot] [PATCH 0/3] libglib bump + host-ffi dependency resolved Daniel Mack
  2011-12-06 11:45 ` [Buildroot] [PATCH 1/3] libffi: remove invalid variable 'includedir' in .pc file Daniel Mack
@ 2011-12-06 11:45 ` Daniel Mack
  2011-12-11 22:42   ` Peter Korsgaard
  2011-12-06 11:45 ` [Buildroot] [PATCH 3/3] libglib2: bump to version 2.30.2 Daniel Mack
  2 siblings, 1 reply; 7+ messages in thread
From: Daniel Mack @ 2011-12-06 11:45 UTC (permalink / raw)
  To: buildroot

libffi is a new requirement for libglib, and as libglib has to be built
for the host as well, libffi has to follow.

Signed-off-by: Daniel Mack <zonque@gmail.com>
---
 package/libffi/libffi.mk |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/package/libffi/libffi.mk b/package/libffi/libffi.mk
index 5ada36d..e9e87ef 100644
--- a/package/libffi/libffi.mk
+++ b/package/libffi/libffi.mk
@@ -32,4 +32,5 @@ endef
 LIBFFI_POST_INSTALL_TARGET_HOOKS += LIBFFI_MOVE_TARGET_HEADERS
 
 $(eval $(call AUTOTARGETS))
+$(eval $(call AUTOTARGETS,host))
 
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 3/3] libglib2: bump to version 2.30.2
  2011-12-06 11:45 [Buildroot] [PATCH 0/3] libglib bump + host-ffi dependency resolved Daniel Mack
  2011-12-06 11:45 ` [Buildroot] [PATCH 1/3] libffi: remove invalid variable 'includedir' in .pc file Daniel Mack
  2011-12-06 11:45 ` [Buildroot] [PATCH 2/3] libffi: enable host target Daniel Mack
@ 2011-12-06 11:45 ` Daniel Mack
  2011-12-11 22:41   ` Peter Korsgaard
  2 siblings, 1 reply; 7+ messages in thread
From: Daniel Mack @ 2011-12-06 11:45 UTC (permalink / raw)
  To: buildroot

Important changes for this version bump are that libffi (for both host
and target) is now a hard requirement for libglib.

The patch regarding atomic function seems obsolete now, as this part of
the lib was rewritten. I couldn't figure which platform this used to
break on, but in worst case, it would be trivial to redo this one-liner.

Also, there's an issue in the upstream package that makes configure fail
for cross-builds with "configure: error: cannot run test program while
cross compiling". This issue was reported, but the patch was rejected.
Appearantly, the developers don't expect people to use configure for
cross environments anymore, so we have to maintain this patch locally.
For more information, see

  https://bugzilla.gnome.org/show_bug.cgi?id=665607

Signed-off-by: Daniel Mack <zonque@gmail.com>
---
 package/libglib2/Config.in                         |    1 +
 ...ib2-configure.ac-fix-cross-compile-builds.patch |   39 ++++++++++++++++++++
 ...b2-fix-compilation-with-no-builtin-atomic.patch |   25 -------------
 package/libglib2/libglib2.mk                       |   11 ++++--
 4 files changed, 47 insertions(+), 29 deletions(-)
 create mode 100644 package/libglib2/libglib2-configure.ac-fix-cross-compile-builds.patch
 delete mode 100644 package/libglib2/libglib2-fix-compilation-with-no-builtin-atomic.patch

diff --git a/package/libglib2/Config.in b/package/libglib2/Config.in
index 3d42430..71682cd 100644
--- a/package/libglib2/Config.in
+++ b/package/libglib2/Config.in
@@ -4,6 +4,7 @@ config BR2_PACKAGE_LIBGLIB2
 	select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_ZLIB
+	select BR2_PACKAGE_LIBFFI
 	depends on BR2_USE_WCHAR # gettext
 	help
 	  Low-level core library that forms the basis of GTK+ and GNOME.
diff --git a/package/libglib2/libglib2-configure.ac-fix-cross-compile-builds.patch b/package/libglib2/libglib2-configure.ac-fix-cross-compile-builds.patch
new file mode 100644
index 0000000..ff0d036
--- /dev/null
+++ b/package/libglib2/libglib2-configure.ac-fix-cross-compile-builds.patch
@@ -0,0 +1,39 @@
+From 22fd992b8e4acbbbcaf099bb1eafab6670a22022 Mon Sep 17 00:00:00 2001
+From: Daniel Mack <zonque@gmail.com>
+Date: Mon, 5 Dec 2011 17:28:32 +0100
+Subject: [PATCH] configure.ac: fix cross-compile builds
+
+When cross-compiling for ARM platforms, I was getting the following
+error:
+
+  checking for qsort_r... yes
+  checking if qsort_r uses glibc compatible argument order... configure:
+  error: in `/home/daniel/src/glib':
+  configure: error: cannot run test program while cross compiling
+  See `config.log' for more details
+
+Use the 4th argument of AC_RUN_IFELSE and assume
+glib_cv_have_qsort_r=no for cross-compile builds, just to be sure glib
+doesn't relay on any faulty functions.
+
+Signed-off-by: Daniel Mack <zonque@gmail.com>
+---
+ configure.ac |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1befff3..e770c20 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -608,7 +608,7 @@ if test x$ac_cv_func_qsort_r = xyes ; then
+       return 0;
+     else
+       return 1;
+-  }]])],[glib_cv_have_qsort_r=yes],[glib_cv_have_qsort_r=no])])
++  }]])],[glib_cv_have_qsort_r=yes],[glib_cv_have_qsort_r=no],[glib_cv_have_qsort_r=no])])
+ fi
+ 
+ if test x$glib_cv_have_qsort_r = xyes ; then
+-- 
+1.7.7.3
+
diff --git a/package/libglib2/libglib2-fix-compilation-with-no-builtin-atomic.patch b/package/libglib2/libglib2-fix-compilation-with-no-builtin-atomic.patch
deleted file mode 100644
index 39c0510..0000000
--- a/package/libglib2/libglib2-fix-compilation-with-no-builtin-atomic.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 58096320ea0888c4fbbff318839017a4d2e82703 Mon Sep 17 00:00:00 2001
-From: Lionel Landwerlin <llandwerlin@gmail.com>
-Date: Sat, 6 Nov 2010 14:56:15 +0100
-Subject: [PATCH] glib: fix compilation with no builtin atomic operations compilers
-
-Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
----
- glib/gatomic.c |    1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
-
-diff --git a/glib/gatomic.c b/glib/gatomic.c
-index 845c866..01468ce 100644
---- a/glib/gatomic.c
-+++ b/glib/gatomic.c
-@@ -881,6 +881,7 @@ g_atomic_pointer_compare_and_exchange (volatile gpointer G_GNUC_MAY_ALIAS *atomi
- #endif /* DEFINE_WITH_WIN32_INTERLOCKED */
- 
- #ifdef DEFINE_WITH_MUTEXES
-+# include "gthread.h"
- /* We have to use the slow, but safe locking method */
- static GMutex *g_atomic_mutex; 
- 
--- 
-1.7.2.3
-
diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk
index 0832ac3..c5bc4a9 100644
--- a/package/libglib2/libglib2.mk
+++ b/package/libglib2/libglib2.mk
@@ -3,8 +3,8 @@
 # libglib2
 #
 #############################################################
-LIBGLIB2_VERSION_MAJOR = 2.28
-LIBGLIB2_VERSION_MINOR = 8
+LIBGLIB2_VERSION_MAJOR = 2.30
+LIBGLIB2_VERSION_MINOR = 2
 LIBGLIB2_VERSION = $(LIBGLIB2_VERSION_MAJOR).$(LIBGLIB2_VERSION_MINOR)
 LIBGLIB2_SOURCE = glib-$(LIBGLIB2_VERSION).tar.bz2
 LIBGLIB2_SITE = http://ftp.gnome.org/pub/gnome/sources/glib/$(LIBGLIB2_VERSION_MAJOR)
@@ -13,6 +13,9 @@ LIBGLIB2_INSTALL_STAGING = YES
 LIBGLIB2_INSTALL_TARGET = YES
 LIBGLIB2_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) LDFLAGS=-L$(STAGING_DIR)/usr/lib install
 
+# we have to patch configure.ac
+LIBGLIB2_AUTORECONF = YES
+
 LIBGLIB2_CONF_ENV =	\
 		ac_cv_func_posix_getpwuid_r=yes glib_cv_stack_grows=no \
 		glib_cv_uscore=no ac_cv_func_strtod=yes \
@@ -48,9 +51,9 @@ HOST_LIBGLIB2_CONF_OPT = \
 		--disable-gtk-doc \
 		--enable-debug=no \
 
-LIBGLIB2_DEPENDENCIES = host-pkg-config host-libglib2 zlib $(if $(BR2_NEEDS_GETTEXT),gettext libintl)
+LIBGLIB2_DEPENDENCIES = host-pkg-config host-libglib2 zlib libffi $(if $(BR2_NEEDS_GETTEXT),gettext libintl)
 
-HOST_LIBGLIB2_DEPENDENCIES = host-pkg-config host-zlib
+HOST_LIBGLIB2_DEPENDENCIES = host-pkg-config host-zlib host-libffi
 
 ifneq ($(BR2_ENABLE_LOCALE),y)
 LIBGLIB2_DEPENDENCIES+=libiconv
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 3/3] libglib2: bump to version 2.30.2
  2011-12-06 11:45 ` [Buildroot] [PATCH 3/3] libglib2: bump to version 2.30.2 Daniel Mack
@ 2011-12-11 22:41   ` Peter Korsgaard
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2011-12-11 22:41 UTC (permalink / raw)
  To: buildroot

>>>>> "Daniel" == Daniel Mack <zonque@gmail.com> writes:

 Daniel> Important changes for this version bump are that libffi (for both host
 Daniel> and target) is now a hard requirement for libglib.

 Daniel> The patch regarding atomic function seems obsolete now, as this part of
 Daniel> the lib was rewritten. I couldn't figure which platform this used to
 Daniel> break on, but in worst case, it would be trivial to redo this one-liner.

 Daniel> Also, there's an issue in the upstream package that makes configure fail
 Daniel> for cross-builds with "configure: error: cannot run test program while
 Daniel> cross compiling". This issue was reported, but the patch was rejected.
 Daniel> Appearantly, the developers don't expect people to use configure for
 Daniel> cross environments anymore, so we have to maintain this patch locally.
 Daniel> For more information, see

Thanks. Instead of using this patch I would prefer to just pass
glib_cv_have_qsort_r=yes/no in LIBGLIB2_CONF_ENV like Colin
suggested. That way we can set it to yes for external glibc-based
toolchains (BR2_TOOLCHAIN_EXTERNAL_GLIBC) and no otherwise.

Care to respin this patch with that change?

Thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 1/3] libffi: remove invalid variable 'includedir' in .pc file
  2011-12-06 11:45 ` [Buildroot] [PATCH 1/3] libffi: remove invalid variable 'includedir' in .pc file Daniel Mack
@ 2011-12-11 22:41   ` Peter Korsgaard
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2011-12-11 22:41 UTC (permalink / raw)
  To: buildroot

>>>>> "Daniel" == Daniel Mack <zonque@gmail.com> writes:

 Daniel> Fixes the following error:
 Daniel>   Variable 'includedir' not defined in '/home/daniel/buildroot/output/host/usr/arm-unknown-linux-gnueabi/sysroot/usr/lib/pkgconfig/libffi.pc'

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 2/3] libffi: enable host target
  2011-12-06 11:45 ` [Buildroot] [PATCH 2/3] libffi: enable host target Daniel Mack
@ 2011-12-11 22:42   ` Peter Korsgaard
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2011-12-11 22:42 UTC (permalink / raw)
  To: buildroot

>>>>> "Daniel" == Daniel Mack <zonque@gmail.com> writes:

 Daniel> libffi is a new requirement for libglib, and as libglib has to be built
 Daniel> for the host as well, libffi has to follow.

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-12-11 22:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-06 11:45 [Buildroot] [PATCH 0/3] libglib bump + host-ffi dependency resolved Daniel Mack
2011-12-06 11:45 ` [Buildroot] [PATCH 1/3] libffi: remove invalid variable 'includedir' in .pc file Daniel Mack
2011-12-11 22:41   ` Peter Korsgaard
2011-12-06 11:45 ` [Buildroot] [PATCH 2/3] libffi: enable host target Daniel Mack
2011-12-11 22:42   ` Peter Korsgaard
2011-12-06 11:45 ` [Buildroot] [PATCH 3/3] libglib2: bump to version 2.30.2 Daniel Mack
2011-12-11 22:41   ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox