public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/releng:master commit in: tools-musl/portage/, tools-musl/
@ 2014-02-05 19:48 Anthony G. Basile
  0 siblings, 0 replies; 3+ messages in thread
From: Anthony G. Basile @ 2014-02-05 19:48 UTC (permalink / raw
  To: gentoo-commits

commit:     b81a0c349874f03b6ef9980d3f10f02cc7513b16
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 19:49:16 2014 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Wed Feb  5 19:49:16 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/releng.git;a=commit;h=b81a0c34

tools-musl: make the run.sh script work for both amd64 and i686

---
 tools-musl/portage/make.conf |  2 +-
 tools-musl/run.sh            | 30 +++++++++++++++++++++++++-----
 2 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/tools-musl/portage/make.conf b/tools-musl/portage/make.conf
index 041ec69..63003ee 100644
--- a/tools-musl/portage/make.conf
+++ b/tools-musl/portage/make.conf
@@ -1,4 +1,4 @@
-CHOST=x86_64-gentoo-linux-musl
+CHOST=ALTARCH-gentoo-linux-musl
 CFLAGS="-Os -pipe -fomit-frame-pointer"
 CXXFLAGS="${CFLAGS}"
 

diff --git a/tools-musl/run.sh b/tools-musl/run.sh
index ae21c08..4ff3785 100755
--- a/tools-musl/run.sh
+++ b/tools-musl/run.sh
@@ -1,24 +1,40 @@
 #!/bin/bash
 
-ROOTFS="stage4-amd64-musl-vanilla"
+MYARCH=${1:-"amd64"}
+
+if [[ "$MYARCH" != "amd64" && "$MYARCH" != "i686" ]]; then
+	echo "Unsupported arch $MYARCH"
+	exit
+fi
+
+[[ "$MYARCH" == "amd64" ]] && ALTARCH="x86_64"
+[[ "$MYARCH" == "i686" ]] && ALTARCH="i386"
+
+ROOTFS="stage4-${MYARCH}-musl-vanilla"
 PWD="$(pwd)"
 
 prepare_etc () {
 	mkdir -p "${ROOTFS}"/etc
 	cp -a "${PWD}"/portage/ "${ROOTFS}"/etc/
+
+	if [[ "$MYARCH" == "amd64" ]]; then
+		sed -i "s/ALTARCH/${ALTARCH}/" "${ROOTFS}"/etc/make.conf
+	elif [[ "$MYARCH" == "i686" ]]; then
+		sed -i "s/ALTARCH/${MYARCH}/" "${ROOTFS}"/etc/make.conf
+	fi
 }
 
 prepare_usr_etc() {
 	mkdir -p "${ROOTFS}"/usr/etc
 
-	cat <<-EOF > "${ROOTFS}"/usr/etc/ld-musl-x86_64.path
+	cat <<-EOF > "${ROOTFS}"/usr/etc/ld-musl-${ALTARCH}.path
 	/lib
 	/usr/lib
-	/usr/lib/gcc/x86_64-gentoo-linux-musl/4.7.3
-	/usr/x86_64-gentoo-linux-musl/lib
+	/usr/lib/gcc/${ALTARCH}-gentoo-linux-musl/4.7.3
+	/usr/${ALTARCH}-gentoo-linux-musl/lib
 	EOF
 
-	ln -sf ld-musl-x86_64.path "${ROOTFS}"/usr/etc/ld-musl.path
+	ln -sf ld-musl-${ALTARCH}.path "${ROOTFS}"/usr/etc/ld-musl.path
 }
 
 prepare_overlay() {
@@ -39,6 +55,10 @@ setup_configs() {
 	sed -i '/^SYNC/d' "${ROOTFS}"/etc/portage/make.conf
 	sed -i '/^GENTOO_MIRRORS/d' "${ROOTFS}"/etc/portage/make.conf
 	sed -i 's/^MAKEOPTS/#MAKEOPTS/' "${ROOTFS}"/etc/portage/make.conf
+
+	# There are some issue with python3, so let's select python2
+	# which so far is option 1 in elesect python.
+	chroot "${ROOTFS}" eselect python set 1
 }
 
 bundle_it() {


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

* [gentoo-commits] proj/releng:master commit in: tools-musl/portage/, tools-musl/
@ 2014-02-18 21:04 Anthony G. Basile
  0 siblings, 0 replies; 3+ messages in thread
From: Anthony G. Basile @ 2014-02-18 21:04 UTC (permalink / raw
  To: gentoo-commits

commit:     d1fd40ee74578cf24bb4104fc06b4d2cc0f3a5e4
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 18 21:00:59 2014 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Tue Feb 18 21:05:21 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/releng.git;a=commit;h=d1fd40ee

tools-musl: fix make.profile sym link

---
 tools-musl/portage/make.profile | 1 -
 tools-musl/run.sh               | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools-musl/portage/make.profile b/tools-musl/portage/make.profile
deleted file mode 120000
index 37eb357..0000000
--- a/tools-musl/portage/make.profile
+++ /dev/null
@@ -1 +0,0 @@
-/usr/portage/profiles/hardened/linux/musl/amd64
\ No newline at end of file

diff --git a/tools-musl/run.sh b/tools-musl/run.sh
index 83a8103..ba1324d 100755
--- a/tools-musl/run.sh
+++ b/tools-musl/run.sh
@@ -22,8 +22,10 @@ prepare_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
 }
 


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

* [gentoo-commits] proj/releng:master commit in: tools-musl/portage/, tools-musl/
@ 2014-02-24 16:02 Anthony G. Basile
  0 siblings, 0 replies; 3+ messages in thread
From: Anthony G. Basile @ 2014-02-24 16:02 UTC (permalink / raw
  To: gentoo-commits

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() {


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

end of thread, other threads:[~2014-02-24 16:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-18 21:04 [gentoo-commits] proj/releng:master commit in: tools-musl/portage/, tools-musl/ Anthony G. Basile
  -- strict thread matches above, loose matches on Subject: below --
2014-02-24 16:02 Anthony G. Basile
2014-02-05 19:48 Anthony G. Basile

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