public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Anthony G. Basile" <blueness@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/releng:master commit in: tools-musl/portage/, tools-musl/
Date: Mon, 24 Feb 2014 16:02:56 +0000 (UTC)	[thread overview]
Message-ID: <1393257857.80cb3a95e5aec13a5a64d203cae62b8c6267983a.blueness@gentoo> (raw)

commit:     80cb3a95e5aec13a5a64d203cae62b8c6267983a
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 24 15:59:23 2014 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon Feb 24 16:04:17 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/releng.git;a=commit;h=80cb3a95

tools-musl: add armv7a-hardfloat-linux-musleabi

---
 tools-musl/portage/make.conf               |  4 +--
 tools-musl/portage/package.accept_keywords |  6 ++---
 tools-musl/run.sh                          | 43 ++++++++++++++++--------------
 3 files changed, 28 insertions(+), 25 deletions(-)

diff --git a/tools-musl/portage/make.conf b/tools-musl/portage/make.conf
index b5e78de..ecd4450 100644
--- a/tools-musl/portage/make.conf
+++ b/tools-musl/portage/make.conf
@@ -1,5 +1,5 @@
-CHOST=ALTARCH-gentoo-linux-musl
-CFLAGS="-Os -pipe -fomit-frame-pointer"
+CHOST=MY_CHOST
+CFLAGS="-Os -pipe -fomit-frame-pointerMY_CFLAGS"
 CXXFLAGS="${CFLAGS}"
 
 USE="-hardened -fortran -mudflap"

diff --git a/tools-musl/portage/package.accept_keywords b/tools-musl/portage/package.accept_keywords
index a648330..30b370d 100644
--- a/tools-musl/portage/package.accept_keywords
+++ b/tools-musl/portage/package.accept_keywords
@@ -1,3 +1,3 @@
-=sys-apps/getent-0 ~amd64 ~x86
-=sys-libs/musl-0.9.15 ~amd64 ~x86
-=app-text/openjade-1.3.2-r6 ~amd64 ~x86
+=sys-apps/getent-0 ~amd64 ~arm ~x86
+=sys-libs/musl-0.9.15 ~amd64 ~arm ~x86
+=app-text/openjade-1.3.2-r6 ~amd64 ~arm ~x86

diff --git a/tools-musl/run.sh b/tools-musl/run.sh
index ba1324d..cf8685d 100755
--- a/tools-musl/run.sh
+++ b/tools-musl/run.sh
@@ -4,10 +4,23 @@ TEST_ARCH=$(file -b /usr/lib/libc.so | sed -e 's/^.*shared object, //' -e 's/,.*
 
 if [[ "${TEST_ARCH}" == "Intel 80386" ]]; then
 	MY_ARCH="i686"
-	ALTARCH="i386"
+	MY_CHOST="i686-gentoo-linux-musl"
+	MY_CFLAGS=""
+	MY_PROF="x86"
+	MY_PATH="i386"
 elif [[ "${TEST_ARCH}" == "x86-64" ]]; then
 	MY_ARCH="amd64"
-	ALTARCH="x86_64"
+	MY_CHOST="x86_64-gentoo-linux-musl"
+	MY_CFLAGS=""
+	MY_PROF="amd64"
+	MY_PATH="x86_64"
+elif [[ "${TEST_ARCH}" == "ARM" ]]; then
+	# Need better logic for alternative subarches and hard/softfloat
+	MY_ARCH="armv7a_hardfp"
+	MY_CHOST="armv7a-hardfloat-linux-musleabi"
+	MY_CFLAGS=" -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
+	MY_PROF="arm/armv7a"
+	MY_PATH="armhf"
 else
 	echo "Unsupported arch $TEST_ARCH"
 	exit
@@ -19,32 +32,22 @@ PWD="$(pwd)"
 prepare_etc () {
 	mkdir -p "${ROOTFS}"/etc
 	cp -a "${PWD}"/portage/ "${ROOTFS}"/etc/
-
-	if [[ "$MY_ARCH" == "amd64" ]]; then
-		sed -i "s/ALTARCH/${ALTARCH}/" "${ROOTFS}"/etc/portage/make.conf
-		ln -sf ../../usr/portage/profiles/hardened/linux/musl/amd64 "${ROOTFS}"/etc/portage/make.profile
-	elif [[ "$MY_ARCH" == "i686" ]]; then
-		sed -i "s/ALTARCH/${MY_ARCH}/" "${ROOTFS}"/etc/portage/make.conf
-		ln -sf ../../usr/portage/profiles/hardened/linux/musl/x86 "${ROOTFS}"/etc/portage/make.profile
-	fi
+	sed -i "s/MY_CHOST/${MY_CHOST}/" "${ROOTFS}"/etc/portage/make.conf
+	sed -i "s/MY_CFLAGS/${MY_CFLAGS}/" "${ROOTFS}"/etc/portage/make.conf
+	ln -sf ../../usr/portage/profiles/hardened/linux/musl/"${MY_PROF}" "${ROOTFS}"/etc/portage/make.profile
 }
 
 prepare_usr_etc() {
 	mkdir -p "${ROOTFS}"/usr/etc
 
-	local PATH_ARCH
-
-	[[ "$MY_ARCH" == "amd64" ]] && PATH_ARCH="x86_64"
-	[[ "$MY_ARCH" == "i686" ]] && PATH_ARCH="i686"
-
-	cat <<-EOF > "${ROOTFS}"/usr/etc/ld-musl-${ALTARCH}.path
+	cat <<-EOF > "${ROOTFS}"/usr/etc/ld-musl-${MY_PATH}.path
 	/lib
 	/usr/lib
-	/usr/lib/gcc/${PATH_ARCH}-gentoo-linux-musl/4.7.3
-	/usr/${PATH_ARCH}-gentoo-linux-musl/lib
+	/usr/lib/gcc/${MY_CHOST}/4.7.3
+	/usr/${MY_CHOST}/lib
 	EOF
 
-	ln -sf ld-musl-${ALTARCH}.path "${ROOTFS}"/usr/etc/ld-musl.path
+	ln -sf ld-musl-${MY_PATH}.path "${ROOTFS}"/usr/etc/ld-musl.path
 }
 
 prepare_overlay() {
@@ -55,7 +58,7 @@ prepare_overlay() {
 
 emerge_system() {
 	ROOT="${ROOTFS}" emerge --keep-going --with-bdeps=y -uvq @system 
-	ROOT="${ROOTFS}" emerge --keep-going --with-bdeps=y -uvq sandbox
+	FEATURES="-sandbox" ROOT="${ROOTFS}" emerge --keep-going --with-bdeps=y -uvq sandbox
 }
 
 mk_top_level_dirs() {


             reply	other threads:[~2014-02-24 16:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-24 16:02 Anthony G. Basile [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-02-18 21:04 [gentoo-commits] proj/releng:master commit in: tools-musl/portage/, tools-musl/ Anthony G. Basile
2014-02-05 19:48 Anthony G. Basile

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1393257857.80cb3a95e5aec13a5a64d203cae62b8c6267983a.blueness@gentoo \
    --to=blueness@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox