Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 08/18] lmbench: add support to use libtirpc when available
From: Thomas Petazzoni @ 2012-11-03 17:47 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <cover.1351964808.git.thomas.petazzoni@free-electrons.com>

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/lmbench/Config.in  |    6 +-----
 package/lmbench/lmbench.mk |   11 ++++++++++-
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/package/lmbench/Config.in b/package/lmbench/Config.in
index 70449b6..d710e1f 100644
--- a/package/lmbench/Config.in
+++ b/package/lmbench/Config.in
@@ -1,12 +1,8 @@
 config BR2_PACKAGE_LMBENCH
 	bool "lmbench"
-	# Uses pmap_set, pmap__unset, pmap_getport, etc.
-	depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC
+	select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	help
 	  LMbench is a suite of simple, portable,
 	  ANSI/C microbenchmarks for UNIX/POSIX.
 
 	  http://sourceforge.net/projects/lmbench/
-
-comment "lmbench requires a toolchain with RPC support"
-	depends on !BR2_TOOLCHAIN_HAS_NATIVE_RPC
diff --git a/package/lmbench/lmbench.mk b/package/lmbench/lmbench.mk
index d3d0f8f..1932adb 100644
--- a/package/lmbench/lmbench.mk
+++ b/package/lmbench/lmbench.mk
@@ -9,6 +9,15 @@ LMBENCH_SITE:=http://downloads.sourceforge.net/project/lmbench/development/lmben
 LMBENCH_LICENSE =  lmbench license (based on GPLv2)
 LMBENCH_LICENSE_FILES = COPYING COPYING-2
 
+LMBENCH_CFLAGS = $(TARGET_CFLAGS)
+LMBENCH_LDLIBS = $(TARGET_LDFLAGS)
+
+ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
+LMBENCH_DEPENDENCIES += libtirpc
+LMBENCH_CFLAGS += -I$(STAGING_DIR)/usr/include/tirpc/
+LMBENCH_LDFLAGS += -ltirpc
+endif
+
 define LMBENCH_CONFIGURE_CMDS
 	$(call CONFIG_UPDATE,$(@D))
 	sed -i 's/CFLAGS=/CFLAGS+=/g' $(@D)/src/Makefile
@@ -18,7 +27,7 @@ define LMBENCH_CONFIGURE_CMDS
 endef
 
 define LMBENCH_BUILD_CMDS
-	$(MAKE) CFLAGS="$(TARGET_CFLAGS)" OS=$(ARCH) CC="$(TARGET_CC)" -C $(@D)/src
+	$(MAKE) CFLAGS="$(LMBENCH_CFLAGS)" LDFLAGS="$(LMBENCH_LDFLAGS)" OS=$(ARCH) CC="$(TARGET_CC)" -C $(@D)/src
 endef
 
 define LMBENCH_INSTALL_TARGET_CMDS
-- 
1.7.9.5

^ permalink raw reply related

* [Buildroot] [PATCH 07/18] busybox: add support to link against libtirpc when available
From: Thomas Petazzoni @ 2012-11-03 17:47 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <cover.1351964808.git.thomas.petazzoni@free-electrons.com>

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/busybox/busybox.mk |   19 +++++++++++++++++--
 package/libtirpc/Config.in |    5 -----
 2 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index 306b46f..b43f779 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -15,14 +15,29 @@ BUSYBOX_SOURCE = busybox-$(BUSYBOX_VERSION).tar.bz2
 BUSYBOX_LICENSE = GPLv2
 BUSYBOX_LICENSE_FILES = LICENSE
 
+BUSYBOX_CFLAGS = \
+	$(TARGET_CFLAGS) \
+	-I$(LINUX_HEADERS_DIR)/include
+
+BUSYBOX_LDFLAGS = \
+	$(TARGET_LDFLAGS)
+
+# Link against libtirpc if available so that we can leverage its RPC
+# support for NFS mounting with Busybox
+ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
+BUSYBOX_DEPENDENCIES += libtirpc
+BUSYBOX_CFLAGS += -I$(STAGING_DIR)/usr/include/tirpc/
+BUSYBOX_LDFLAGS += -ltirpc
+endif
+
 BUSYBOX_BUILD_CONFIG = $(BUSYBOX_DIR)/.config
 # Allows the build system to tweak CFLAGS
-BUSYBOX_MAKE_ENV = $(TARGET_MAKE_ENV) CFLAGS="$(TARGET_CFLAGS) -I$(LINUX_HEADERS_DIR)/include"
+BUSYBOX_MAKE_ENV = $(TARGET_MAKE_ENV) CFLAGS="$(BUSYBOX_CFLAGS)"
 BUSYBOX_MAKE_OPTS = \
 	CC="$(TARGET_CC)" \
 	ARCH=$(KERNEL_ARCH) \
 	PREFIX="$(TARGET_DIR)" \
-	EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
+	EXTRA_LDFLAGS="$(BUSYBOX_LDFLAGS)" \
 	CROSS_COMPILE="$(TARGET_CROSS)" \
 	CONFIG_PREFIX="$(TARGET_DIR)" \
 	SKIP_STRIP=y
diff --git a/package/libtirpc/Config.in b/package/libtirpc/Config.in
index 0172f0d..7e891b4 100644
--- a/package/libtirpc/Config.in
+++ b/package/libtirpc/Config.in
@@ -1,12 +1,7 @@
 config BR2_PACKAGE_LIBTIRPC
 	bool "libtirpc"
-	depends on !BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	help
 	  Libtirpc is a port of Sun's Transport-Independent RPC
 	  library to Linux.
 
 	  http://sourceforge.net/projects/libtirpc/
-
-config BR2_RPC_SUPPORT_AVAILABLE
-       bool
-       default y if (BR2_TOOLCHAIN_HAS_NATIVE_RPC || BR2_PACKAGE_LIBTIRPC)
-- 
1.7.9.5

^ permalink raw reply related

* [Buildroot] [PATCH 06/18] libtirpc: new package
From: Thomas Petazzoni @ 2012-11-03 17:47 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <cover.1351964808.git.thomas.petazzoni@free-electrons.com>

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/Config.in                                  |    1 +
 package/libtirpc/Config.in                         |   12 ++++
 ...able-parts-of-TIRPC-requiring-NIS-support.patch |   70 ++++++++++++++++++++
 ...out-RPC-support-does-not-install-rpcent.h.patch |   26 ++++++++
 ...btirpc-0003-Add-missing-INET6-conditional.patch |   60 +++++++++++++++++
 .../libtirpc-0004-Make-IPv6-support-optional.patch |   43 ++++++++++++
 package/libtirpc/libtirpc.mk                       |   17 +++++
 7 files changed, 229 insertions(+)
 create mode 100644 package/libtirpc/Config.in
 create mode 100644 package/libtirpc/libtirpc-0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch
 create mode 100644 package/libtirpc/libtirpc-0002-uClibc-without-RPC-support-does-not-install-rpcent.h.patch
 create mode 100644 package/libtirpc/libtirpc-0003-Add-missing-INET6-conditional.patch
 create mode 100644 package/libtirpc/libtirpc-0004-Make-IPv6-support-optional.patch
 create mode 100644 package/libtirpc/libtirpc.mk

diff --git a/package/Config.in b/package/Config.in
index 1650c71..644e968 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -454,6 +454,7 @@ source "package/libpcap/Config.in"
 source "package/libosip2/Config.in"
 source "package/librsync/Config.in"
 source "package/libsoup/Config.in"
+source "package/libtirpc/Config.in"
 source "package/libtorrent/Config.in"
 source "package/libupnp/Config.in"
 source "package/libvncserver/Config.in"
diff --git a/package/libtirpc/Config.in b/package/libtirpc/Config.in
new file mode 100644
index 0000000..0172f0d
--- /dev/null
+++ b/package/libtirpc/Config.in
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_LIBTIRPC
+	bool "libtirpc"
+	depends on !BR2_TOOLCHAIN_HAS_NATIVE_RPC
+	help
+	  Libtirpc is a port of Sun's Transport-Independent RPC
+	  library to Linux.
+
+	  http://sourceforge.net/projects/libtirpc/
+
+config BR2_RPC_SUPPORT_AVAILABLE
+       bool
+       default y if (BR2_TOOLCHAIN_HAS_NATIVE_RPC || BR2_PACKAGE_LIBTIRPC)
diff --git a/package/libtirpc/libtirpc-0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch b/package/libtirpc/libtirpc-0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch
new file mode 100644
index 0000000..bdbe021
--- /dev/null
+++ b/package/libtirpc/libtirpc-0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch
@@ -0,0 +1,70 @@
+From f4c022c526ce061dfdd3c46f544a9495a3a3a97e Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Sat, 23 Jun 2012 21:57:39 +0200
+Subject: [PATCH 1/4] Disable parts of TIRPC requiring NIS support
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ src/Makefile.am  |    3 +--
+ src/rpc_soc.c    |    2 ++
+ tirpc/rpc/auth.h |    3 +++
+ 3 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 7ee8cbc..6d36b93 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -49,8 +49,7 @@ libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c bindresvport.c cln
+         pmap_prot.c pmap_prot2.c pmap_rmt.c rpc_prot.c rpc_commondata.c \
+         rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \
+         rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_generic.c \
+-        svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \
+-        auth_time.c auth_des.c authdes_prot.c des_crypt.c
++        svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c
+ 
+ ## XDR
+ libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c
+diff --git a/src/rpc_soc.c b/src/rpc_soc.c
+index c678429..27f2136 100644
+--- a/src/rpc_soc.c
++++ b/src/rpc_soc.c
+@@ -515,6 +515,7 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
+ 	    (resultproc_t) rpc_wrap_bcast, "udp");
+ }
+ 
++#if 0
+ /*
+  * Create the client des authentication object. Obsoleted by
+  * authdes_seccreate().
+@@ -546,6 +547,7 @@ fallback:
+ 	dummy = authdes_seccreate(servername, window, NULL, ckey);
+ 	return (dummy);
+ }
++#endif
+ 
+ /*
+  * Create a client handle for a unix connection. Obsoleted by clnt_vc_create()
+diff --git a/tirpc/rpc/auth.h b/tirpc/rpc/auth.h
+index 734e6b9..6e7e54e 100644
+--- a/tirpc/rpc/auth.h
++++ b/tirpc/rpc/auth.h
+@@ -282,6 +282,8 @@ extern AUTH *authunix_create(char *, uid_t, uid_t, int, uid_t *);
+ extern AUTH *authunix_create_default(void);	/* takes no parameters */
+ extern AUTH *authnone_create(void);		/* takes no parameters */
+ __END_DECLS
++
++#if 0
+ /*
+  * DES style authentication
+  * AUTH *authsecdes_create(servername, window, timehost, ckey)
+@@ -295,6 +297,7 @@ extern AUTH *authdes_create (char *, u_int, struct sockaddr *, des_block *);
+ extern AUTH *authdes_seccreate (const char *, const u_int, const  char *,
+     const  des_block *);
+ __END_DECLS
++#endif
+ 
+ __BEGIN_DECLS
+ extern bool_t xdr_opaque_auth		(XDR *, struct opaque_auth *);
+-- 
+1.7.9.5
+
diff --git a/package/libtirpc/libtirpc-0002-uClibc-without-RPC-support-does-not-install-rpcent.h.patch b/package/libtirpc/libtirpc-0002-uClibc-without-RPC-support-does-not-install-rpcent.h.patch
new file mode 100644
index 0000000..0798c34
--- /dev/null
+++ b/package/libtirpc/libtirpc-0002-uClibc-without-RPC-support-does-not-install-rpcent.h.patch
@@ -0,0 +1,26 @@
+From c91721dc289397dfe38fdae175f4ee37e824667c Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Sat, 23 Jun 2012 21:58:07 +0200
+Subject: [PATCH 2/4] uClibc without RPC support does not install rpcent.h
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ tirpc/rpc/rpcent.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tirpc/rpc/rpcent.h b/tirpc/rpc/rpcent.h
+index 7fd93d9..df1f5ed 100644
+--- a/tirpc/rpc/rpcent.h
++++ b/tirpc/rpc/rpcent.h
+@@ -47,7 +47,7 @@
+ __BEGIN_DECLS
+ 
+ /* These are defined in /usr/include/rpc/netdb.h */
+-#if 0
++#if __UCLIBC__
+ struct rpcent {
+ 	char	*r_name;	/* name of server for this rpc program */
+ 	char	**r_aliases;	/* alias list */
+-- 
+1.7.9.5
+
diff --git a/package/libtirpc/libtirpc-0003-Add-missing-INET6-conditional.patch b/package/libtirpc/libtirpc-0003-Add-missing-INET6-conditional.patch
new file mode 100644
index 0000000..64d3da8
--- /dev/null
+++ b/package/libtirpc/libtirpc-0003-Add-missing-INET6-conditional.patch
@@ -0,0 +1,60 @@
+From a4852bd653ac917165de1d41b60168cd88dc6672 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Sat, 23 Jun 2012 21:58:36 +0200
+Subject: [PATCH 3/4] Add missing INET6 conditional
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ src/rpc_generic.c |    2 ++
+ src/svc_dg.c      |    4 ++++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/src/rpc_generic.c b/src/rpc_generic.c
+index 509fb36..2eb91ad 100644
+--- a/src/rpc_generic.c
++++ b/src/rpc_generic.c
+@@ -535,7 +535,9 @@ __rpc_nconf2fd_flags(const struct netconfig *nconf, int flags)
+ 	    si.si_af == AF_INET6) {
+ 		int val = 1;
+ 
++#ifdef INET6
+ 		setsockopt(fd, SOL_IPV6, IPV6_V6ONLY, &val, sizeof(val));
++#endif
+ 	}
+ 	return fd;
+ }
+diff --git a/src/svc_dg.c b/src/svc_dg.c
+index 66a56ee..e8faf33 100644
+--- a/src/svc_dg.c
++++ b/src/svc_dg.c
+@@ -627,9 +627,11 @@ svc_dg_enable_pktinfo(int fd, const struct __rpc_sockinfo *si)
+ 		(void) setsockopt(fd, SOL_IP, IP_PKTINFO, &val, sizeof(val));
+ 		break;
+ 
++#ifdef INET6
+ 	case AF_INET6:
+ 		(void) setsockopt(fd, SOL_IPV6, IPV6_PKTINFO, &val, sizeof(val));
+ 		break;
++#endif
+ 	}
+ }
+ 
+@@ -667,6 +669,7 @@ svc_dg_valid_pktinfo(struct msghdr *msg)
+ 		}
+ 		break;
+ 
++#ifdef INET6
+ 	case AF_INET6:
+ 		if (cmsg->cmsg_level != SOL_IPV6
+ 		 || cmsg->cmsg_type != IPV6_PKTINFO
+@@ -679,6 +682,7 @@ svc_dg_valid_pktinfo(struct msghdr *msg)
+ 			pkti->ipi6_ifindex = 0;
+ 		}
+ 		break;
++#endif
+ 
+ 	default:
+ 		return 0;
+-- 
+1.7.9.5
+
diff --git a/package/libtirpc/libtirpc-0004-Make-IPv6-support-optional.patch b/package/libtirpc/libtirpc-0004-Make-IPv6-support-optional.patch
new file mode 100644
index 0000000..455ad74
--- /dev/null
+++ b/package/libtirpc/libtirpc-0004-Make-IPv6-support-optional.patch
@@ -0,0 +1,43 @@
+From 1f36736733eac5080f3a4f3abd1c3a04ac42f1dd Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Sun, 24 Jun 2012 21:40:21 +0200
+Subject: [PATCH 4/4] Make IPv6 support optional
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ configure.ac    |    5 +++++
+ src/Makefile.am |    2 +-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 97c6f2c..487ec83 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -22,6 +22,11 @@ AC_PROG_LIBTOOL
+ AC_HEADER_DIRENT
+ AC_PREFIX_DEFAULT(/usr)
+ AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h locale.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h])
++
++AC_CHECK_HEADER(netinet/ip6.h,
++	AC_DEFINE(INET6, 1, [Define to 1 if IPv6 is available]),
++	[AC_MSG_WARN([no IPv6])])
++
+ AC_CHECK_LIB([pthread], [pthread_create])
+ 
+ 
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 6d36b93..6dc259e 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -6,7 +6,7 @@
+ ## anything like that.
+ 
+ 
+-INCLUDES = -I$(top_srcdir)/tirpc -DPORTMAP -DINET6 -DVERSION="\"$(VERSION)\"" \
++INCLUDES = -I$(top_srcdir)/tirpc -DPORTMAP -DVERSION="\"$(VERSION)\"" \
+ 		-D_GNU_SOURCE -Wall -pipe  
+ 
+ lib_LTLIBRARIES = libtirpc.la
+-- 
+1.7.9.5
+
diff --git a/package/libtirpc/libtirpc.mk b/package/libtirpc/libtirpc.mk
new file mode 100644
index 0000000..32fbeb5
--- /dev/null
+++ b/package/libtirpc/libtirpc.mk
@@ -0,0 +1,17 @@
+#############################################################
+#
+# libtirpc
+#
+#############################################################
+
+LIBTIRPC_VERSION = 0.2.2
+LIBTIRPC_SOURCE = libtirpc-$(LIBTIRPC_VERSION).tar.bz2
+LIBTIRPC_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/project/libtirpc/libtirpc/$(LIBTIRPC_VERSION)
+LIBTIRPC_LICENSE = BSD-3c
+LIBTIRPC_LICENSE_FILES = COPYING
+
+LIBTIRPC_INSTALL_STAGING = YES
+LIBTIRPC_AUTORECONF = YES
+LIBTIRPC_DEPENDENCIES = host-pkg-config
+
+$(eval $(autotools-package))
-- 
1.7.9.5

^ permalink raw reply related

* [Buildroot] [PATCH 05/18] toolchain-external: improve glibc support to test availability of RPC
From: Thomas Petazzoni @ 2012-11-03 17:47 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <cover.1351964808.git.thomas.petazzoni@free-electrons.com>

Basically, the BR2_TOOLCHAIN_EXTERNAL_GLIBC option no longer
unconditionally selects BR2_TOOLCHAIN_HAS_NATIVE_RPC since there are
glibc toolchains that don't have RPC support. All the predefined
toolchain profiles are updated to take into account this change: for
the moment, all glibc toolchains that have pre-defined toolchains have
RPC support, but further patches in the series add pre-defined glibc
toolchains that don't have RPC support. In the case of custom glibc
toolchains, a question is asked to the user so that he can say whether
the external glibc toolchain has RPC support or not. The validity of
this configuration option is checked by the new
check_glibc_rpc_feature function in helpers.mk.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/helpers.mk                   |   27 ++++++++++++++++++-----
 toolchain/toolchain-external/Config.in |   37 ++++++++++++++++++++++++--------
 2 files changed, 50 insertions(+), 14 deletions(-)

diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 34e9c17..1509ff8 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -172,9 +172,10 @@ create_lib64_symlinks = \
 	(cd $(STAGING_DIR)/usr ; ln -s lib lib64)
 
 #
-# Check the availability of a particular glibc feature. We assume that
-# all Buildroot toolchain options are supported by glibc, so we just
-# check that they are enabled.
+# Check the availability of a particular glibc feature. This function
+# is used to check toolchain options that are always supported by
+# glibc, so we simply check that the corresponding option is properly
+# enabled.
 #
 # $1: Buildroot option name
 # $2: feature description
@@ -186,6 +187,22 @@ check_glibc_feature = \
 	fi
 
 #
+# Check the availability of RPC support in a glibc toolchain
+#
+# $1: sysroot directory
+#
+check_glibc_rpc_feature = \
+	IS_IN_LIBC=`test -f $(1)/usr/include/rpc/rpc.h && echo y` ; \
+	if [ "$(BR2_TOOLCHAIN_HAS_NATIVE_RPC)" != "y" -a "$${IS_IN_LIBC}" = "y" ] ; then \
+		echo "RPC support available in C library, please enable BR2_TOOLCHAIN_HAS_NATIVE_RPC" ; \
+		exit 1 ; \
+	fi ; \
+	if [ "$(BR2_TOOLCHAIN_HAS_NATIVE_RPC)" = "y" -a "$${IS_IN_LIBC}" != "y" ] ; then \
+		echo "RPC support not available in C library, please disable BR2_TOOLCHAIN_HAS_NATIVE_RPC" ; \
+		exit 1 ; \
+	fi
+
+#
 # Check the correctness of a glibc external toolchain configuration.
 #  1. Check that the C library selected in Buildroot matches the one
 #     of the external toolchain
@@ -202,10 +219,10 @@ check_glibc = \
 	fi; \
 	$(call check_glibc_feature,BR2_LARGEFILE,Large file support) ;\
 	$(call check_glibc_feature,BR2_INET_IPV6,IPv6 support) ;\
-	$(call check_glibc_feature,BR2_TOOLCHAIN_HAS_NATIVE_RPC,RPC support) ;\
 	$(call check_glibc_feature,BR2_ENABLE_LOCALE,Locale support) ;\
 	$(call check_glibc_feature,BR2_USE_MMU,MMU support) ;\
-	$(call check_glibc_feature,BR2_USE_WCHAR,Wide char support)
+	$(call check_glibc_feature,BR2_USE_WCHAR,Wide char support) ;\
+	$(call check_glibc_rpc_feature,$${SYSROOT_DIR})
 
 #
 # Check the conformity of Buildroot configuration with regard to the
diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index 8d3240a..96b689a 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -8,6 +8,7 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_2012_09
 	depends on BR2_arm
 	depends on BR2_cortex_a8 || BR2_cortex_a9
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_INSTALL_LIBSTDCPP
 	help
 	  Linaro toolchain for the ARM architecture. It uses Linaro
@@ -24,6 +25,7 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_2012_08
 	depends on BR2_arm
 	depends on BR2_cortex_a8 || BR2_cortex_a9
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_INSTALL_LIBSTDCPP
 	help
 	  Linaro toolchain for the ARM architecture. It uses Linaro
@@ -40,6 +42,7 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_2012_07
 	depends on BR2_arm
 	depends on BR2_cortex_a8 || BR2_cortex_a9
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_INSTALL_LIBSTDCPP
 	help
 	  Linaro toolchain for the ARM architecture. It uses Linaro
@@ -56,6 +59,7 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_2012_06
 	depends on BR2_arm
 	depends on BR2_cortex_a8 || BR2_cortex_a9
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_INSTALL_LIBSTDCPP
 	help
 	  Linaro toolchain for the ARM architecture. It uses Linaro
@@ -72,6 +76,7 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_2012_05
 	depends on BR2_arm
 	depends on BR2_cortex_a8 || BR2_cortex_a9
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_INSTALL_LIBSTDCPP
 	help
 	  Linaro toolchain for the ARM architecture. It uses Linaro
@@ -108,6 +113,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201109
 	bool "Sourcery CodeBench ARM 2011.09"
 	depends on BR2_arm
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_INSTALL_LIBSTDCPP
 	help
 	  Sourcery CodeBench toolchain for the ARM architecture, from
@@ -129,6 +135,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201103
 	bool "Sourcery CodeBench ARM 2011.03"
 	depends on BR2_arm
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_INSTALL_LIBSTDCPP
 	help
 	  Sourcery CodeBench toolchain for the ARM architecture, from
@@ -150,6 +157,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201009
 	bool "Sourcery CodeBench ARM 2010.09"
 	depends on BR2_arm
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_INSTALL_LIBSTDCPP
 	help
 	  Sourcery CodeBench toolchain for the ARM architecture, from
@@ -171,6 +179,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2010Q1
 	bool "Sourcery CodeBench ARM 2010q1"
 	depends on BR2_arm
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_INSTALL_LIBSTDCPP
 	help
 	  Sourcery CodeBench toolchain for the ARM architecture, from
@@ -192,6 +201,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201109
 	bool "Sourcery CodeBench MIPS 2011.09"
 	depends on BR2_mips || BR2_mipsel
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_INSTALL_LIBSTDCPP
 	help
 	  Sourcery CodeBench toolchain for the MIPS architecture, from
@@ -259,6 +269,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201103
 	bool "Sourcery CodeBench MIPS 2011.03"
 	depends on BR2_mips || BR2_mipsel
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_INSTALL_LIBSTDCPP
 	help
 	  Sourcery CodeBench toolchain for the MIPS architecture, from
@@ -308,6 +319,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS44
 	bool "Sourcery CodeBench MIPS 4.4"
 	depends on BR2_mips || BR2_mipsel
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_INSTALL_LIBSTDCPP
 	help
 	  Sourcery CodeBench toolchain for the MIPS architecture, from
@@ -357,6 +369,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103
 	bool "Sourcery CodeBench PowerPC 2011.03"
 	depends on BR2_powerpc
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_INSTALL_LIBSTDCPP
 	help
 	  Sourcery CodeBench toolchain for the PowerPC architecture,
@@ -384,6 +397,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
 	bool "Sourcery CodeBench PowerPC 2010.09"
 	depends on BR2_powerpc
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_INSTALL_LIBSTDCPP
 	help
 	  Sourcery CodeBench toolchain for the PowerPC architecture,
@@ -411,6 +425,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201103
 	bool "Sourcery CodeBench SH 2011.03"
 	depends on BR2_sh4a || BR2_sh4aeb
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_INSTALL_LIBSTDCPP
 	help
 	  Sourcery CodeBench toolchain for the SuperH architecture,
@@ -430,6 +445,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009
 	bool "Sourcery CodeBench SH 2010.09"
 	depends on BR2_sh4a || BR2_sh4aeb
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_INSTALL_LIBSTDCPP
 	help
 	  Sourcery CodeBench toolchain for the SuperH architecture,
@@ -483,6 +499,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201109
 	bool "Sourcery CodeBench x86/x86_64 2011.09"
 	depends on BR2_i386 || BR2_x86_64
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_INSTALL_LIBSTDCPP
 	help
 	  Sourcery CodeBench toolchain for the x86/x86_64
@@ -504,6 +521,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201009
 	bool "Sourcery CodeBench x86/x86_64 2010.09"
 	depends on BR2_i386 || BR2_x86_64
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_INSTALL_LIBSTDCPP
 	help
 	  Sourcery CodeBench toolchain for the x86/x86_64
@@ -570,6 +588,7 @@ config BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEEL_V2
 	bool "Xilinx Little Endian Microblaze GNU Tools"
 	depends on BR2_microblazeel
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	help
 	  Toolchain for the Microblaze architecture, from
 	  http://wiki.xilinx.com/mb-gnu-tools
@@ -578,6 +597,7 @@ config BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEBE_V2
 	bool "Xilinx Big Endian Microblaze GNU Tools"
 	depends on BR2_microblazebe
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	help
 	  Toolchain for the Microblaze architecture, from
 	  http://wiki.xilinx.com/mb-gnu-tools
@@ -668,7 +688,6 @@ config BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	bool
 	select BR2_LARGEFILE
 	select BR2_INET_IPV6
-	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_USE_WCHAR
 	select BR2_ENABLE_LOCALE
 	select BR2_TOOLCHAIN_HAS_THREADS
@@ -720,14 +739,6 @@ config BR2_TOOLCHAIN_EXTERNAL_INET_IPV6
 	  IPv6. If you don't know, leave the default value, Buildroot
 	  will tell you if it's correct or not.
 
-config BR2_TOOLCHAIN_EXTERNAL_INET_RPC
-	bool "Toolchain has RPC support?"
-	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
-	help
-	  Select this option if your external toolchain supports
-	  RPC. If you don't know, leave the default value, Buildroot
-	  will tell you if it's correct or not.
-
 config BR2_TOOLCHAIN_EXTERNAL_WCHAR
 	bool "Toolchain has WCHAR support?"
 	select BR2_USE_WCHAR
@@ -766,6 +777,14 @@ config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG
 
 endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
 
+config BR2_TOOLCHAIN_EXTERNAL_INET_RPC
+	bool "Toolchain has RPC support?"
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
+	help
+	  Select this option if your external toolchain supports
+	  RPC. If you don't know, leave the default value, Buildroot
+	  will tell you if it's correct or not.
+
 config BR2_TOOLCHAIN_EXTERNAL_CXX
 	bool "Toolchain has C++ support?"
 	select BR2_INSTALL_LIBSTDCPP
-- 
1.7.9.5

^ permalink raw reply related

* [Buildroot] [PATCH 04/18] Rename BR2_INET_RPC to BR2_TOOLCHAIN_HAS_NATIVE_RPC
From: Thomas Petazzoni @ 2012-11-03 17:47 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <cover.1351964808.git.thomas.petazzoni@free-electrons.com>

The BR2_INET_RPC has for a long time been a not very descriptive
configuration option name, and with the advent of non-RPC glibc
toolchains and the apparition of libtirpc, we really need to rename it
to something more sensible, BR2_TOOLCHAIN_HAS_NATIVE_RPC.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/lmbench/Config.in                  |    4 ++--
 package/netkitbase/Config.in               |    4 ++--
 package/netkittelnet/Config.in             |    4 ++--
 package/nfs-utils/Config.in                |    4 ++--
 package/portmap/Config.in                  |    4 ++--
 package/quota/Config.in                    |    4 ++--
 package/samba/samba.mk                     |    2 +-
 package/xinetd/xinetd.mk                   |    2 +-
 toolchain/helpers.mk                       |    4 ++--
 toolchain/toolchain-buildroot/Config.in.2  |    2 +-
 toolchain/toolchain-common.in              |    2 +-
 toolchain/toolchain-crosstool-ng/Config.in |   10 +++++++---
 toolchain/toolchain-external/Config.in     |   14 +++++++-------
 toolchain/toolchain-external/ext-tool.mk   |    8 ++++----
 14 files changed, 36 insertions(+), 32 deletions(-)

diff --git a/package/lmbench/Config.in b/package/lmbench/Config.in
index c8423d1..70449b6 100644
--- a/package/lmbench/Config.in
+++ b/package/lmbench/Config.in
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_LMBENCH
 	bool "lmbench"
 	# Uses pmap_set, pmap__unset, pmap_getport, etc.
-	depends on BR2_INET_RPC
+	depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	help
 	  LMbench is a suite of simple, portable,
 	  ANSI/C microbenchmarks for UNIX/POSIX.
@@ -9,4 +9,4 @@ config BR2_PACKAGE_LMBENCH
 	  http://sourceforge.net/projects/lmbench/
 
 comment "lmbench requires a toolchain with RPC support"
-	depends on !BR2_INET_RPC
+	depends on !BR2_TOOLCHAIN_HAS_NATIVE_RPC
diff --git a/package/netkitbase/Config.in b/package/netkitbase/Config.in
index 725e500..75bd728 100644
--- a/package/netkitbase/Config.in
+++ b/package/netkitbase/Config.in
@@ -1,10 +1,10 @@
 config BR2_PACKAGE_NETKITBASE
 	bool "netkitbase"
-	depends on BR2_INET_RPC
+	depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	help
 	  Old-style inetd.
 
 	  ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/
 
 comment "netkitbase requires a toolchain with RPC support"
-        depends on !BR2_INET_RPC
+        depends on !BR2_TOOLCHAIN_HAS_NATIVE_RPC
diff --git a/package/netkittelnet/Config.in b/package/netkittelnet/Config.in
index 058d210..10eb022 100644
--- a/package/netkittelnet/Config.in
+++ b/package/netkittelnet/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_NETKITTELNET
 	bool "netkittelnet"
-	depends on BR2_INET_RPC
+	depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_PACKAGE_NETKITBASE
 	help
 	  Standard Linux telnet client and server.
@@ -8,4 +8,4 @@ config BR2_PACKAGE_NETKITTELNET
 	  ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/
 
 comment "netkittelnet requires a toolchain with RPC support"
-	depends on !BR2_INET_RPC
+	depends on !BR2_TOOLCHAIN_HAS_NATIVE_RPC
diff --git a/package/nfs-utils/Config.in b/package/nfs-utils/Config.in
index 67d25a7..c87502f 100644
--- a/package/nfs-utils/Config.in
+++ b/package/nfs-utils/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_NFS_UTILS
 	bool "nfs-utils"
-	depends on BR2_INET_RPC
+	depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	depends on BR2_LARGEFILE
 	select BR2_PACKAGE_PORTMAP
 	help
@@ -11,7 +11,7 @@ config BR2_PACKAGE_NFS_UTILS
 	  http://sourceforge.net/projects/nfs
 
 comment "nfs-utils requires a toolchain with RPC and LARGEFILE support"
-	depends on !BR2_INET_RPC || !BR2_LARGEFILE
+	depends on !BR2_TOOLCHAIN_HAS_NATIVE_RPC || !BR2_LARGEFILE
 
 menu "NFS utilities selection"
 	depends on BR2_PACKAGE_NFS_UTILS
diff --git a/package/portmap/Config.in b/package/portmap/Config.in
index 5914357..f017cb6 100644
--- a/package/portmap/Config.in
+++ b/package/portmap/Config.in
@@ -1,10 +1,10 @@
 config BR2_PACKAGE_PORTMAP
 	bool "portmap"
-	depends on BR2_INET_RPC
+	depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	help
 	  The standard portmapper for RPC services.
 
 	  http://neil.brown.name/portmap/
 
 comment "portmap requires a toolchain with RPC support"
-	depends on !BR2_INET_RPC
+	depends on !BR2_TOOLCHAIN_HAS_NATIVE_RPC
diff --git a/package/quota/Config.in b/package/quota/Config.in
index 3ad0b8c..a26f91f 100644
--- a/package/quota/Config.in
+++ b/package/quota/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_QUOTA
 	bool "quota"
-	depends on BR2_INET_RPC
+	depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	depends on BR2_LARGEFILE
 	depends on BR2_USE_WCHAR
 	select BR2_PACKAGE_UTIL_LINUX
@@ -12,4 +12,4 @@ config BR2_PACKAGE_QUOTA
 	  http://sourceforge.net/projects/linuxquota/
 
 comment "quota requires a toolchain with RPC + LARGEFILE + WCHAR support"
-	depends on !(BR2_INET_RPC && BR2_LARGEFILE && BR2_USE_WCHAR)
+	depends on !(BR2_TOOLCHAIN_HAS_NATIVE_RPC && BR2_LARGEFILE && BR2_USE_WCHAR)
diff --git a/package/samba/samba.mk b/package/samba/samba.mk
index 7c06e14..7dd0a1d 100644
--- a/package/samba/samba.mk
+++ b/package/samba/samba.mk
@@ -51,7 +51,7 @@ SAMBA_CONF_OPT = \
 	\
 	--without-cluster-support \
 	--without-dnsupdate \
-	$(if $(BR2_INET_RPC),--with-sys-quotas,--without-sys-quotas) \
+	$(if $(BR2_TOOLCHAIN_HAS_NATIVE_RPC),--with-sys-quotas,--without-sys-quotas) \
 	--without-ads \
 	--without-ldap \
 	--with-included-iniparser \
diff --git a/package/xinetd/xinetd.mk b/package/xinetd/xinetd.mk
index 4fc2de9..a420425 100644
--- a/package/xinetd/xinetd.mk
+++ b/package/xinetd/xinetd.mk
@@ -9,7 +9,7 @@ XINETD_SITE          = http://www.xinetd.org
 XINETD_LICENSE       = xinetd license
 XINETD_LICENSE_FILES = COPYRIGHT
 
-ifneq ($(BR2_INET_RPC),y)
+ifneq ($(BR2_TOOLCHAIN_HAS_NATIVE_RPC),y)
 XINETD_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -DNO_RPC"
 endif
 
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 497cfff..34e9c17 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -202,7 +202,7 @@ check_glibc = \
 	fi; \
 	$(call check_glibc_feature,BR2_LARGEFILE,Large file support) ;\
 	$(call check_glibc_feature,BR2_INET_IPV6,IPv6 support) ;\
-	$(call check_glibc_feature,BR2_INET_RPC,RPC support) ;\
+	$(call check_glibc_feature,BR2_TOOLCHAIN_HAS_NATIVE_RPC,RPC support) ;\
 	$(call check_glibc_feature,BR2_ENABLE_LOCALE,Locale support) ;\
 	$(call check_glibc_feature,BR2_USE_MMU,MMU support) ;\
 	$(call check_glibc_feature,BR2_USE_WCHAR,Wide char support)
@@ -248,7 +248,7 @@ check_uclibc = \
 	$(call check_uclibc_feature,__ARCH_USE_MMU__,BR2_USE_MMU,$${UCLIBC_CONFIG_FILE},MMU support) ;\
 	$(call check_uclibc_feature,__UCLIBC_HAS_LFS__,BR2_LARGEFILE,$${UCLIBC_CONFIG_FILE},Large file support) ;\
 	$(call check_uclibc_feature,__UCLIBC_HAS_IPV6__,BR2_INET_IPV6,$${UCLIBC_CONFIG_FILE},IPv6 support) ;\
-	$(call check_uclibc_feature,__UCLIBC_HAS_RPC__,BR2_INET_RPC,$${UCLIBC_CONFIG_FILE},RPC support) ;\
+	$(call check_uclibc_feature,__UCLIBC_HAS_RPC__,BR2_TOOLCHAIN_HAS_NATIVE_RPC,$${UCLIBC_CONFIG_FILE},RPC support) ;\
 	$(call check_uclibc_feature,__UCLIBC_HAS_LOCALE__,BR2_ENABLE_LOCALE,$${UCLIBC_CONFIG_FILE},Locale support) ;\
 	$(call check_uclibc_feature,__UCLIBC_HAS_WCHAR__,BR2_USE_WCHAR,$${UCLIBC_CONFIG_FILE},Wide char support) ;\
 	$(call check_uclibc_feature,__UCLIBC_HAS_THREADS__,BR2_TOOLCHAIN_HAS_THREADS,$${UCLIBC_CONFIG_FILE},Thread support) ;\
diff --git a/toolchain/toolchain-buildroot/Config.in.2 b/toolchain/toolchain-buildroot/Config.in.2
index 7580946..956ec2f 100644
--- a/toolchain/toolchain-buildroot/Config.in.2
+++ b/toolchain/toolchain-buildroot/Config.in.2
@@ -20,7 +20,7 @@ config BR2_TOOLCHAIN_BUILDROOT_INET_IPV6
 
 config BR2_TOOLCHAIN_BUILDROOT_INET_RPC
 	bool "Enable RPC support"
-	select BR2_INET_RPC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	help
 	  Enable this option if you want your toolchain to support
 	  RPC (needed for NFS, for example).
diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in
index 10950ba..4c2a28b 100644
--- a/toolchain/toolchain-common.in
+++ b/toolchain/toolchain-common.in
@@ -11,7 +11,7 @@ config BR2_LARGEFILE
 config BR2_INET_IPV6
 	bool
 
-config BR2_INET_RPC
+config BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	bool
 
 config BR2_USE_WCHAR
diff --git a/toolchain/toolchain-crosstool-ng/Config.in b/toolchain/toolchain-crosstool-ng/Config.in
index 35ea2b1..9cd5ca5 100644
--- a/toolchain/toolchain-crosstool-ng/Config.in
+++ b/toolchain/toolchain-crosstool-ng/Config.in
@@ -14,7 +14,9 @@ config BR2_TOOLCHAIN_CTNG_eglibc
 	bool "eglibc"
 	select BR2_LARGEFILE
 	select BR2_INET_IPV6
-	select BR2_INET_RPC
+	# Our default ct-ng configuration uses eglibc 2.12, which has
+	# native RPC support
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_ENABLE_LOCALE
 	select BR2_USE_WCHAR
 
@@ -22,7 +24,9 @@ config BR2_TOOLCHAIN_CTNG_glibc
 	bool "glibc"
 	select BR2_LARGEFILE
 	select BR2_INET_IPV6
-	select BR2_INET_RPC
+	# Our default ct-ng configuration uses glibc 2.9, which has
+	# native RPC support
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_ENABLE_LOCALE
 	select BR2_USE_WCHAR
 
@@ -66,7 +70,7 @@ config BR2_TOOLCHAIN_CTNG_uClibc_INET_IPV6
 
 config BR2_TOOLCHAIN_CTNG_uClibc_INET_RPC
 	bool "Enable RPC support"
-	select BR2_INET_RPC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	help
 	  Enable this option if you want your toolchain to support
 	  RPC (needed for NFS, for example).
diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index 105fb2a..8d3240a 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -450,7 +450,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103
 	depends on BR2_sh2a
 	select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
 	select BR2_LARGEFILE
-	select BR2_INET_RPC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_USE_WCHAR
 	select BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
@@ -467,7 +467,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009
 	depends on BR2_sh2a
 	select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
 	select BR2_LARGEFILE
-	select BR2_INET_RPC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_USE_WCHAR
 	select BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
@@ -528,7 +528,7 @@ config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_LARGEFILE
 	select BR2_INET_IPV6
-	select BR2_INET_RPC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_USE_WCHAR
 	select BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
@@ -543,7 +543,7 @@ config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2011R1
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_LARGEFILE
 	select BR2_INET_IPV6
-	select BR2_INET_RPC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_USE_WCHAR
 	select BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
@@ -558,7 +558,7 @@ config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_LARGEFILE
 	select BR2_INET_IPV6
-	select BR2_INET_RPC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_USE_WCHAR
 	select BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
@@ -668,7 +668,7 @@ config BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	bool
 	select BR2_LARGEFILE
 	select BR2_INET_IPV6
-	select BR2_INET_RPC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_USE_WCHAR
 	select BR2_ENABLE_LOCALE
 	select BR2_TOOLCHAIN_HAS_THREADS
@@ -722,7 +722,7 @@ config BR2_TOOLCHAIN_EXTERNAL_INET_IPV6
 
 config BR2_TOOLCHAIN_EXTERNAL_INET_RPC
 	bool "Toolchain has RPC support?"
-	select BR2_INET_RPC
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	help
 	  Select this option if your external toolchain supports
 	  RPC. If you don't know, leave the default value, Buildroot
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 43d747c..459bc12 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -24,10 +24,10 @@
 #  the Buildroot configuration system knows whether the toolchain
 #  supports RPC, IPv6, locales, large files, etc. Unfortunately, these
 #  things cannot be detected automatically, since the value of these
-#  options (such as BR2_INET_RPC) are needed at configuration time
-#  because these options are used as dependencies for other
-#  options. And at configuration time, we are not able to retrieve the
-#  external toolchain configuration.
+#  options (such as BR2_TOOLCHAIN_HAS_NATIVE_RPC) are needed at
+#  configuration time because these options are used as dependencies
+#  for other options. And at configuration time, we are not able to
+#  retrieve the external toolchain configuration.
 #
 #  3. Copy the libraries needed at runtime to the target directory,
 #  $(TARGET_DIR). Obviously, things such as the C library, the dynamic
-- 
1.7.9.5

^ permalink raw reply related

* [Buildroot] [PATCH 03/18] toolchain-crosstool-ng: use the Crosstool-ng config options instead of the common hidden ones
From: Thomas Petazzoni @ 2012-11-03 17:47 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <cover.1351964808.git.thomas.petazzoni@free-electrons.com>

Since we are some day going to finally rename the badly named common
toolchain options (BR2_USE_WCHAR, BR2_ENABLE_LOCALE, BR2_INET_RPC,
etc.) into something more logical, let's start using the Crosstool-NG
toolchain options in the Crosstool-NG code.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
 toolchain/toolchain-crosstool-ng/crosstool-ng.mk |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk b/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
index e46bb20..5f9119d 100644
--- a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
+++ b/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
@@ -268,7 +268,7 @@ CTNG_FIX_DOT_CONFIG_PATHS_SED += s:^(CT_SYSROOT_DIR_PREFIX)=.*:\1="":;
 ifeq ($(BR2_TOOLCHAIN_CTNG_uClibc),y)
 
 # Handle the locales option
-ifneq ($(call qstrip,$(BR2_ENABLE_LOCALE)),)
+ifneq ($(call qstrip,$(BR2_TOOLCHAIN_CTNG_uClibc_LOCALE)),)
 CTNG_FIX_DOT_CONFIG_SED += s:^\# (CT_LIBC_UCLIBC_LOCALES) is not set:\1=y\n\# CT_LIBC_UCLIBC_LOCALES_PREGEN_DATA is not set:;
 CTNG_FIX_DOT_CONFIG_SED += s:^(CT_LIBC_UCLIBC_LOCALES_PREGEN_DATA)=.*:\# \1 is not set:;
 else
@@ -276,28 +276,28 @@ CTNG_FIX_DOT_CONFIG_SED += s:^(CT_LIBC_UCLIBC_LOCALES)=.*:\# \1 is not set:;
 endif
 
 # Handle the wide-char option
-ifneq ($(call qstrip,$(BR2_USE_WCHAR)),)
+ifneq ($(call qstrip,$(BR2_TOOLCHAIN_CTNG_uClibc_WCHAR)),)
 CTNG_FIX_DOT_CONFIG_SED += s:^\# (CT_LIBC_UCLIBC_WCHAR) is not set:\1=y:;
 else
 CTNG_FIX_DOT_CONFIG_SED += s:^(CT_LIBC_UCLIBC_WCHAR)=.*:\# \1 is not set:;
 endif
 
 # Handle the LFS option
-ifneq ($(call qstrip,$(BR2_LARGEFILE)),)
+ifneq ($(call qstrip,$(BR2_TOOLCHAIN_CTNG_uClibc_LARGEFILE)),)
 CTNG_FIX_DOT_CONFIG_LIBC_SED += s:^\# (UCLIBC_HAS_LFS) is not set:\1=y:;
 else
 CTNG_FIX_DOT_CONFIG_LIBC_SED += s:^(UCLIBC_HAS_LFS)=.*:\# \1 is not set:;
 endif
 
 # Handle the IPv6 option
-ifneq ($(call qstrip,$(BR2_INET_IPV6)),)
+ifneq ($(call qstrip,$(BR2_TOOLCHAIN_CTNG_uClibc_INET_IPV6)),)
 CTNG_FIX_DOT_CONFIG_LIBC_SED += s:^\# (UCLIBC_HAS_IPV6) is not set:\1=y:;
 else
 CTNG_FIX_DOT_CONFIG_LIBC_SED += s:^(UCLIBC_HAS_IPV6)=.*:\# \1 is not set:;
 endif
 
 # Handle the RPC option
-ifneq ($(call qstrip,$(BR2_INET_RPC)),)
+ifneq ($(call qstrip,$(BR2_TOOLCHAIN_CTNG_uClibc_INET_RPC)),)
 CTNG_FIX_DOT_CONFIG_LIBC_SED += s:^\# (UCLIBC_HAS_RPC) is not set:\1=y\nUCLIBC_HAS_FULL_RPC=y\nUCLIBC_HAS_REENTRANT_RPC=y:;
 CTNG_FIX_DOT_CONFIG_LIBC_SED += s:^\# (UCLIBC_HAS_FULL_RPC) is not set:\1=y:;
 CTNG_FIX_DOT_CONFIG_LIBC_SED += s:^\# (UCLIBC_HAS_REENTRANT_RPC) is not set:\1=y:;
-- 
1.7.9.5

^ permalink raw reply related

* [Buildroot] [PATCH 02/18] busybox: don't force FEATURE_NFS_MOUNT
From: Thomas Petazzoni @ 2012-11-03 17:47 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <cover.1351964808.git.thomas.petazzoni@free-electrons.com>

Instead of making the Busybox configuration more complicated by trying
to adjust it depending on whether RPC is available or not (which gets
complicated when RPC support can be provided by libtirpc), simplify
things by letting the user enable FEATURE_NFS_MOUNT or not depending
on whether RPC support is available or not.

Our default configuration do not enable FEATURE_NFS_MOUNT, so users
will not face any build problems by default. Only if they explicitly
enable FEATURE_NFS_MOUNT will they have to make sure that the
toolchain has RPC support, or that libtirpc is enabled (support for
this added in a followup patch).

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/busybox/busybox.mk |   11 -----------
 1 file changed, 11 deletions(-)

diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index 33f8633..306b46f 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -81,17 +81,6 @@ define BUSYBOX_SET_IPV6
 endef
 endif
 
-# If RPC is enabled then enable nfs mounts
-ifeq ($(BR2_INET_RPC),y)
-define BUSYBOX_SET_RPC
-	$(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_MOUNT_NFS,$(BUSYBOX_BUILD_CONFIG))
-endef
-else
-define BUSYBOX_SET_RPC
-	$(call KCONFIG_DISABLE_OPT,CONFIG_FEATURE_MOUNT_NFS,$(BUSYBOX_BUILD_CONFIG))
-endef
-endif
-
 # If we're using static libs do the same for busybox
 ifeq ($(BR2_PREFER_STATIC_LIB),y)
 define BUSYBOX_PREFER_STATIC
-- 
1.7.9.5

^ permalink raw reply related

* [Buildroot] [PATCH 01/18] uClibc: use the Buildroot toolchain options instead of the hidden common options
From: Thomas Petazzoni @ 2012-11-03 17:47 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <cover.1351964808.git.thomas.petazzoni@free-electrons.com>

Since we are some day going to finally rename the badly named common
toolchain options (BR2_USE_WCHAR, BR2_ENABLE_LOCALE, BR2_INET_RPC,
etc.) into something more logical, let's start using the Buildroot
toolchain options in the uClibc code.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/uClibc/uclibc.mk |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk
index d1cd718..14430d7 100644
--- a/toolchain/uClibc/uclibc.mk
+++ b/toolchain/uClibc/uclibc.mk
@@ -230,19 +230,19 @@ ifneq ($(UCLIBC_TARGET_ENDIAN),)
 		-e 's/.*\(ARCH_WANTS_$(UCLIBC_TARGET_ENDIAN)_ENDIAN\).*/\1=y/g' \
 		$(UCLIBC_DIR)/.oldconfig
 endif
-ifeq ($(BR2_LARGEFILE),y)
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT_LARGEFILE),y)
 	$(SED) 's,.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=y,g' $(UCLIBC_DIR)/.oldconfig
 else
 	$(SED) 's,.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=n,g' $(UCLIBC_DIR)/.oldconfig
 	$(SED) '/.*UCLIBC_HAS_FOPEN_LARGEFILE_MODE.*/d' $(UCLIBC_DIR)/.oldconfig
 	echo "# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set" >> $(UCLIBC_DIR)/.oldconfig
 endif
-ifeq ($(BR2_INET_IPV6),y)
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT_INET_IPV6),y)
 	$(SED) 's,^.*UCLIBC_HAS_IPV6.*,UCLIBC_HAS_IPV6=y,g' $(UCLIBC_DIR)/.oldconfig
 else
 	$(SED) 's,^.*UCLIBC_HAS_IPV6.*,UCLIBC_HAS_IPV6=n,g' $(UCLIBC_DIR)/.oldconfig
 endif
-ifeq ($(BR2_INET_RPC),y)
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT_INET_RPC),y)
 	$(SED) 's,^.*UCLIBC_HAS_RPC.*,UCLIBC_HAS_RPC=y,g' \
 		-e 's,^.*UCLIBC_HAS_FULL_RPC.*,UCLIBC_HAS_FULL_RPC=y,g' \
 		-e 's,^.*UCLIBC_HAS_REENTRANT_RPC.*,UCLIBC_HAS_REENTRANT_RPC=y,g' \
@@ -302,12 +302,12 @@ ifeq ($(BR2_PTHREAD_DEBUG),y)
 else
 	echo "# PTHREADS_DEBUG_SUPPORT is not set" >> $(UCLIBC_DIR)/.oldconfig
 endif
-ifeq ($(BR2_ENABLE_LOCALE),y)
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT_LOCALE),y)
 	$(SED) 's,^.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=y\n# UCLIBC_BUILD_ALL_LOCALE is not set\nUCLIBC_BUILD_MINIMAL_LOCALE=y\nUCLIBC_BUILD_MINIMAL_LOCALES="$(UCLIBC_LOCALES)"\nUCLIBC_PREGENERATED_LOCALE_DATA=n\nUCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA=n\nUCLIBC_HAS_XLOCALE=y\nUCLIBC_HAS_GLIBC_DIGIT_GROUPING=n\n,g' $(UCLIBC_DIR)/.oldconfig
 else
 	$(SED) 's,^.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=n,g' $(UCLIBC_DIR)/.oldconfig
 endif
-ifeq ($(BR2_USE_WCHAR),y)
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT_WCHAR),y)
 	$(SED) 's,^.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g' $(UCLIBC_DIR)/.oldconfig
 else
 	$(SED) 's,^.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=n,g' $(UCLIBC_DIR)/.oldconfig
-- 
1.7.9.5

^ permalink raw reply related

* [Buildroot] [pull request] Pull request for branch for-2012.11/rpc-support
From: Thomas Petazzoni @ 2012-11-03 17:47 UTC (permalink / raw)
  To: buildroot

Hello,

This set of patches reworks the RPC support to take into account newer
glibc versions that do not provide RPC support.

Compared to the previous posting (August, 11th), the changes are
mainly:

 * libtirpc is now automatically selected (like any other library) by
   packages needing RPC support and no RPC support is available from
   the toolchain

 * if there is RPC support in the toolchain but libtirpc is available,
   then libtirpc will be used (i.e we're passing the compiler and
   linker flags needed for the packages to find libtirpc)

 * removal of the patch adding the ARM CodeSourcery toolchain, since
   this toolchain in fact had RPC support, and it was merged
   separately.

 * removal of the patches converting netkitbase and netkittelnet to
   the package infrastructure, since those were merged separately
   thanks to the work of Samuel Martin.

 * some other minor fixes done after comments of the first review
   (typos in help text, issue with some toolchains was fixed, etc.)

Note that patches 1, 2, 3, 4, 17, 18 can be comitted separately from
the other patches.

In order to help in the review, here is a step by step description of
what is being done:

 * Patch 1 changes uclibc.mk to use the BR2_TOOLCHAIN_BUILDROOT_*
   options instead of directly BR2_LARGEFILE/BR2_INET_IPV6, etc. This
   is not strictly needed, but since BR2_INET_RPC is going to be
   renamed in later patches, it helps to use BR2_TOOLCHAIN_BUILDROOT_*
   everywhere. It is also more logical since the
   BR2_TOOLCHAIN_BUILDROOT_* options are defined by the internal
   Buildroot toolchain backend, so it makes sense to use those options
   in uclibc.mk which is part of this toolchain backend.

 * Patch 2 simplifies the Busybox recipe to do mess up with
   FEATURE_NFS_MOUNT automatically. Instead, we leave the default of
   our configuration files (FEATURE_NFS_MOUNT is disabled), and if the
   user wants it, (s)he'll enable it. This will simplify how to handle
   Busybox with regard to libtirpc.

 * Patch 3 does the same thing as patch 1, but for the Crosstool-NG
   backend.

 * Patch 4 makes a naive rename BR2_INET_RPC to
   BR2_TOOLCHAIN_HAS_NATIVE_RPC. This name better describes what it
   means: whether the toolchain has or does not have RPC support (the
   RPC support will later have the capability of being provided by
   libtirpc, outside of the toolchain).

 * Patch 5 enhance the external toolchain logic around the RPC
   support. Basically, the BR2_TOOLCHAIN_EXTERNAL_GLIBC option no
   longer unconditionally selects BR2_TOOLCHAIN_HAS_NATIVE_RPC since
   there are glibc toolchains that don't have RPC support. All the
   predefined toolchain profiles are updated to take into account this
   change: for the moment, all glibc toolchains that have pre-defined
   toolchains have RPC support, but further patches in the series add
   pre-defined glibc toolchains that don't have RPC support. In the
   case of custom glibc toolchains, a question is asked to the user so
   that he can say whether the external glibc toolchain has RPC
   support or not. The validity of this configuration option is
   checked by the new check_glibc_rpc_feature function in helpers.mk.

 * Patch 6 adds a package for libtirpc, with a bunch of patches to
   make its compilation work properly on top of uClibc.

   What is worth noting is that the libtirpc package is only available
   if the toolchain does not have RPC support. We for now assume that
   the user will want to use the internal RPC support of the toolchain
   if available rather than libtirpc. Note that this choice may be
   changed in the future, as the RPC support in libtirpc may have more
   features than the one provided by the toolchain.

   The other thing that this package Config.in file provides is the
   BR2_RPC_SUPPORT_AVAILABLE option, which tells whether the toolchain
   has RPC support *OR* libtirpc is enabled. Packages needing RPC
   support can therefore "depends on" this.

 * Patch 7 adjust the Busybox build process to use libtirpc if
   available. We do not 'select' libtirpc if the RPC support is not
   available in the toolchain, as we don't want a simple program such
   as Busybox to carry dependencies without the user noticing. Since
   we're not enabling FEATURE_NFS_MOUNT automatically (as per patch
   2), this libtirpc will only be used is (1) libtirpc is selected and
   (2) the user has manually enabled FEATURE_NFS_MOUNT.

 * Patch 8 makes it possible to link lmbench against libtirpc. Nothing
   special to mention here.

 * Patch 9 makes it possible to link nfs-utils against libtirpc. The
   only thing worth mentionning is that I removed the select on
   BR2_PACKAGE_PORTMAP. This select was not a build-time dependency,
   but a run-time dependency, and nowadays, nfs-utils can work
   together with rpcbind rather than portmap (which is deprecated).

 * Patch 10 adds a package for rpcbind, the modern replacement for
   portmap. This package directly selects libtirpc. Question: how
   should it behave with toolchains having internal RPC support?

 * Patch 11 adds a small comment in portmap saying that rpcbind is the
   newer replacement. Portmap doesn't link properly against libtirpc,
   and it probably isn't worth fixing it. Question: should I mark
   portmap as deprecated?

 * Patch 12 makes it possible to link quota against libtirpc. Nothing
   special to mention here.

 * Patch 13 changes how the --with-sys-quotas option is handled by
   Samba. This option does not depend on RPC support in the toolchain
   apparently.

 * Patch 14 makes it possible to link xinetd against libtirpc. Nothing
   special to mention here.

 * Patches 15-16 add the latest Sourcery CodeBench toolchain for x86
   and SH4. Those glibc toolchains use glibc 2.15 and therefore do not
   have RPC support.

 * Patches 17-18 makes netkitbase and netkittelnet packages
   deprecated.

Thanks!

Thomas

The following changes since commit 5a61fbd82394f9bc9317535b717a2e1dd51dea7d:

  fs/skeleton: remove /etc/TZ (2012-10-24 09:16:50 +0200)

are available in the git repository at:

  git://git.free-electrons.com/users/thomas-petazzoni/buildroot.git for-2012.11/rpc-support

for you to fetch changes up to 0003a7e4a071871640d8d842c6838611bf210ae5:

  netkittelnet: mark as deprecated (2012-11-03 18:45:57 +0100)

----------------------------------------------------------------
Thomas Petazzoni (18):
      uClibc: use the Buildroot toolchain options instead of the hidden common options
      busybox: don't force FEATURE_NFS_MOUNT
      toolchain-crosstool-ng: use the Crosstool-ng config options instead of the common hidden ones
      Rename BR2_INET_RPC to BR2_TOOLCHAIN_HAS_NATIVE_RPC
      toolchain-external: improve glibc support to test availability of RPC
      libtirpc: new package
      busybox: add support to link against libtirpc when available
      lmbench: add support to use libtirpc when available
      nfs-utils: add support to use RPC support from libtirpc
      rpcbind: new package
      portmap: mention that rpcbind is the project that superseds portmap
      quota: add support to use RPC support from libtirpc
      samba: unconditionally enable --with-sys-quotas
      xinetd: add support to use RPC support from libtirpc
      toolchain-external: add Sourcery CodeBench SuperH 2012.03
      toolchain-external: add Sourcery CodeBench x86 2012.03
      netkitbase: mark as deprecated
      netkittelnet: mark as deprecated

 package/Config.in                                  |    2 +
 package/busybox/busybox.mk                         |   30 ++++---
 package/libtirpc/Config.in                         |    7 ++
 ...able-parts-of-TIRPC-requiring-NIS-support.patch |   70 +++++++++++++++
 ...out-RPC-support-does-not-install-rpcent.h.patch |   26 ++++++
 ...btirpc-0003-Add-missing-INET6-conditional.patch |   60 +++++++++++++
 .../libtirpc-0004-Make-IPv6-support-optional.patch |   43 +++++++++
 package/libtirpc/libtirpc.mk                       |   17 ++++
 package/lmbench/Config.in                          |    6 +-
 package/lmbench/lmbench.mk                         |   11 ++-
 package/netkitbase/Config.in                       |    5 +-
 package/netkittelnet/Config.in                     |    5 +-
 package/nfs-utils/Config.in                        |    7 +-
 package/nfs-utils/nfs-utils.mk                     |    8 +-
 package/portmap/Config.in                          |    6 +-
 package/quota/Config.in                            |    6 +-
 package/quota/quota.mk                             |   13 ++-
 package/rpcbind/Config.in                          |    8 ++
 package/rpcbind/rpcbind-01-no-yp-support.patch     |   46 ++++++++++
 package/rpcbind/rpcbind.mk                         |   17 ++++
 package/samba/samba.mk                             |    2 +-
 package/xinetd/xinetd.mk                           |   19 +++-
 toolchain/helpers.mk                               |   29 ++++--
 toolchain/toolchain-buildroot/Config.in.2          |    2 +-
 toolchain/toolchain-common.in                      |    2 +-
 toolchain/toolchain-crosstool-ng/Config.in         |   10 ++-
 toolchain/toolchain-crosstool-ng/crosstool-ng.mk   |   10 +--
 toolchain/toolchain-external/Config.in             |   93 +++++++++++++++++---
 toolchain/toolchain-external/ext-tool.mk           |   14 ++-
 toolchain/uClibc/uclibc.mk                         |   10 +--
 30 files changed, 507 insertions(+), 77 deletions(-)
 create mode 100644 package/libtirpc/Config.in
 create mode 100644 package/libtirpc/libtirpc-0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch
 create mode 100644 package/libtirpc/libtirpc-0002-uClibc-without-RPC-support-does-not-install-rpcent.h.patch
 create mode 100644 package/libtirpc/libtirpc-0003-Add-missing-INET6-conditional.patch
 create mode 100644 package/libtirpc/libtirpc-0004-Make-IPv6-support-optional.patch
 create mode 100644 package/libtirpc/libtirpc.mk
 create mode 100644 package/rpcbind/Config.in
 create mode 100644 package/rpcbind/rpcbind-01-no-yp-support.patch
 create mode 100644 package/rpcbind/rpcbind.mk

Thanks,
-- 
Thomas Petazzoni

^ permalink raw reply

* [Buildroot] [git commit] cmake: bump version to 2.8.9
From: Peter Korsgaard @ 2012-11-03 17:35 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=cc77d6437d9a25de746596e127e230fac8f99286
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Signed-off-by: Thiago A. Correa <thiago.correa@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 package/cmake/cmake.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/package/cmake/cmake.mk b/package/cmake/cmake.mk
index 2406e5c..e2bc31f 100644
--- a/package/cmake/cmake.mk
+++ b/package/cmake/cmake.mk
@@ -1,4 +1,4 @@
-CMAKE_VERSION = 2.8.5
+CMAKE_VERSION = 2.8.9
 CMAKE_SITE = http://www.cmake.org/files/v2.8/
 
 define HOST_CMAKE_CONFIGURE_CMDS

^ permalink raw reply related

* [Buildroot] [git commit] qextserialport: new package
From: Peter Korsgaard @ 2012-11-03 17:35 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=7eca96e65f750e40d5cb558acf45b906bb6453e6
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

[Peter: adjust for BR changes]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 package/Config.in                                  |    1 +
 package/qextserialport/Config.in                   |    9 +++++
 .../qextserialport-main-include.patch              |   15 ++++++++
 .../qextserialport-no-examples.patch               |   17 +++++++++
 .../qextserialport/qextserialport-pkgconfig.patch  |   19 +++++++++++
 package/qextserialport/qextserialport.mk           |   35 ++++++++++++++++++++
 6 files changed, 96 insertions(+), 0 deletions(-)

diff --git a/package/Config.in b/package/Config.in
index 2ac2568..fd2703e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -138,6 +138,7 @@ source "package/qt/Config.in"
 
 if BR2_PACKAGE_QT
 comment "QT libraries and helper libraries"
+source "package/qextserialport/Config.in"
 source "package/qtuio/Config.in"
 endif
 
diff --git a/package/qextserialport/Config.in b/package/qextserialport/Config.in
new file mode 100644
index 0000000..4e92ecf
--- /dev/null
+++ b/package/qextserialport/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_QEXTSERIALPORT
+	bool "qextserialport"
+	# Qt is a big library, we don't want to select it
+	# automatically without the user knowing
+	depends on BR2_PACKAGE_QT
+	help
+	  A Qt library to manage serial ports
+
+	  http://code.google.com/p/qextserialport/
diff --git a/package/qextserialport/qextserialport-main-include.patch b/package/qextserialport/qextserialport-main-include.patch
new file mode 100644
index 0000000..858f335
--- /dev/null
+++ b/package/qextserialport/qextserialport-main-include.patch
@@ -0,0 +1,15 @@
+Create a main include file QExtSerialPort
+
+This main include file will be installed in
+<QExtSerialPort/QExtSerialPort> so that Qt applications can use this
+library by including header files in a Qt-like style.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: qextserialport-ef4af2a2ee3f/src/QExtSerialPort
+===================================================================
+--- /dev/null
++++ qextserialport-ef4af2a2ee3f/src/QExtSerialPort
+@@ -0,0 +1,2 @@
++#include "qextserialport.h"
++#include "qextserialenumerator.h"
diff --git a/package/qextserialport/qextserialport-no-examples.patch b/package/qextserialport/qextserialport-no-examples.patch
new file mode 100644
index 0000000..c7d2d41
--- /dev/null
+++ b/package/qextserialport/qextserialport-no-examples.patch
@@ -0,0 +1,17 @@
+Disable compilation of examples
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: qextserialport-ef4af2a2ee3f/qextserialport.pro
+===================================================================
+--- qextserialport-ef4af2a2ee3f.orig/qextserialport.pro
++++ qextserialport-ef4af2a2ee3f/qextserialport.pro
+@@ -1,7 +1,4 @@
+ #
+ TEMPLATE = subdirs
+ CONFIG   += ordered
+-SUBDIRS  = src \
+-           examples/enumerator \
+-           examples/event
+-
++SUBDIRS  = src
diff --git a/package/qextserialport/qextserialport-pkgconfig.patch b/package/qextserialport/qextserialport-pkgconfig.patch
new file mode 100644
index 0000000..d67f3fc
--- /dev/null
+++ b/package/qextserialport/qextserialport-pkgconfig.patch
@@ -0,0 +1,19 @@
+Add a pkgconfig file to ease usage with applications
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: qextserialport-ef4af2a2ee3f/qextserialport.pc
+===================================================================
+--- /dev/null
++++ qextserialport-ef4af2a2ee3f/qextserialport.pc
+@@ -0,0 +1,10 @@
++prefix=/usr
++exec_prefix=${prefix}
++libdir=${prefix}/lib
++includedir=${prefix}/include/QExtSerialPort
++
++Name: QtExtSerialPort
++Description: QtExtSerialPort library
++Version: 1.2.0
++Libs: -L${libdir} -lqextserialport
++Cflags: -I${includedir}
diff --git a/package/qextserialport/qextserialport.mk b/package/qextserialport/qextserialport.mk
new file mode 100644
index 0000000..6ffb9eb
--- /dev/null
+++ b/package/qextserialport/qextserialport.mk
@@ -0,0 +1,35 @@
+#############################################################
+#
+# qextserialport
+#
+#############################################################
+
+QEXTSERIALPORT_VERSION     = ef4af2a2ee3f
+QEXTSERIALPORT_SITE        = https://qextserialport.googlecode.com/hg/
+QEXTSERIALPORT_SITE_METHOD = hg
+
+QEXTSERIALPORT_DEPENDENCIES = qt
+
+QEXTSERIALPORT_INSTALL_STAGING = YES
+
+define QEXTSERIALPORT_CONFIGURE_CMDS
+	(cd $(@D); $(QT_QMAKE))
+endef
+
+define QEXTSERIALPORT_BUILD_CMDS
+	$(MAKE) -C $(@D)
+endef
+
+define QEXTSERIALPORT_INSTALL_STAGING_CMDS
+	mkdir -p $(STAGING_DIR)/usr/include/QExtSerialPort
+	cp $(@D)/src/*.h $(STAGING_DIR)/usr/include/QExtSerialPort/
+	cp $(@D)/src/QExtSerialPort $(STAGING_DIR)/usr/include/QExtSerialPort/
+	cp -a $(@D)/src/build/*.so* $(STAGING_DIR)/usr/lib/
+	cp $(@D)/qextserialport.pc $(STAGING_DIR)/usr/lib/pkgconfig/
+endef
+
+define QEXTSERIALPORT_INSTALL_TARGET_CMDS
+	cp -a $(@D)/src/build/*.so.* $(TARGET_DIR)/usr/lib
+endef
+
+$(eval $(generic-package))

^ permalink raw reply related

* [Buildroot] [PATCHv3] QtSerialPort: new package
From: Yegor Yefremov @ 2012-11-03 17:21 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <87y5iiy6pw.fsf@dell.be.48ers.dk>

On Sat, Nov 3, 2012 at 5:46 PM, Peter Korsgaard <jacmet@uclibc.org> wrote:
>>>>>> "Thiago" == Thiago A Correa <thiago.correa@gmail.com> writes:
>
> Hi,
>
>  Thiago> Signed-off-by: Thiago A. Correa <thiago.correa@gmail.com>
>  Thiago> ---
>  Thiago>  package/Config.in                    |    1 +
>  Thiago>  package/qtserialport/Config.in       |   12 +++++++++++
>  Thiago>  package/qtserialport/qtserialport.mk |   35 ++++++++++++++++++++++++++++++++++
>  Thiago>  3 files changed, 48 insertions(+), 0 deletions(-)
>  Thiago>  create mode 100644 package/qtserialport/Config.in
>  Thiago>  create mode 100644 package/qtserialport/qtserialport.mk
>
>  Thiago> diff --git a/package/Config.in b/package/Config.in
>  Thiago> index 331d879..e869c8a 100644
>  Thiago> --- a/package/Config.in
>  Thiago> +++ b/package/Config.in
>  Thiago> @@ -133,6 +133,7 @@ source "package/sdl_gfx/Config.in"
>  Thiago>  comment "other GUIs"
>  Thiago>  source "package/efl/Config.in"
>  Thiago>  source "package/qt/Config.in"
>  Thiago> +source "package/qtserialport/Config.in"

Don't we want to pull all pure Qt libs under "Qt external packages" as
was made with Python packages in Kconfig?

>  Thiago>  source "package/x11r7/Config.in"
>
> Thomas a while ago posted patches for qtextserialport:
>
> http://patchwork.ozlabs.org/patch/162431/
>
> What is the relation between qtserialport and qtextserialport? Do we
> need both?

The situation with serial port libraries under Qt is not so simple as
with Python. I know at least 3 different libraries. So having them all
won't hurt.

>  Thiago> +++ b/package/qtserialport/qtserialport.mk
>  Thiago> @@ -0,0 +1,35 @@
>  Thiago> +#############################################################
>  Thiago> +#
>  Thiago> +# QtSerialPort
>  Thiago> +#
>  Thiago> +#############################################################
>  Thiago> +QTSERIALPORT_VERSION = e831107f468618881e435932c8a42404c1dde13c
>  Thiago> +QTSERIALPORT_SITE = git://gitorious.org/qtplayground/qtserialport.git
>  Thiago> +QTSERIALPORT_LICENSE = LGPLv2
>  Thiago> +QTSERIALPORT_LICENSE_FILES = LICENSE.LGPL
>  Thiago> +QTSERIALPORT_INSTALL_STAGING = YES
>  Thiago> +
>  Thiago> +QTSERIALPORT_DEPENDENCIES = qt udev
>  Thiago> +
>  Thiago> +QTSERIALPORT_LDFLAGS = $(TARGET_LDFLAGS)
>  Thiago> +
>  Thiago> +define QTSERIALPORT_CONFIGURE_CMDS
>  Thiago> +      (cd $(@D); \
>  Thiago> +              $(QT_QMAKE) -recursive CONFIG+=release)
>  Thiago> +endef
>  Thiago> +
>  Thiago> +define QTSERIALPORT_BUILD_CMDS
>  Thiago> +      $(MAKE) -C $(@D)/src
>  Thiago> +endef
>  Thiago> +
>  Thiago> +define QTSERIALPORT_INSTALL_STAGING_CMDS
>  Thiago> +      $(MAKE) -C $(@D)/src install
>  Thiago> +      mv $(HOST_DIR)/usr/include/QtAddOnSerialPort $(STAGING_DIR)/usr/include/
>
> That seems funky. Why is it installing under HOST_DIR in the first
> place?
>
>  Thiago> +endef
>  Thiago> +
>  Thiago> +define QTSERIALPORT_INSTALL_TARGET_CMDS
>  Thiago> +      cp -dpfr $(STAGING_DIR)/usr/lib/libSerialPort.so.* \
>  Thiago> +      $(TARGET_DIR)/usr/lib
>
> Normally we install headers to target as well. Does the makefile install
> target not support DESTDIR?
>
> --
> Bye, Peter Korsgaard
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply

* [Buildroot] [PATCH] libhid: disable on avr32
From: Arnout Vandecappelle @ 2012-11-03 17:20 UTC (permalink / raw)
  To: buildroot

libhid uses timerfd, which is not yet available in the uClibc-0.9.31
that we have to rely on for avr32.  Since this is pretty much a corner
case, just disable libhid for avr32.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
Note: not build-tested, just looked at the menuconfig behaviour.

 package/libhid/Config.in |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/libhid/Config.in b/package/libhid/Config.in
index 093b98f..bd1cfcb 100644
--- a/package/libhid/Config.in
+++ b/package/libhid/Config.in
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_LIBHID
 	bool "libhid"
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
+	depends on !BR2_avr32 # timerfd not in uClibc-0.9.31
 	select BR2_PACKAGE_LIBUSB
 	select BR2_PACKAGE_LIBUSB_COMPAT
 	help
@@ -9,4 +10,4 @@ config BR2_PACKAGE_LIBHID
 	  http://libhid.alioth.debian.org
 
 comment "libhid needs a toolchain with thread support"
-	depends on !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_TOOLCHAIN_HAS_THREADS && !BR2_avr32
-- 
tg: (b72f3f6..) t/libhid-avr32 (depends on: master)

^ permalink raw reply related

* [Buildroot] [PATCH] use avr32linux.org mirror
From: Peter Korsgaard @ 2012-11-03 17:15 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1351960735-32716-1-git-send-email-arnout@mind.be>

>>>>> "Arnout" == Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> writes:

 Arnout> The avr32linux.org mirror has vanished and is replaced by a spam site
 Arnout> that returns HTML pages for whatever URL you request from it.  So the
 Arnout> download helper thinks that download has succeeded, while actually it
 Arnout> failed.

 Arnout> Fortunately, there is still a mirror of the site alive, so we can use
 Arnout> that one.

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit] use avr32linux.org mirror
From: Peter Korsgaard @ 2012-11-03 17:11 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=51f3425e3d6c69758c071b9327eecaa14b5e053a
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

The avr32linux.org mirror has vanished and is replaced by a spam site
that returns HTML pages for whatever URL you request from it.  So the
download helper thinks that download has succeeded, while actually it
failed.

Fortunately, there is still a mirror of the site alive, so we can use
that one.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 package/gadgetfs-test/gadgetfs-test.mk |    2 +-
 package/games/rubix/Config.in          |    2 +-
 package/games/rubix/rubix.mk           |    2 +-
 package/torsmo/Config.in               |    2 +-
 package/torsmo/torsmo.mk               |    2 +-
 package/xstroke/Config.in              |    2 +-
 package/xstroke/xstroke.mk             |    2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/package/gadgetfs-test/gadgetfs-test.mk b/package/gadgetfs-test/gadgetfs-test.mk
index 808618b..0fc8221 100644
--- a/package/gadgetfs-test/gadgetfs-test.mk
+++ b/package/gadgetfs-test/gadgetfs-test.mk
@@ -4,7 +4,7 @@
 #
 #############################################################
 GADGETFS_TEST_SOURCE=gadgetfs-test.tar.bz2
-GADGETFS_TEST_SITE=http://avr32linux.org/twiki/pub/Main/GadgetFsTest/
+GADGETFS_TEST_SITE=http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/GadgetFsTest/
 
 GADGETFS_TEST_MAKEOPTS = CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)"
 
diff --git a/package/games/rubix/Config.in b/package/games/rubix/Config.in
index 6da8c71..9cf5b46 100644
--- a/package/games/rubix/Config.in
+++ b/package/games/rubix/Config.in
@@ -4,4 +4,4 @@ config BR2_PACKAGE_RUBIX
 	help
 	  A 3D rubiks cube game for X
 
-	  http://avr32linux.org/twiki/pub/Main/Rubix
+	  http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/Rubix
diff --git a/package/games/rubix/rubix.mk b/package/games/rubix/rubix.mk
index 2087b51..d39d353 100644
--- a/package/games/rubix/rubix.mk
+++ b/package/games/rubix/rubix.mk
@@ -5,7 +5,7 @@
 #############################################################
 RUBIX_VERSION = 1.0.5
 RUBIX_SOURCE = rubix-$(RUBIX_VERSION).tar.bz2
-RUBIX_SITE = http://avr32linux.org/twiki/pub/Main/Rubix
+RUBIX_SITE = http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/Rubix
 RUBIX_INSTALL_TARGET_OPT = GAMESDIR=$(TARGET_DIR)/usr/games install
 
 RUBIX_MAKE_OPT = CC="$(TARGET_CC)" XINC="-I$(STAGING_DIR)/usr/include/X11" XLIB="-L$(STAGING_DIR)/usr/lib -lX11"
diff --git a/package/torsmo/Config.in b/package/torsmo/Config.in
index ec9cb22..b3aba39 100644
--- a/package/torsmo/Config.in
+++ b/package/torsmo/Config.in
@@ -4,4 +4,4 @@ config BR2_PACKAGE_TORSMO
 	help
 	  Torsmo is a system monitor that sits in the corner of your desktop.
 
-	  http://avr32linux.org/twiki/pub/Main/Torsmo
+	  http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/Torsmo
diff --git a/package/torsmo/torsmo.mk b/package/torsmo/torsmo.mk
index 1e3bd28..c42ce11 100644
--- a/package/torsmo/torsmo.mk
+++ b/package/torsmo/torsmo.mk
@@ -5,7 +5,7 @@
 #############################################################
 TORSMO_VERSION = 0.18
 TORSMO_SOURCE = torsmo-$(TORSMO_VERSION).tar.gz
-TORSMO_SITE = http://avr32linux.org/twiki/pub/Main/Torsmo
+TORSMO_SITE = http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/Torsmo
 
 # help2man doesn't work when cross compiling
 TORSMO_CONF_ENV = ac_cv_path_HELP2MAN=''
diff --git a/package/xstroke/Config.in b/package/xstroke/Config.in
index 5589fe6..54cb38e 100644
--- a/package/xstroke/Config.in
+++ b/package/xstroke/Config.in
@@ -7,4 +7,4 @@ config BR2_PACKAGE_XSTROKE
 	help
 	  Handwriting recognition for X
 
-	  http://avr32linux.org/twiki/pub/Main/XStroke
+	  http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/XStroke
diff --git a/package/xstroke/xstroke.mk b/package/xstroke/xstroke.mk
index d7d18db..3459545 100644
--- a/package/xstroke/xstroke.mk
+++ b/package/xstroke/xstroke.mk
@@ -5,7 +5,7 @@
 #############################################################
 XSTROKE_VERSION = 0.6
 XSTROKE_SOURCE = xstroke-$(XSTROKE_VERSION).tar.gz
-XSTROKE_SITE = http://avr32linux.org/twiki/pub/Main/XStroke
+XSTROKE_SITE = http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/XStroke
 
 XSTROKE_DEPENDENCIES = xlib_libXft xlib_libXtst xlib_libXpm
 

^ permalink raw reply related

* [Buildroot] [PATCH] gdb: adjust behavior when thread debug is not available
From: Peter Korsgaard @ 2012-11-03 16:54 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1338655156-4133-1-git-send-email-thomas.petazzoni@free-electrons.com>

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> When an external toolchain without thread debug is used, the gdb
 Thomas> package can be selected, but no version can be choosen, since none
 Thomas> match any of the requirements. This leads Buildroot to try to build
 Thomas> gdb for the target without a version being defined, as in the
 Thomas> following build log:

 Thomas>  http://autobuild.buildroot.org/results/84e8fd2df0cc22448052a572c2e9a6e03dd137eb/build-end.log

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [PATCH] legal-info: support per-package hooks
From: Luca Ceresoli @ 2012-11-03 16:52 UTC (permalink / raw)
  To: buildroot

Useful to produce extra warnings for packages that have special
licensing-related issues.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 docs/manual/adding-packages-generic.txt |    4 +++-
 package/pkg-generic.mk                  |    2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/docs/manual/adding-packages-generic.txt b/docs/manual/adding-packages-generic.txt
index d3a4abb..e1b46b0 100644
--- a/docs/manual/adding-packages-generic.txt
+++ b/docs/manual/adding-packages-generic.txt
@@ -349,7 +349,8 @@ of the package construction. The hooks are more useful for packages
 using the autotools infrastructure described below.  However, since
 they are provided by the generic infrastructure, they are documented
 here. The exception is +LIBFOO_POST_PATCH_HOOKS+.  Patching the
-package is not user definable, so +LIBFOO_POST_PATCH_HOOKS+ will be
+package and producing legal info are not user definable, so
++LIBFOO_POST_PATCH_HOOKS+ and +LIBFOO_POST_LEGAL_INFO_HOOKS+ will be
 userful for generic packages.
 
 The following hook points are available:
@@ -361,6 +362,7 @@ The following hook points are available:
 * +LIBFOO_POST_INSTALL_HOOKS+ (for host packages only)
 * +LIBFOO_POST_INSTALL_STAGING_HOOKS+ (for target packages only)
 * +LIBFOO_POST_INSTALL_TARGET_HOOKS+ (for target packages only)
+* +LIBFOO_POST_LEGAL_INFO_HOOKS+
 
 These variables are 'lists' of variable names containing actions to be
 performed at this hook point. This allows several hooks to be
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 270da60..9c87aec 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -316,6 +316,7 @@ $(2)_POST_INSTALL_HOOKS         ?=
 $(2)_POST_INSTALL_STAGING_HOOKS ?=
 $(2)_POST_INSTALL_TARGET_HOOKS  ?=
 $(2)_POST_INSTALL_IMAGES_HOOKS  ?=
+$(2)_POST_LEGAL_INFO_HOOKS      ?=
 
 # human-friendly targets and target sequencing
 $(1):			$(1)-install
@@ -488,6 +489,7 @@ endif
 endif
 	@$(call legal-manifest,$$($(2)_RAWNAME),$$($(2)_VERSION),$$($(2)_LICENSE),$$($(2)_MANIFEST_LICENSE_FILES),$$($(2)_MANIFEST_TARBALL))
 endif # ifneq ($(call qstrip,$$($(2)_SOURCE)),)
+	$(foreach hook,$($(2)_POST_LEGAL_INFO_HOOKS),$(call $(hook))$(sep))
 
 # add package to the general list of targets if requested by the buildroot
 # configuration
-- 
1.7.9.5

^ permalink raw reply related

* [Buildroot] [git commit] gdb: adjust behavior when thread debug is not available
From: Peter Korsgaard @ 2012-11-03 16:51 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=db09796532d1b7b09bae61d1b297261a4a51b7c1
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

When an external toolchain without thread debug is used, the gdb
package can be selected, but no version can be choosen, since none
match any of the requirements. This leads Buildroot to try to build
gdb for the target without a version being defined, as in the
following build log:

 http://autobuild.buildroot.org/results/84e8fd2df0cc22448052a572c2e9a6e03dd137eb/build-end.log

To fix this, we adjust the dependencies of the BR2_PACKAGE_GDB option
so that the package as a whole is not selectable when the required
conditions are not met. Basically, we have the choice of:

 * Having a toolchain that supports thread debugging, which is needed
   for gdb >= 7.x

 * Having BR2_DEPRECATED enabled, which allows gdb 6.8 to be selected,
   which doesn't require thread debugging

 * Using bfin, since this architectures has a special old gdb version

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 toolchain/gdb/Config.in |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/toolchain/gdb/Config.in b/toolchain/gdb/Config.in
index 272e196..8acce1e 100644
--- a/toolchain/gdb/Config.in
+++ b/toolchain/gdb/Config.in
@@ -4,8 +4,14 @@ config BR2_PACKAGE_GDB
 	bool "Build gdb debugger for the Target"
 	select BR2_PACKAGE_NCURSES
 	depends on BR2_USE_WCHAR
-	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on !BR2_sh && !BR2_sh64 && !BR2_avr32 && !BR2_microblaze
+	# The newest versions of gdb require thread debugging in the
+	# toolchain. The only cases for which this is not needed is if
+	# we use gdb 6.8 (marked deprecated)
+	depends on \
+		BR2_TOOLCHAIN_HAS_THREADS_DEBUG_IF_NEEDED || \
+		BR2_DEPRECATED || \
+		BR2_bfin
 	help
 	    Build the full gdb debugger to run on the target.
 
@@ -90,9 +96,8 @@ choice
 
 endchoice
 
-comment "gdb 7.x support needs pthread debug support in toolchain"
-	depends on BR2_PACKAGE_GDB || BR2_PACKAGE_GDB_SERVER || BR2_PACKAGE_GDB_HOST
-	depends on !BR2_TOOLCHAIN_HAS_THREADS_DEBUG_IF_NEEDED
+comment "gdb support needs pthread debug support in toolchain"
+	depends on !BR2_DEPRECATED && !BR2_bfin && !BR2_TOOLCHAIN_HAS_THREADS_DEBUG_IF_NEEDED
 
 config BR2_GDB_VERSION
 	string

^ permalink raw reply related

* [Buildroot] [PATCHv3] QtSerialPort: new package
From: Peter Korsgaard @ 2012-11-03 16:46 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20121029154949.GA15033@localhost.comm5.com.br>

>>>>> "Thiago" == Thiago A Correa <thiago.correa@gmail.com> writes:

Hi,

 Thiago> Signed-off-by: Thiago A. Correa <thiago.correa@gmail.com>
 Thiago> ---
 Thiago>  package/Config.in                    |    1 +
 Thiago>  package/qtserialport/Config.in       |   12 +++++++++++
 Thiago>  package/qtserialport/qtserialport.mk |   35 ++++++++++++++++++++++++++++++++++
 Thiago>  3 files changed, 48 insertions(+), 0 deletions(-)
 Thiago>  create mode 100644 package/qtserialport/Config.in
 Thiago>  create mode 100644 package/qtserialport/qtserialport.mk

 Thiago> diff --git a/package/Config.in b/package/Config.in
 Thiago> index 331d879..e869c8a 100644
 Thiago> --- a/package/Config.in
 Thiago> +++ b/package/Config.in
 Thiago> @@ -133,6 +133,7 @@ source "package/sdl_gfx/Config.in"
 Thiago>  comment "other GUIs"
 Thiago>  source "package/efl/Config.in"
 Thiago>  source "package/qt/Config.in"
 Thiago> +source "package/qtserialport/Config.in"
 Thiago>  source "package/x11r7/Config.in"

Thomas a while ago posted patches for qtextserialport:

http://patchwork.ozlabs.org/patch/162431/

What is the relation between qtserialport and qtextserialport? Do we
need both?

 Thiago> +++ b/package/qtserialport/qtserialport.mk
 Thiago> @@ -0,0 +1,35 @@
 Thiago> +#############################################################
 Thiago> +#
 Thiago> +# QtSerialPort 
 Thiago> +#
 Thiago> +#############################################################
 Thiago> +QTSERIALPORT_VERSION = e831107f468618881e435932c8a42404c1dde13c
 Thiago> +QTSERIALPORT_SITE = git://gitorious.org/qtplayground/qtserialport.git
 Thiago> +QTSERIALPORT_LICENSE = LGPLv2
 Thiago> +QTSERIALPORT_LICENSE_FILES = LICENSE.LGPL
 Thiago> +QTSERIALPORT_INSTALL_STAGING = YES
 Thiago> +
 Thiago> +QTSERIALPORT_DEPENDENCIES = qt udev
 Thiago> +
 Thiago> +QTSERIALPORT_LDFLAGS = $(TARGET_LDFLAGS)
 Thiago> +
 Thiago> +define QTSERIALPORT_CONFIGURE_CMDS
 Thiago> +	(cd $(@D); \
 Thiago> +		$(QT_QMAKE) -recursive CONFIG+=release)
 Thiago> +endef
 Thiago> +
 Thiago> +define QTSERIALPORT_BUILD_CMDS
 Thiago> +	$(MAKE) -C $(@D)/src
 Thiago> +endef
 Thiago> +
 Thiago> +define QTSERIALPORT_INSTALL_STAGING_CMDS
 Thiago> +	$(MAKE) -C $(@D)/src install
 Thiago> +	mv $(HOST_DIR)/usr/include/QtAddOnSerialPort $(STAGING_DIR)/usr/include/

That seems funky. Why is it installing under HOST_DIR in the first
place?

 Thiago> +endef
 Thiago> +
 Thiago> +define QTSERIALPORT_INSTALL_TARGET_CMDS
 Thiago> +	cp -dpfr $(STAGING_DIR)/usr/lib/libSerialPort.so.* \
 Thiago> +	$(TARGET_DIR)/usr/lib

Normally we install headers to target as well. Does the makefile install
target not support DESTDIR?

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [PATCH] use avr32linux.org mirror
From: Arnout Vandecappelle @ 2012-11-03 16:38 UTC (permalink / raw)
  To: buildroot

The avr32linux.org mirror has vanished and is replaced by a spam site
that returns HTML pages for whatever URL you request from it.  So the
download helper thinks that download has succeeded, while actually it
failed.

Fortunately, there is still a mirror of the site alive, so we can use
that one.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

---
 package/gadgetfs-test/gadgetfs-test.mk |    2 +-
 package/games/rubix/Config.in          |    2 +-
 package/games/rubix/rubix.mk           |    2 +-
 package/torsmo/Config.in               |    2 +-
 package/torsmo/torsmo.mk               |    2 +-
 package/xstroke/Config.in              |    2 +-
 package/xstroke/xstroke.mk             |    2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/package/gadgetfs-test/gadgetfs-test.mk b/package/gadgetfs-test/gadgetfs-test.mk
index 808618b..0fc8221 100644
--- a/package/gadgetfs-test/gadgetfs-test.mk
+++ b/package/gadgetfs-test/gadgetfs-test.mk
@@ -4,7 +4,7 @@
 #
 #############################################################
 GADGETFS_TEST_SOURCE=gadgetfs-test.tar.bz2
-GADGETFS_TEST_SITE=http://avr32linux.org/twiki/pub/Main/GadgetFsTest/
+GADGETFS_TEST_SITE=http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/GadgetFsTest/
 
 GADGETFS_TEST_MAKEOPTS = CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)"
 
diff --git a/package/games/rubix/Config.in b/package/games/rubix/Config.in
index 6da8c71..9cf5b46 100644
--- a/package/games/rubix/Config.in
+++ b/package/games/rubix/Config.in
@@ -4,4 +4,4 @@ config BR2_PACKAGE_RUBIX
 	help
 	  A 3D rubiks cube game for X
 
-	  http://avr32linux.org/twiki/pub/Main/Rubix
+	  http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/Rubix
diff --git a/package/games/rubix/rubix.mk b/package/games/rubix/rubix.mk
index 2087b51..d39d353 100644
--- a/package/games/rubix/rubix.mk
+++ b/package/games/rubix/rubix.mk
@@ -5,7 +5,7 @@
 #############################################################
 RUBIX_VERSION = 1.0.5
 RUBIX_SOURCE = rubix-$(RUBIX_VERSION).tar.bz2
-RUBIX_SITE = http://avr32linux.org/twiki/pub/Main/Rubix
+RUBIX_SITE = http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/Rubix
 RUBIX_INSTALL_TARGET_OPT = GAMESDIR=$(TARGET_DIR)/usr/games install
 
 RUBIX_MAKE_OPT = CC="$(TARGET_CC)" XINC="-I$(STAGING_DIR)/usr/include/X11" XLIB="-L$(STAGING_DIR)/usr/lib -lX11"
diff --git a/package/torsmo/Config.in b/package/torsmo/Config.in
index ec9cb22..b3aba39 100644
--- a/package/torsmo/Config.in
+++ b/package/torsmo/Config.in
@@ -4,4 +4,4 @@ config BR2_PACKAGE_TORSMO
 	help
 	  Torsmo is a system monitor that sits in the corner of your desktop.
 
-	  http://avr32linux.org/twiki/pub/Main/Torsmo
+	  http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/Torsmo
diff --git a/package/torsmo/torsmo.mk b/package/torsmo/torsmo.mk
index 1e3bd28..c42ce11 100644
--- a/package/torsmo/torsmo.mk
+++ b/package/torsmo/torsmo.mk
@@ -5,7 +5,7 @@
 #############################################################
 TORSMO_VERSION = 0.18
 TORSMO_SOURCE = torsmo-$(TORSMO_VERSION).tar.gz
-TORSMO_SITE = http://avr32linux.org/twiki/pub/Main/Torsmo
+TORSMO_SITE = http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/Torsmo
 
 # help2man doesn't work when cross compiling
 TORSMO_CONF_ENV = ac_cv_path_HELP2MAN=''
diff --git a/package/xstroke/Config.in b/package/xstroke/Config.in
index 5589fe6..54cb38e 100644
--- a/package/xstroke/Config.in
+++ b/package/xstroke/Config.in
@@ -7,4 +7,4 @@ config BR2_PACKAGE_XSTROKE
 	help
 	  Handwriting recognition for X
 
-	  http://avr32linux.org/twiki/pub/Main/XStroke
+	  http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/XStroke
diff --git a/package/xstroke/xstroke.mk b/package/xstroke/xstroke.mk
index d7d18db..3459545 100644
--- a/package/xstroke/xstroke.mk
+++ b/package/xstroke/xstroke.mk
@@ -5,7 +5,7 @@
 #############################################################
 XSTROKE_VERSION = 0.6
 XSTROKE_SOURCE = xstroke-$(XSTROKE_VERSION).tar.gz
-XSTROKE_SITE = http://avr32linux.org/twiki/pub/Main/XStroke
+XSTROKE_SITE = http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/XStroke
 
 XSTROKE_DEPENDENCIES = xlib_libXft xlib_libXtst xlib_libXpm
 
-- 
tg: (b72f3f6..) t/avr32linux (depends on: master)

^ permalink raw reply related

* [Buildroot] [PATCHv2] barebox: Allow to pass a custom configuration file
From: Peter Korsgaard @ 2012-11-03 16:21 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1351958710-7530-1-git-send-email-maxime.ripard@free-electrons.com>

>>>>> "Maxime" == Maxime Ripard <maxime.ripard@free-electrons.com> writes:

 Maxime> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit] barebox: Allow to pass a custom configuration file
From: Peter Korsgaard @ 2012-11-03 16:20 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=1e9b963255fd20c2532f71c62d5c80eb5643d4c9
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 boot/barebox/Config.in  |   21 +++++++++++++++++++++
 boot/barebox/barebox.mk |   26 +++++++++++++++++++++-----
 2 files changed, 42 insertions(+), 5 deletions(-)

diff --git a/boot/barebox/Config.in b/boot/barebox/Config.in
index bd70e58..d6ce8dd 100644
--- a/boot/barebox/Config.in
+++ b/boot/barebox/Config.in
@@ -67,12 +67,33 @@ config BR2_TARGET_BAREBOX_CUSTOM_GIT_VERSION
 
 endif
 
+
+choice
+	prompt "Barebox configuration"
+	default BR2_TARGET_BAREBOX_USE_DEFCONFIG
+
+config BR2_TARGET_BAREBOX_USE_DEFCONFIG
+	bool "Using a defconfig"
+
+config BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG
+	bool "Using a custom config file"
+
+endchoice
+
 config BR2_TARGET_BAREBOX_BOARD_DEFCONFIG
 	string "board defconfig"
+	depends on BR2_TARGET_BAREBOX_USE_DEFCONFIG
 	help
 	  Name of the board for which Barebox should be built, without
 	  the _defconfig suffix.
 
+
+config BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE
+	string "Configuration file path"
+	depends on BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG
+	help
+	  Path to the barebox configuration file
+
 config BR2_TARGET_BAREBOX_BAREBOXENV
 	bool "bareboxenv tool in target"
 	help
diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
index ee84831..a025d5f 100644
--- a/boot/barebox/barebox.mk
+++ b/boot/barebox/barebox.mk
@@ -37,8 +37,6 @@ ifneq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
 BAREBOX_INSTALL_TARGET = NO
 endif
 
-BAREBOX_BOARD_DEFCONFIG = $(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))
-
 ifeq ($(KERNEL_ARCH),i386)
 BAREBOX_ARCH=x86
 else ifeq ($(KERNEL_ARCH),powerpc)
@@ -49,8 +47,16 @@ endif
 
 BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)"
 
+
+ifeq ($(BR2_TARGET_BAREBOX_USE_DEFCONFIG),y)
+BAREBOX_SOURCE_CONFIG = $(@D)/arch/$(BAREBOX_ARCH)/configs/$(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))_defconfig
+else ifeq ($(BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG),y)
+BAREBOX_SOURCE_CONFIG = $(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE)
+endif
+
 define BAREBOX_CONFIGURE_CMDS
-	$(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) $(BAREBOX_BOARD_DEFCONFIG)_defconfig
+	cp $(BAREBOX_SOURCE_CONFIG) $(@D)/arch/$(BAREBOX_ARCH)/configs/buildroot_defconfig
+	$(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) buildroot_defconfig
 endef
 
 ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
@@ -80,8 +86,8 @@ $(eval $(generic-package))
 ifeq ($(BR2_TARGET_BAREBOX),y)
 # we NEED a board defconfig file unless we're at make source
 ifeq ($(filter source,$(MAKECMDGOALS)),)
-ifeq ($(BAREBOX_BOARD_DEFCONFIG),)
-$(error No Barebox defconfig file. Check your BR2_TARGET_BAREBOX_BOARD_DEFCONFIG setting)
+ifeq ($(BAREBOX_SOURCE_CONFIG),)
+$(error No Barebox config file. Check your BR2_TARGET_BAREBOX_BOARD_DEFCONFIG or BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE settings)
 endif
 endif
 
@@ -94,4 +100,14 @@ barebox-savedefconfig: barebox-configure
 	$(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(BAREBOX_DIR) \
 		$(subst barebox-,,$@)
 
+ifeq ($(BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG),y)
+barebox-update-config: barebox-configure $(BAREBOX_DIR)/.config
+	cp -f $(BAREBOX_DIR)/.config $(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE)
+
+barebox-update-defconfig: barebox-savedefconfig
+	cp -f $(BAREBOX_DIR)/defconfig $(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE)
+else
+barebox-update-config: ;
+barebox-update-defconfig: ;
+endif
 endif

^ permalink raw reply related

* [Buildroot] [PATCH v11 1/9] host-qemu: new package
From: Peter Korsgaard @ 2012-11-03 16:10 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1350652434-32020-1-git-send-email-francois.perrad@gadz.org>

>>>>> "Francois" == Francois Perrad <fperrad@gmail.com> writes:

 Francois> only user mode for the current target architecture

Committed patch 1-8, thanks!

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit] cpanminus: new package
From: Peter Korsgaard @ 2012-11-03 16:07 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=51b5cf20bbd07f7ac5855108b17bd08e6a9edf69
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 package/Config.in                        |    5 +++
 package/cpanminus/Config.in              |   36 +++++++++++++++++++++++
 package/cpanminus/cpanminus.mk           |   47 ++++++++++++++++++++++++++++++
 package/perl/perl-fix-Module-Build.patch |   16 ++++++++++
 4 files changed, 104 insertions(+), 0 deletions(-)

diff --git a/package/Config.in b/package/Config.in
index c895e7a..2ac2568 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -280,6 +280,11 @@ source "package/xavante/Config.in"
 endmenu
 endif
 source "package/perl/Config.in"
+if BR2_PACKAGE_PERL
+menu "Perl libraries/modules"
+source "package/cpanminus/Config.in"
+endmenu
+endif
 source "package/microperl/Config.in"
 source "package/php/Config.in"
 source "package/python/Config.in"
diff --git a/package/cpanminus/Config.in b/package/cpanminus/Config.in
new file mode 100644
index 0000000..b8b39dc
--- /dev/null
+++ b/package/cpanminus/Config.in
@@ -0,0 +1,36 @@
+config BR2_PACKAGE_CPANMINUS
+	bool "cpanminus"
+	help
+	  cpanminus is a script to get, unpack, build and install Perl modules
+	  from CPAN.
+
+	  Why? It's dependency free, requires zero configuration, and stands
+	  alone. When running, it requires only 10MB of RAM.
+
+	  http://github.com/miyagawa/cpanminus
+
+if BR2_PACKAGE_CPANMINUS
+
+config BR2_PACKAGE_CPANMINUS_MIRROR
+	string "mirror"
+	help
+	  Specifies the base URL for the CPAN mirror to use,
+	  such as http://cpan.cpantesters.org/.
+
+config BR2_PACKAGE_CPANMINUS_MODULES
+	string "Perl modules from CPAN"
+	default "Curses::UI"
+	help
+	  List of space-separated Perl modules to install from CPAN.
+
+	  Examples: Try::Tiny Dancer YAML Moo
+
+	  Install the listed modules and their dependencies.
+
+config BR2_PACKAGE_CPANMINUS_NATIVE_DEPENDENCIES
+	string "native dependencies"
+	default "ncurses"
+	help
+	  Some XS modules require native libraries.
+
+endif
diff --git a/package/cpanminus/cpanminus.mk b/package/cpanminus/cpanminus.mk
new file mode 100644
index 0000000..d3a338b
--- /dev/null
+++ b/package/cpanminus/cpanminus.mk
@@ -0,0 +1,47 @@
+#############################################################
+#
+# cpanminus
+#
+#############################################################
+
+CPANMINUS_VERSION = 1.5018
+CPANMINUS_SOURCE = miyagawa-cpanminus-$(CPANMINUS_VERSION)-0-gee6cd30.tar.gz
+CPANMINUS_SITE = https://github.com/miyagawa/cpanminus/tarball/$(CPANMINUS_VERSION)
+CPANMINUS_DEPENDENCIES = perl $(call qstrip,$(BR2_PACKAGE_CPANMINUS_NATIVE_DEPENDENCIES))
+
+CPANMINUS_RUN_PERL = $(QEMU_USER) $(STAGING_DIR)/usr/bin/perl
+CPANMINUS_ARCHNAME = $(shell $(CPANMINUS_RUN_PERL) -MConfig -e "print Config->{archname}")
+CPANMINUS_PERL_LIB      = $(STAGING_DIR)/usr/lib/perl5/$(PERL_VERSION)
+CPANMINUS_PERL_SITELIB  = $(TARGET_DIR)/usr/lib/perl5/site_perl/$(PERL_VERSION)
+CPANMINUS_PERL_ARCHLIB  = $(CPANMINUS_PERL_LIB)/$(CPANMINUS_ARCHNAME)
+CPANMINUS_PERL_SITEARCH = $(CPANMINUS_PERL_SITELIB)/$(CPANMINUS_ARCHNAME)
+CPANMINUS_PERL5LIB = $(CPANMINUS_PERL_SITEARCH):$(CPANMINUS_PERL_SITELIB):$(CPANMINUS_PERL_ARCHLIB):$(CPANMINUS_PERL_LIB)
+ifneq ($(BR2_PACKAGE_CPANMINUS_MIRROR),"")
+    CPANMINUS_MIRROR = --mirror $(call qstrip,$(BR2_PACKAGE_CPANMINUS_MIRROR)) --mirror-only
+endif
+CPANMINUS_MODULES = $(call qstrip,$(BR2_PACKAGE_CPANMINUS_MODULES))
+
+ifneq ($(CPANMINUS_MODULES),)
+define CPANMINUS_INSTALL_TARGET_CMDS
+	echo "#!/bin/sh"                                                        > $(@D)/run_perl
+	echo "PERL5LIB=$(CPANMINUS_PERL5LIB) $(CPANMINUS_RUN_PERL) \"\$$@\""    >>$(@D)/run_perl
+	chmod +x $(@D)/run_perl
+	PERL5LIB=$(CPANMINUS_PERL5LIB) \
+	PERL_MM_OPT="DESTDIR=$(TARGET_DIR) PERL=$(@D)/run_perl PERL_LIB=$(CPANMINUS_PERL_LIB) PERL_ARCHLIB=$(CPANMINUS_PERL_ARCHLIB)" \
+	PERL_MB_OPT="--destdir $(TARGET_DIR)" \
+	RUN_PERL="$(@D)/run_perl" \
+	$(CPANMINUS_RUN_PERL) $(@D)/cpanm \
+		--perl=$(@D)/run_perl \
+		--notest \
+		--no-man-pages \
+		$(CPANMINUS_MIRROR) \
+		$(call qstrip,$(BR2_PACKAGE_CPANMINUS_MODULES))
+	find $(CPANMINUS_PERL_SITEARCH) -type f -name *.bs -exec rm -f {} \;
+endef
+else
+define CPANMINUS_INSTALL_TARGET_CMDS
+	@echo "No modules to install"
+endef
+endif
+
+$(eval $(generic-package))
diff --git a/package/perl/perl-fix-Module-Build.patch b/package/perl/perl-fix-Module-Build.patch
new file mode 100644
index 0000000..26b15e4
--- /dev/null
+++ b/package/perl/perl-fix-Module-Build.patch
@@ -0,0 +1,16 @@
+
+Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
+
+Index: b/cpan/Module-Build/lib/Module/Build/Base.pm
+===================================================================
+--- a/cpan/Module-Build/lib/Module/Build/Base.pm
++++ b/cpan/Module-Build/lib/Module/Build/Base.pm
+@@ -456,7 +456,7 @@
+   my $proto = shift;
+   my $c     = ref($proto) ? $proto->{config} : 'Module::Build::Config';
+ 
+-  my $perl  = $^X;
++  my $perl  = $ENV{RUN_PERL} || $^X;
+   my $perl_basename = File::Basename::basename($perl);
+ 
+   my @potential_perls;

^ permalink raw reply related

* [Buildroot] [PATCHv2] barebox: Allow to pass a custom configuration file
From: Maxime Ripard @ 2012-11-03 16:05 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 boot/barebox/Config.in  |   21 +++++++++++++++++++++
 boot/barebox/barebox.mk |   26 +++++++++++++++++++++-----
 2 files changed, 42 insertions(+), 5 deletions(-)

diff --git a/boot/barebox/Config.in b/boot/barebox/Config.in
index 574bfae..1f5f81b 100644
--- a/boot/barebox/Config.in
+++ b/boot/barebox/Config.in
@@ -67,12 +67,33 @@ config BR2_TARGET_BAREBOX_CUSTOM_GIT_VERSION
 
 endif
 
+
+choice
+	prompt "Barebox configuration"
+	default BR2_TARGET_BAREBOX_USE_DEFCONFIG
+
+config BR2_TARGET_BAREBOX_USE_DEFCONFIG
+	bool "Using a defconfig"
+
+config BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG
+	bool "Using a custom config file"
+
+endchoice
+
 config BR2_TARGET_BAREBOX_BOARD_DEFCONFIG
 	string "board defconfig"
+	depends on BR2_TARGET_BAREBOX_USE_DEFCONFIG
 	help
 	  Name of the board for which Barebox should be built, without
 	  the _defconfig suffix.
 
+
+config BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE
+	string "Configuration file path"
+	depends on BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG
+	help
+	  Path to the barebox configuration file
+
 config BR2_TARGET_BAREBOX_BAREBOXENV
 	bool "bareboxenv tool in target"
 	help
diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
index 9550cdc..78c4aa9 100644
--- a/boot/barebox/barebox.mk
+++ b/boot/barebox/barebox.mk
@@ -37,8 +37,6 @@ ifneq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
 BAREBOX_INSTALL_TARGET = NO
 endif
 
-BAREBOX_BOARD_DEFCONFIG = $(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))
-
 ifeq ($(KERNEL_ARCH),i386)
 BAREBOX_ARCH=x86
 else ifeq ($(KERNEL_ARCH),powerpc)
@@ -49,8 +47,16 @@ endif
 
 BAREBOX_MAKE_FLAGS = ARCH=$(BAREBOX_ARCH) CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)"
 
+
+ifeq ($(BR2_TARGET_BAREBOX_USE_DEFCONFIG),y)
+BAREBOX_SOURCE_CONFIG = $(@D)/arch/$(BAREBOX_ARCH)/configs/$(call qstrip,$(BR2_TARGET_BAREBOX_BOARD_DEFCONFIG))_defconfig
+else ifeq ($(BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG),y)
+BAREBOX_SOURCE_CONFIG = $(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE)
+endif
+
 define BAREBOX_CONFIGURE_CMDS
-	$(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) $(BAREBOX_BOARD_DEFCONFIG)_defconfig
+	cp $(BAREBOX_SOURCE_CONFIG) $(@D)/arch/$(BAREBOX_ARCH)/configs/buildroot_defconfig
+	$(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(@D) buildroot_defconfig
 endef
 
 ifeq ($(BR2_TARGET_BAREBOX_BAREBOXENV),y)
@@ -80,8 +86,8 @@ $(eval $(generic-package))
 ifeq ($(BR2_TARGET_BAREBOX),y)
 # we NEED a board defconfig file unless we're at make source
 ifeq ($(filter source,$(MAKECMDGOALS)),)
-ifeq ($(BAREBOX_BOARD_DEFCONFIG),)
-$(error No Barebox defconfig file. Check your BR2_TARGET_BAREBOX_BOARD_DEFCONFIG setting)
+ifeq ($(BAREBOX_SOURCE_CONFIG),)
+$(error No Barebox config file. Check your BR2_TARGET_BAREBOX_BOARD_DEFCONFIG or BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE settings)
 endif
 endif
 
@@ -94,4 +100,14 @@ barebox-savedefconfig: barebox-configure
 	$(MAKE) $(BAREBOX_MAKE_FLAGS) -C $(BAREBOX_DIR) \
 		$(subst barebox-,,$@)
 
+ifeq ($(BR2_TARGET_BAREBOX_USE_CUSTOM_CONFIG),y)
+barebox-update-config: barebox-configure $(BAREBOX_DIR)/.config
+	cp -f $(BAREBOX_DIR)/.config $(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE)
+
+barebox-update-defconfig: barebox-savedefconfig
+	cp -f $(BAREBOX_DIR)/defconfig $(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE)
+else
+barebox-update-config: ;
+barebox-update-defconfig: ;
+endif
 endif
-- 
1.7.9.5

^ permalink raw reply related


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