summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-06-30 12:16:34 +0000
committerMike Frysinger <vapier@gentoo.org>2007-06-30 12:16:34 +0000
commit927ae6d7ed3733fcfd737a5da3d2988b6de5841e (patch)
tree0d8a7e565aa6470b9cb513b05b3ca9a3e4f8069e /sys-libs
parentCleanup (diff)
downloadgentoo-2-927ae6d7ed3733fcfd737a5da3d2988b6de5841e.tar.gz
gentoo-2-927ae6d7ed3733fcfd737a5da3d2988b6de5841e.tar.bz2
gentoo-2-927ae6d7ed3733fcfd737a5da3d2988b6de5841e.zip
Use `as` and `file` to determine the toolchain endianness #171849.
(Portage version: 2.1.3_rc6)
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/uclibc/ChangeLog7
-rw-r--r--sys-libs/uclibc/uclibc-0.9.27-r1.ebuild15
-rw-r--r--sys-libs/uclibc/uclibc-0.9.28-r1.ebuild15
-rw-r--r--sys-libs/uclibc/uclibc-0.9.28-r2.ebuild15
-rw-r--r--sys-libs/uclibc/uclibc-0.9.28.1.ebuild15
-rw-r--r--sys-libs/uclibc/uclibc-0.9.28.3.ebuild17
-rw-r--r--sys-libs/uclibc/uclibc-0.9.28.ebuild15
7 files changed, 73 insertions, 26 deletions
diff --git a/sys-libs/uclibc/ChangeLog b/sys-libs/uclibc/ChangeLog
index 920877bd02f1..9711c3c77143 100644
--- a/sys-libs/uclibc/ChangeLog
+++ b/sys-libs/uclibc/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-libs/uclibc
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.21 2007/04/07 11:13:33 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.22 2007/06/30 12:16:34 vapier Exp $
+
+ 30 Jun 2007; Mike Frysinger <vapier@gentoo.org> uclibc-0.9.27-r1.ebuild,
+ uclibc-0.9.28.ebuild, uclibc-0.9.28-r1.ebuild, uclibc-0.9.28-r2.ebuild,
+ uclibc-0.9.28.1.ebuild, uclibc-0.9.28.3.ebuild:
+ Use `as` and `file` to determine the toolchain endianness #171849.
07 Apr 2007; Mike Frysinger <vapier@gentoo.org> uclibc-0.9.28.3.ebuild:
Install hostutils (ldd/ldconfig) for cross-compilers #172207.
diff --git a/sys-libs/uclibc/uclibc-0.9.27-r1.ebuild b/sys-libs/uclibc/uclibc-0.9.27-r1.ebuild
index db8e837869e0..a637c5af1c61 100644
--- a/sys-libs/uclibc/uclibc-0.9.27-r1.ebuild
+++ b/sys-libs/uclibc/uclibc-0.9.27-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.27-r1.ebuild,v 1.26 2007/06/26 02:56:29 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.27-r1.ebuild,v 1.27 2007/06/30 12:16:34 vapier Exp $
inherit eutils flag-o-matic toolchain-funcs
@@ -67,9 +67,16 @@ just_headers() {
}
uclibc_endian() {
- printf "#include <endian.h>\n#if __BYTE_ORDER == __LITTLE_ENDIAN\nlittle\n#else\nbig\n#endif\n" \
- | $(tc-getCPP ${CTARGET}) - \
- | tail -n 1
+ # XXX: this wont work for a toolchain which is bi-endian, but we
+ # dont have any such thing at the moment, so not a big deal
+ touch "${T}"/endian.s
+ $(tc-getAS) "${T}"/endian.s -o "${T}"/endian.o
+ case $(file "${T}"/endian.o) in
+ *" MSB "*) echo "big";;
+ *" LSB "*) echo "little";;
+ *) echo "NFC";;
+ esac
+ rm -f "${T}"/endian.{s,o}
}
pkg_setup() {
diff --git a/sys-libs/uclibc/uclibc-0.9.28-r1.ebuild b/sys-libs/uclibc/uclibc-0.9.28-r1.ebuild
index a197ecdf0f56..fbc07afcd180 100644
--- a/sys-libs/uclibc/uclibc-0.9.28-r1.ebuild
+++ b/sys-libs/uclibc/uclibc-0.9.28-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28-r1.ebuild,v 1.11 2007/06/26 02:56:29 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28-r1.ebuild,v 1.12 2007/06/30 12:16:34 vapier Exp $
#ESVN_REPO_URI="svn://uclibc.org/trunk/uClibc"
#inherit subversion
@@ -65,9 +65,16 @@ just_headers() {
}
uclibc_endian() {
- printf "#include <endian.h>\n#if __BYTE_ORDER == __LITTLE_ENDIAN\nlittle\n#else\nbig\n#endif\n" \
- | $(tc-getCPP ${CTARGET}) - \
- | tail -n 1
+ # XXX: this wont work for a toolchain which is bi-endian, but we
+ # dont have any such thing at the moment, so not a big deal
+ touch "${T}"/endian.s
+ $(tc-getAS) "${T}"/endian.s -o "${T}"/endian.o
+ case $(file "${T}"/endian.o) in
+ *" MSB "*) echo "big";;
+ *" LSB "*) echo "little";;
+ *) echo "NFC";;
+ esac
+ rm -f "${T}"/endian.{s,o}
}
pkg_setup() {
diff --git a/sys-libs/uclibc/uclibc-0.9.28-r2.ebuild b/sys-libs/uclibc/uclibc-0.9.28-r2.ebuild
index cbeb7c50b140..4e265a946529 100644
--- a/sys-libs/uclibc/uclibc-0.9.28-r2.ebuild
+++ b/sys-libs/uclibc/uclibc-0.9.28-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28-r2.ebuild,v 1.6 2007/06/26 02:56:29 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28-r2.ebuild,v 1.7 2007/06/30 12:16:34 vapier Exp $
#ESVN_REPO_URI="svn://uclibc.org/trunk/uClibc"
#inherit subversion
@@ -65,9 +65,16 @@ just_headers() {
}
uclibc_endian() {
- printf "#include <endian.h>\n#if __BYTE_ORDER == __LITTLE_ENDIAN\nlittle\n#else\nbig\n#endif\n" \
- | $(tc-getCPP ${CTARGET}) - \
- | tail -n 1
+ # XXX: this wont work for a toolchain which is bi-endian, but we
+ # dont have any such thing at the moment, so not a big deal
+ touch "${T}"/endian.s
+ $(tc-getAS) "${T}"/endian.s -o "${T}"/endian.o
+ case $(file "${T}"/endian.o) in
+ *" MSB "*) echo "big";;
+ *" LSB "*) echo "little";;
+ *) echo "NFC";;
+ esac
+ rm -f "${T}"/endian.{s,o}
}
pkg_setup() {
diff --git a/sys-libs/uclibc/uclibc-0.9.28.1.ebuild b/sys-libs/uclibc/uclibc-0.9.28.1.ebuild
index 217af6c453a6..7b68c7596f54 100644
--- a/sys-libs/uclibc/uclibc-0.9.28.1.ebuild
+++ b/sys-libs/uclibc/uclibc-0.9.28.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.1.ebuild,v 1.4 2007/06/26 02:56:29 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.1.ebuild,v 1.5 2007/06/30 12:16:34 vapier Exp $
#ESVN_REPO_URI="svn://uclibc.org/trunk/uClibc"
#inherit subversion
@@ -65,9 +65,16 @@ just_headers() {
}
uclibc_endian() {
- printf "#include <endian.h>\n#if __BYTE_ORDER == __LITTLE_ENDIAN\nlittle\n#else\nbig\n#endif\n" \
- | $(tc-getCPP ${CTARGET}) - \
- | tail -n 1
+ # XXX: this wont work for a toolchain which is bi-endian, but we
+ # dont have any such thing at the moment, so not a big deal
+ touch "${T}"/endian.s
+ $(tc-getAS) "${T}"/endian.s -o "${T}"/endian.o
+ case $(file "${T}"/endian.o) in
+ *" MSB "*) echo "big";;
+ *" LSB "*) echo "little";;
+ *) echo "NFC";;
+ esac
+ rm -f "${T}"/endian.{s,o}
}
pkg_setup() {
diff --git a/sys-libs/uclibc/uclibc-0.9.28.3.ebuild b/sys-libs/uclibc/uclibc-0.9.28.3.ebuild
index 284aa5bbfdb1..c6dee0d72144 100644
--- a/sys-libs/uclibc/uclibc-0.9.28.3.ebuild
+++ b/sys-libs/uclibc/uclibc-0.9.28.3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3.ebuild,v 1.3 2007/06/26 02:56:29 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3.ebuild,v 1.4 2007/06/30 12:16:34 vapier Exp $
#ESVN_REPO_URI="svn://uclibc.org/trunk/uClibc"
#inherit subversion
@@ -38,7 +38,7 @@ LICENSE="LGPL-2"
[[ ${CTARGET} != ${CHOST} ]] \
&& SLOT="${CTARGET}" \
|| SLOT="0"
-KEYWORDS="-* ~arm ~m68k -mips ~ppc ~sh ~sparc x86"
+KEYWORDS="-* arm m68k -mips ppc sh sparc x86"
IUSE="build uclibc-compat debug hardened iconv ipv6 minimal nls pregen savedconfig userlocales wordexp"
RESTRICT="nostrip"
@@ -66,9 +66,16 @@ just_headers() {
}
uclibc_endian() {
- printf "#include <endian.h>\n#if __BYTE_ORDER == __LITTLE_ENDIAN\nlittle\n#else\nbig\n#endif\n" \
- | $(tc-getCPP ${CTARGET}) - \
- | tail -n 1
+ # XXX: this wont work for a toolchain which is bi-endian, but we
+ # dont have any such thing at the moment, so not a big deal
+ touch "${T}"/endian.s
+ $(tc-getAS) "${T}"/endian.s -o "${T}"/endian.o
+ case $(file "${T}"/endian.o) in
+ *" MSB "*) echo "big";;
+ *" LSB "*) echo "little";;
+ *) echo "NFC";;
+ esac
+ rm -f "${T}"/endian.{s,o}
}
pkg_setup() {
diff --git a/sys-libs/uclibc/uclibc-0.9.28.ebuild b/sys-libs/uclibc/uclibc-0.9.28.ebuild
index 8270e6c99108..f6a8874a3fb2 100644
--- a/sys-libs/uclibc/uclibc-0.9.28.ebuild
+++ b/sys-libs/uclibc/uclibc-0.9.28.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.ebuild,v 1.31 2007/06/26 02:56:29 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.ebuild,v 1.32 2007/06/30 12:16:34 vapier Exp $
#ESVN_REPO_URI="svn://uclibc.org/trunk/uClibc"
#inherit subversion
@@ -65,9 +65,16 @@ just_headers() {
}
uclibc_endian() {
- printf "#include <endian.h>\n#if __BYTE_ORDER == __LITTLE_ENDIAN\nlittle\n#else\nbig\n#endif\n" \
- | $(tc-getCPP ${CTARGET}) - \
- | tail -n 1
+ # XXX: this wont work for a toolchain which is bi-endian, but we
+ # dont have any such thing at the moment, so not a big deal
+ touch "${T}"/endian.s
+ $(tc-getAS) "${T}"/endian.s -o "${T}"/endian.o
+ case $(file "${T}"/endian.o) in
+ *" MSB "*) echo "big";;
+ *" LSB "*) echo "little";;
+ *) echo "NFC";;
+ esac
+ rm -f "${T}"/endian.{s,o}
}
pkg_setup() {