Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] i2c-tools: Add i2c-dev.h to staging directory for userspace i2c drivers.
@ 2013-09-24 10:18 Jouko Nikula
  2013-09-24 10:18 ` [Buildroot] [PATCH] Update config.guess to version 2013-06-10 Jouko Nikula
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Jouko Nikula @ 2013-09-24 10:18 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Jouko Nikula <jouko.nikula@espotel.com>
---
 package/i2c-tools/i2c-tools.mk |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/i2c-tools/i2c-tools.mk b/package/i2c-tools/i2c-tools.mk
index 1589d04..3281dbe 100644
--- a/package/i2c-tools/i2c-tools.mk
+++ b/package/i2c-tools/i2c-tools.mk
@@ -7,6 +7,7 @@
 I2C_TOOLS_VERSION = 3.1.0
 I2C_TOOLS_SOURCE = i2c-tools-$(I2C_TOOLS_VERSION).tar.bz2
 I2C_TOOLS_SITE = http://dl.lm-sensors.org/i2c-tools/releases
+I2C_TOOLS_INSTALL_STAGING = YES
 
 define I2C_TOOLS_BUILD_CMDS
  $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
@@ -19,4 +20,8 @@ define I2C_TOOLS_INSTALL_TARGET_CMDS
 	done
 endef
 
+define I2C_TOOLS_INSTALL_STAGING_CMDS
+	$(INSTALL) -D -m644 $(@D)/include/linux/i2c-dev.h $(STAGING_DIR)/usr/include/linux/
+endef
+
 $(eval $(generic-package))
-- 
1.7.9.5

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

* [Buildroot] [PATCH] Update config.guess to version 2013-06-10
  2013-09-24 10:18 [Buildroot] [PATCH] i2c-tools: Add i2c-dev.h to staging directory for userspace i2c drivers Jouko Nikula
@ 2013-09-24 10:18 ` Jouko Nikula
  2013-09-24 10:27   ` Nikula Jouko
  2013-09-24 15:20 ` [Buildroot] [PATCH] i2c-tools: Add i2c-dev.h to staging directory for userspace i2c drivers Thomas Petazzoni
  2014-03-03 21:10 ` Thomas Petazzoni
  2 siblings, 1 reply; 9+ messages in thread
From: Jouko Nikula @ 2013-09-24 10:18 UTC (permalink / raw)
  To: buildroot

Current version of config.guess may fail to detect host libc version, which
results in problems with configure when building gcc.

Signed-off-by: Jouko Nikula <jouko.nikula@espotel.com>
---
 support/gnuconfig/config.guess |  117 +++++++++++++++++++++-------------------
 1 file changed, 61 insertions(+), 56 deletions(-)

diff --git a/support/gnuconfig/config.guess b/support/gnuconfig/config.guess
index 9509179..b79252d 100755
--- a/support/gnuconfig/config.guess
+++ b/support/gnuconfig/config.guess
@@ -1,14 +1,12 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-#   2011, 2012 Free Software Foundation, Inc.
+#   Copyright 1992-2013 Free Software Foundation, Inc.
 
-timestamp='2012-09-25'
+timestamp='2013-06-10'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful, but
@@ -22,19 +20,17 @@ timestamp='2012-09-25'
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner.  Please send patches (context
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
-# entry.
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
 #
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
+# Originally written by Per Bothner.
 #
 # You can get the latest version of this script from:
 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches with a ChangeLog entry to config-patches at gnu.org.
+
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -54,9 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-Free Software Foundation, Inc.
+Copyright 1992-2013 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -138,22 +132,26 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
-if [ "${UNAME_SYSTEM}" = "Linux" ] ; then
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+	# If the system lacks a compiler, then just pick glibc.
+	# We could probably try harder.
+	LIBC=gnu
+
 	eval $set_cc_for_build
-	cat << EOF > $dummy.c
+	cat <<-EOF > $dummy.c
 	#include <features.h>
-	#ifdef __UCLIBC__
-	# ifdef __UCLIBC_CONFIG_VERSION__
-	LIBC=uclibc __UCLIBC_CONFIG_VERSION__
-	# else
+	#if defined(__UCLIBC__)
 	LIBC=uclibc
-	# endif
+	#elif defined(__dietlibc__)
+	LIBC=dietlibc
 	#else
 	LIBC=gnu
 	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'`
-fi
+	EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+	;;
+esac
 
 # Note: order is significant - the case branches are not exclusive.
 
@@ -876,11 +874,11 @@ EOF
 	exit ;;
     *:GNU:*:*)
 	# the GNU system
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
 	exit ;;
     *:GNU/*:*:*)
 	# other systems with GNU libc and userland
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
 	exit ;;
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
@@ -906,6 +904,9 @@ EOF
 	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
+    arc:Linux:*:* | arceb:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     arm*:Linux:*:*)
 	eval $set_cc_for_build
 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -916,9 +917,9 @@ EOF
 	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
 		| grep -q __ARM_PCS_VFP
 	    then
-		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
 	    else
-		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
 	    fi
 	fi
 	exit ;;
@@ -938,14 +939,7 @@ EOF
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     i*86:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#ifdef __dietlibc__
-	LIBC=dietlibc
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
-	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
 	exit ;;
     ia64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
@@ -975,14 +969,17 @@ EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
 	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
 	;;
+    or1k:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     or32:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     padre:Linux:*:*)
-	echo sparc-unknown-linux-gnu
+	echo sparc-unknown-linux-${LIBC}
 	exit ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
+	echo hppa64-unknown-linux-${LIBC}
 	exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
 	# Look for CPU level
@@ -998,8 +995,14 @@ EOF
     ppc:Linux:*:*)
 	echo powerpc-unknown-linux-${LIBC}
 	exit ;;
+    ppc64le:Linux:*:*)
+	echo powerpc64le-unknown-linux-${LIBC}
+	exit ;;
+    ppcle:Linux:*:*)
+	echo powerpcle-unknown-linux-${LIBC}
+	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux
+	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
 	exit ;;
     sh64*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
@@ -1011,7 +1014,7 @@ EOF
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     tile*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     vax:Linux:*:*)
 	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
@@ -1253,19 +1256,21 @@ EOF
 	exit ;;
     *:Darwin:*:*)
 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-	case $UNAME_PROCESSOR in
-	    i386)
-		eval $set_cc_for_build
-		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-		      grep IS_64BIT_ARCH >/dev/null
-		  then
-		      UNAME_PROCESSOR="x86_64"
-		  fi
-		fi ;;
-	    unknown) UNAME_PROCESSOR=powerpc ;;
-	esac
+	eval $set_cc_for_build
+	if test "$UNAME_PROCESSOR" = unknown ; then
+	    UNAME_PROCESSOR=powerpc
+	fi
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		case $UNAME_PROCESSOR in
+		    i386) UNAME_PROCESSOR=x86_64 ;;
+		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
+		esac
+	    fi
+	fi
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
 	exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
-- 
1.7.9.5

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

* [Buildroot] [PATCH] Update config.guess to version 2013-06-10
  2013-09-24 10:18 ` [Buildroot] [PATCH] Update config.guess to version 2013-06-10 Jouko Nikula
@ 2013-09-24 10:27   ` Nikula Jouko
  0 siblings, 0 replies; 9+ messages in thread
From: Nikula Jouko @ 2013-09-24 10:27 UTC (permalink / raw)
  To: buildroot

Hi,

Sorry, this patch was already sent earlier, is still under work and was not meant to be sent again. Please ignore this for now.

Regards
	- Jouko

-----Original Message-----
From: buildroot-bounces@busybox.net [mailto:buildroot-bounces at busybox.net] On Behalf Of Jouko Nikula
Sent: 24. syyskuuta 2013 13:19
To: buildroot at uclibc.org
Subject: [Buildroot] [PATCH] Update config.guess to version 2013-06-10

Current version of config.guess may fail to detect host libc version, which results in problems with configure when building gcc.

Signed-off-by: Jouko Nikula <jouko.nikula@espotel.com>
---
 support/gnuconfig/config.guess |  117 +++++++++++++++++++++-------------------
 1 file changed, 61 insertions(+), 56 deletions(-)

diff --git a/support/gnuconfig/config.guess b/support/gnuconfig/config.guess index 9509179..b79252d 100755
--- a/support/gnuconfig/config.guess
+++ b/support/gnuconfig/config.guess
@@ -1,14 +1,12 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-#   2011, 2012 Free Software Foundation, Inc.
+#   Copyright 1992-2013 Free Software Foundation, Inc.
 
-timestamp='2012-09-25'
+timestamp='2013-06-10'
 
 # This file is free software; you can redistribute it and/or modify it  # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful, but @@ -22,19 +20,17 @@ timestamp='2012-09-25'
 # As a special exception to the GNU General Public License, if you  # distribute this file as part of a program that contains a  # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner.  Please send patches (context -# diff format) to <config-patches@gnu.org> and include a ChangeLog -# entry.
+# the same distribution terms that you use for the rest of that # 
+program.  This Exception is an additional permission under section 7 # 
+of the GNU General Public License, version 3 ("GPLv3").
 #
-# This script attempts to guess a canonical system name similar to -# config.sub.  If it succeeds, it prints the system name on stdout, and -# exits with 0.  Otherwise, it exits with 1.
+# Originally written by Per Bothner.
 #
 # You can get the latest version of this script from:
 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches with a ChangeLog entry to config-patches at gnu.org.
+
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -54,9 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc.
+Copyright 1992-2013 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -138,22 +132,26 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown  UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown  UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
-if [ "${UNAME_SYSTEM}" = "Linux" ] ; then
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+	# If the system lacks a compiler, then just pick glibc.
+	# We could probably try harder.
+	LIBC=gnu
+
 	eval $set_cc_for_build
-	cat << EOF > $dummy.c
+	cat <<-EOF > $dummy.c
 	#include <features.h>
-	#ifdef __UCLIBC__
-	# ifdef __UCLIBC_CONFIG_VERSION__
-	LIBC=uclibc __UCLIBC_CONFIG_VERSION__
-	# else
+	#if defined(__UCLIBC__)
 	LIBC=uclibc
-	# endif
+	#elif defined(__dietlibc__)
+	LIBC=dietlibc
 	#else
 	LIBC=gnu
 	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'`
-fi
+	EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+	;;
+esac
 
 # Note: order is significant - the case branches are not exclusive.
 
@@ -876,11 +874,11 @@ EOF
 	exit ;;
     *:GNU:*:*)
 	# the GNU system
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo 
+${UNAME_RELEASE}|sed -e 's,/.*$,,'`
 	exit ;;
     *:GNU/*:*:*)
 	# other systems with GNU libc and userland
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 
+'s,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 
+'s/[-(].*//'`-${LIBC}
 	exit ;;
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
@@ -906,6 +904,9 @@ EOF
 	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
+    arc:Linux:*:* | arceb:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     arm*:Linux:*:*)
 	eval $set_cc_for_build
 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ @@ -916,9 +917,9 @@ EOF
 	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
 		| grep -q __ARM_PCS_VFP
 	    then
-		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
 	    else
-		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
 	    fi
 	fi
 	exit ;;
@@ -938,14 +939,7 @@ EOF
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     i*86:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#ifdef __dietlibc__
-	LIBC=dietlibc
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
-	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
 	exit ;;
     ia64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
@@ -975,14 +969,17 @@ EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
 	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
 	;;
+    or1k:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     or32:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     padre:Linux:*:*)
-	echo sparc-unknown-linux-gnu
+	echo sparc-unknown-linux-${LIBC}
 	exit ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
+	echo hppa64-unknown-linux-${LIBC}
 	exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
 	# Look for CPU level
@@ -998,8 +995,14 @@ EOF
     ppc:Linux:*:*)
 	echo powerpc-unknown-linux-${LIBC}
 	exit ;;
+    ppc64le:Linux:*:*)
+	echo powerpc64le-unknown-linux-${LIBC}
+	exit ;;
+    ppcle:Linux:*:*)
+	echo powerpcle-unknown-linux-${LIBC}
+	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux
+	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
 	exit ;;
     sh64*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
@@ -1011,7 +1014,7 @@ EOF
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     tile*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     vax:Linux:*:*)
 	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
@@ -1253,19 +1256,21 @@ EOF
 	exit ;;
     *:Darwin:*:*)
 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-	case $UNAME_PROCESSOR in
-	    i386)
-		eval $set_cc_for_build
-		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-		      grep IS_64BIT_ARCH >/dev/null
-		  then
-		      UNAME_PROCESSOR="x86_64"
-		  fi
-		fi ;;
-	    unknown) UNAME_PROCESSOR=powerpc ;;
-	esac
+	eval $set_cc_for_build
+	if test "$UNAME_PROCESSOR" = unknown ; then
+	    UNAME_PROCESSOR=powerpc
+	fi
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		case $UNAME_PROCESSOR in
+		    i386) UNAME_PROCESSOR=x86_64 ;;
+		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
+		esac
+	    fi
+	fi
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
 	exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
--
1.7.9.5

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH] i2c-tools: Add i2c-dev.h to staging directory for userspace i2c drivers.
  2013-09-24 10:18 [Buildroot] [PATCH] i2c-tools: Add i2c-dev.h to staging directory for userspace i2c drivers Jouko Nikula
  2013-09-24 10:18 ` [Buildroot] [PATCH] Update config.guess to version 2013-06-10 Jouko Nikula
@ 2013-09-24 15:20 ` Thomas Petazzoni
  2013-09-24 15:55   ` Baruch Siach
  2013-09-24 16:46   ` Will Wagner
  2014-03-03 21:10 ` Thomas Petazzoni
  2 siblings, 2 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2013-09-24 15:20 UTC (permalink / raw)
  To: buildroot

Dear Jouko Nikula,

On Tue, 24 Sep 2013 13:18:43 +0300, Jouko Nikula wrote:

> +define I2C_TOOLS_INSTALL_STAGING_CMDS
> +	$(INSTALL) -D -m644 $(@D)/include/linux/i2c-dev.h $(STAGING_DIR)/usr/include/linux/
> +endef

This header is already part of the kernel headers, so it should already
be part of the toolchain. Do you have a specific case where this header
is missing?

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] i2c-tools: Add i2c-dev.h to staging directory for userspace i2c drivers.
  2013-09-24 15:20 ` [Buildroot] [PATCH] i2c-tools: Add i2c-dev.h to staging directory for userspace i2c drivers Thomas Petazzoni
@ 2013-09-24 15:55   ` Baruch Siach
  2013-09-24 16:46   ` Will Wagner
  1 sibling, 0 replies; 9+ messages in thread
From: Baruch Siach @ 2013-09-24 15:55 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Tue, Sep 24, 2013 at 05:20:41PM +0200, Thomas Petazzoni wrote:
> On Tue, 24 Sep 2013 13:18:43 +0300, Jouko Nikula wrote:
> > +define I2C_TOOLS_INSTALL_STAGING_CMDS
> > +	$(INSTALL) -D -m644 $(@D)/include/linux/i2c-dev.h $(STAGING_DIR)/usr/include/linux/
> > +endef
> 
> This header is already part of the kernel headers, so it should already
> be part of the toolchain. Do you have a specific case where this header
> is missing?

This is a different header than the kernel one, although confusingly named 
identically. On my Debian system the libi2c-dev package provides i2c-dev.h, 
and diverts the kernel header to i2c-dev.h.kernel.

$ dpkg -S /usr/include/linux/i2c-dev.h
diversion by libi2c-dev from: /usr/include/linux/i2c-dev.h
diversion by libi2c-dev to: /usr/include/linux/i2c-dev.h.kernel
linux-libc-dev:amd64, libi2c-dev: /usr/include/linux/i2c-dev.h

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

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

* [Buildroot] [PATCH] i2c-tools: Add i2c-dev.h to staging directory for userspace i2c drivers.
  2013-09-24 15:20 ` [Buildroot] [PATCH] i2c-tools: Add i2c-dev.h to staging directory for userspace i2c drivers Thomas Petazzoni
  2013-09-24 15:55   ` Baruch Siach
@ 2013-09-24 16:46   ` Will Wagner
  2013-09-25  5:14     ` Nikula Jouko
  1 sibling, 1 reply; 9+ messages in thread
From: Will Wagner @ 2013-09-24 16:46 UTC (permalink / raw)
  To: buildroot

On 24/09/2013 16:20, Thomas Petazzoni wrote:
> Dear Jouko Nikula,
>
> On Tue, 24 Sep 2013 13:18:43 +0300, Jouko Nikula wrote:
>
>> +define I2C_TOOLS_INSTALL_STAGING_CMDS
>> +	$(INSTALL) -D -m644 $(@D)/include/linux/i2c-dev.h $(STAGING_DIR)/usr/include/linux/
>> +endef
>
> This header is already part of the kernel headers, so it should already
> be part of the toolchain. Do you have a specific case where this header
> is missing?
>

The contents of the header are different, the one from i2c-tools 
contains more.

We also carry a patch similar to this. Our patch has an addition which 
is a dependency on linux (assuming it is selected in the config). This 
ensures that the header from the kernel gets over ridden by the one from 
i2c-tools and not the other way around.

Regards
Will

-- 
------------------------------------------------------------------------
Will Wagner                                     will_wagner at carallon.com
Development Manager                      Office Tel: +44 (0)20 7471 9224
Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA
------------------------------------------------------------------------

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

* [Buildroot] [PATCH] i2c-tools: Add i2c-dev.h to staging directory for userspace i2c drivers.
  2013-09-24 16:46   ` Will Wagner
@ 2013-09-25  5:14     ` Nikula Jouko
  0 siblings, 0 replies; 9+ messages in thread
From: Nikula Jouko @ 2013-09-25  5:14 UTC (permalink / raw)
  To: buildroot

From: buildroot-bounces@busybox.net [mailto:buildroot-bounces at busybox.net] On Behalf Of Will Wagner
Sent: 24. syyskuuta 2013 19:46

>> This header is already part of the kernel headers, so it should 
>> already be part of the toolchain. Do you have a specific case where 
>> this header is missing?

>The contents of the header are different, the one from i2c-tools contains more.

Yes. In the kernel documentation (Documentation/i2c/dev-interface) it is explained as follows:

"So let's say you want to access an i2c adapter from a C program. The
first thing to do is "#include <linux/i2c-dev.h>". Please note that
there are two files named "i2c-dev.h" out there, one is distributed
with the Linux kernel and is meant to be included from kernel
driver code, the other one is distributed with i2c-tools and is
meant to be included from user-space programs. You obviously want
the second one here."

>We also carry a patch similar to this. Our patch has an addition which is a dependency on linux (assuming it is selected in the config). This ensures that the >header from the kernel gets over ridden by the one from i2c-tools and not the other way around.

Makes sense. Could this patch be mainlined, instead of what I sent?

Regards
	- Jouko

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

* [Buildroot] [PATCH] i2c-tools: Add i2c-dev.h to staging directory for userspace i2c drivers.
  2013-09-24 10:18 [Buildroot] [PATCH] i2c-tools: Add i2c-dev.h to staging directory for userspace i2c drivers Jouko Nikula
  2013-09-24 10:18 ` [Buildroot] [PATCH] Update config.guess to version 2013-06-10 Jouko Nikula
  2013-09-24 15:20 ` [Buildroot] [PATCH] i2c-tools: Add i2c-dev.h to staging directory for userspace i2c drivers Thomas Petazzoni
@ 2014-03-03 21:10 ` Thomas Petazzoni
  2014-03-04 18:14   ` Thomas Petazzoni
  2 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2014-03-03 21:10 UTC (permalink / raw)
  To: buildroot

Dear Jouko Nikula,

On Tue, 24 Sep 2013 13:18:43 +0300, Jouko Nikula wrote:
> Signed-off-by: Jouko Nikula <jouko.nikula@espotel.com>
> ---
>  package/i2c-tools/i2c-tools.mk |    5 +++++
>  1 file changed, 5 insertions(+)

Applied, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] i2c-tools: Add i2c-dev.h to staging directory for userspace i2c drivers.
  2014-03-03 21:10 ` Thomas Petazzoni
@ 2014-03-04 18:14   ` Thomas Petazzoni
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2014-03-04 18:14 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 3 Mar 2014 22:10:28 +0100, Thomas Petazzoni wrote:
> Dear Jouko Nikula,
> 
> On Tue, 24 Sep 2013 13:18:43 +0300, Jouko Nikula wrote:
> > Signed-off-by: Jouko Nikula <jouko.nikula@espotel.com>
> > ---
> >  package/i2c-tools/i2c-tools.mk |    5 +++++
> >  1 file changed, 5 insertions(+)
> 
> Applied, thanks.

In fact, I will revert it: the modified i2c-dev.h by the i2c-tools
has some definitions that conflicts with the i2c.h normally provided by
the kernel headers. Therefore, if a userspace program or library
includes both, it fails to build. This is the case with libsoc, see
http://autobuild.buildroot.org/results/1f4/1f451a338487a2a3c8a8f9b18540d41b90ee5aac/build-end.log:

In file included from ../lib/include/libsoc_i2c.h:2:0,
                 from i2c.c:11:
/home/test/test/1/output/host/usr/sh4-buildroot-linux-uclibc/sysroot/usr/include/linux/i2c-dev.h:38:8: error: redefinition of 'struct i2c_msg'
In file included from ../lib/include/libsoc_i2c.h:1:0,
                 from i2c.c:11:
/home/test/test/1/output/host/usr/sh4-buildroot-linux-uclibc/sysroot/usr/include/linux/i2c.h:68:8: note: originally defined here
In file included from ../lib/include/libsoc_i2c.h:2:0,
                 from i2c.c:11:
/home/test/test/1/output/host/usr/sh4-buildroot-linux-uclibc/sysroot/usr/include/linux/i2c-dev.h:90:7: error: redefinition of 'union i2c_smbus_data'
In file included from ../lib/include/libsoc_i2c.h:1:0,
                 from i2c.c:11:
/home/test/test/1/output/host/usr/sh4-buildroot-linux-uclibc/sysroot/usr/include/linux/i2c.h:128:7: note: originally defined here
make[2]: *** [libsoc_la-i2c.lo] Error 1

Apparently, it is well-known to the i2c-tools developers that their
i2c-dev.h is broken, and not really usable in practice.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2014-03-04 18:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-24 10:18 [Buildroot] [PATCH] i2c-tools: Add i2c-dev.h to staging directory for userspace i2c drivers Jouko Nikula
2013-09-24 10:18 ` [Buildroot] [PATCH] Update config.guess to version 2013-06-10 Jouko Nikula
2013-09-24 10:27   ` Nikula Jouko
2013-09-24 15:20 ` [Buildroot] [PATCH] i2c-tools: Add i2c-dev.h to staging directory for userspace i2c drivers Thomas Petazzoni
2013-09-24 15:55   ` Baruch Siach
2013-09-24 16:46   ` Will Wagner
2013-09-25  5:14     ` Nikula Jouko
2014-03-03 21:10 ` Thomas Petazzoni
2014-03-04 18:14   ` Thomas Petazzoni

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