From: "Anthony G. Basile" <blueness@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/releng:master commit in: tools-musl/
Date: Wed, 5 Feb 2014 20:11:27 +0000 (UTC) [thread overview]
Message-ID: <1391631118.765628f6fd1f76bc0a23de190646846ded1c6995.blueness@gentoo> (raw)
commit: 765628f6fd1f76bc0a23de190646846ded1c6995
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 5 20:11:58 2014 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Wed Feb 5 20:11:58 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/releng.git;a=commit;h=765628f6
tools-musl: automatically detect amd64 vs i686
---
tools-musl/run.sh | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/tools-musl/run.sh b/tools-musl/run.sh
index 4ff3785..c9127b4 100755
--- a/tools-musl/run.sh
+++ b/tools-musl/run.sh
@@ -1,15 +1,18 @@
#!/bin/bash
-MYARCH=${1:-"amd64"}
-
-if [[ "$MYARCH" != "amd64" && "$MYARCH" != "i686" ]]; then
+TEST_ARCH=$(file -b /usr/lib/libc.so | sed -e 's/^.*shared object, //' -e 's/,.*$//')
+
+if [[ "${TEST_ARCH}" == "Intel 80386" ]]; then
+ MYARCH="i686"
+ ALTARCH="i386"
+elif [[ "${TEST_ARCH}" == "x86-64" ]]; then
+ MYARCH="amd64"
+ ALTARCH="x86_64"
+else
echo "Unsupported arch $MYARCH"
exit
fi
-[[ "$MYARCH" == "amd64" ]] && ALTARCH="x86_64"
-[[ "$MYARCH" == "i686" ]] && ALTARCH="i386"
-
ROOTFS="stage4-${MYARCH}-musl-vanilla"
PWD="$(pwd)"
@@ -18,9 +21,9 @@ prepare_etc () {
cp -a "${PWD}"/portage/ "${ROOTFS}"/etc/
if [[ "$MYARCH" == "amd64" ]]; then
- sed -i "s/ALTARCH/${ALTARCH}/" "${ROOTFS}"/etc/make.conf
+ sed -i "s/ALTARCH/${ALTARCH}/" "${ROOTFS}"/etc/portage/make.conf
elif [[ "$MYARCH" == "i686" ]]; then
- sed -i "s/ALTARCH/${MYARCH}/" "${ROOTFS}"/etc/make.conf
+ sed -i "s/ALTARCH/${MYARCH}/" "${ROOTFS}"/etc/portage/make.conf
fi
}
next reply other threads:[~2014-02-05 20:11 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-05 20:11 Anthony G. Basile [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-02-05 20:13 [gentoo-commits] proj/releng:master commit in: tools-musl/ Anthony G. Basile
2014-02-06 13:06 Anthony G. Basile
2014-02-18 21:04 Anthony G. Basile
2014-06-18 11:14 Anthony G. Basile
2014-06-28 10:43 Anthony G. Basile
2014-08-11 22:43 Anthony G. Basile
2014-08-13 14:28 Anthony G. Basile
2014-08-18 21:59 Robin H. Johnson
2014-08-18 21:59 Robin H. Johnson
2015-01-20 23:38 Anthony G. Basile
2015-06-14 21:01 Anthony G. Basile
2015-06-14 21:32 Anthony G. Basile
2015-12-07 0:54 Anthony G. Basile
2016-06-04 16:07 Anthony G. Basile
2017-01-02 4:08 Matt Thode
2017-01-02 4:21 Matt Thode
2017-01-02 4:30 Matt Thode
2017-01-02 23:59 Matt Thode
2017-01-03 3:01 Matt Thode
2017-01-05 5:41 Matt Thode
2018-03-02 16:25 Anthony G. Basile
2019-04-11 1:37 Anthony G. Basile
2019-04-13 10:54 Anthony G. Basile
2019-05-24 3:50 Matthew Thode
2020-01-14 19:11 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=1391631118.765628f6fd1f76bc0a23de190646846ded1c6995.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