tools-musl: switch to catalyst for mipsel3

This commit is contained in:
Anthony G. Basile 2014-06-18 06:57:51 -04:00
parent 66399197ef
commit 1dc7171669
10 changed files with 155 additions and 0 deletions

View file

@ -0,0 +1,15 @@
post_src_install() {
[[ $PN != musl ]] && return 0
local LDSO_ARCH=$(basename "${D}"/lib/ld-musl-*.so.1)
mkdir "${D}"/usr/etc
cat > "${D}"/usr/etc/${LDSO_ARCH%so.1}path <<EOF
/lib
/usr/lib
/usr/local/lib
/usr/lib/opengl/xorg-x11/lib
/usr/lib/gcc/${CHOST}/4.7.3
/usr/${CHOST}/lib
/usr/games/lib
EOF
}

View file

@ -0,0 +1,2 @@
CFLAGS="-Wl,-lintl"
LDFLAGS="-lintl"

View file

@ -0,0 +1 @@
MAKEOPTS=-j1

View file

@ -0,0 +1,9 @@
dev-libs/glib libintl.conf
dev-libs/libelf libintl.conf
sys-apps/attr libintl.conf
sys-apps/kbd libintl.conf
sys-apps/man-db parallel.conf
sys-apps/net-tools libintl.conf
sys-fs/e2fsprogs libintl.conf
sys-fs/eudev libintl.conf
sys-process/procps libintl.conf

View file

@ -0,0 +1,2 @@
=sys-libs/musl-1.1.2 ~*
=sys-apps/getent-0 ~*

View file

@ -0,0 +1,6 @@
>app-misc/pax-utils-0.7
dev-util/pkgconfig
>sys-apps/kbd-1.15.5-r99
sys-apps/systemd
>sys-devel/gcc-4.7.3-r99
sys-fs/udev

View file

@ -0,0 +1 @@
=dev-libs/openssl-1.0.1g-r99::hardened-dev

View file

@ -0,0 +1,2 @@
dev-util/pkgconf pkg-config
sys-libs/musl nls

View file

@ -0,0 +1 @@
hardened

116
tools-musl/run-mipsel3.sh Normal file
View file

@ -0,0 +1,116 @@
#!/bin/bash
source /etc/catalyst/catalyst.conf
mydate=`date +%Y%m%d`
prepare_confs() {
local arch=$1
local flavor=$2
for s in 1 2 3; do
local cstage=stage${s}
local p=$(( s - 1 ))
[[ $p == 0 ]] && p=3
local pstage=stage${p}
local tarch="${arch%3}"
local parch="mips/${tarch}"
cat stage-all.conf.template | \
sed -e "s:\(^version_stamp.*$\):\1-${mydate}:" \
-e "s:CSTAGE:${cstage}:g" \
-e "s:PSTAGE:${pstage}:g" \
-e "s:SARCH:${arch}:g" \
-e "s:PARCH:${parch}:g" \
-e "s:TARCH:${tarch}:g" \
-e "s:FLAVOR:${flavor}:g" \
-e "s:MYCATALYST:$(pwd):g" \
-e "s|^cflags:.*|cflags: -O2 -march=mips3 -mplt -Wa,-mfix-loongson2f-nop -pipe|" \
-e "s|^cxxflags:.*|cxxflags: -O2 -march=mips3 -mplt -Wa,-mfix-loongson2f-nop -pipe|" \
> stage${s}-${arch}-musl-${flavor}.conf
done
sed -i "/^chost/d" stage3-${arch}-musl-${flavor}.conf
}
banner() {
cat << EOF | tee -a zzz.log > stage$1-$2-musl-$3.log
************************************************************************
* stage$1-$2-musl-$3
************************************************************************"
EOF
}
do_stages() {
local arch=$1
local flavor=$2
for s in 1 2 3; do
local tgpath="${storedir}/builds/${flavor}/${arch}"
local target="stage${s}-${arch}-musl-${flavor}-${mydate}.tar.bz2"
local tglink="stage${s}-${arch}-musl-${flavor}.tar.bz2"
if [[ ! -f "${tgpath}/${tglink}" ]]; then
touch stage${s}-${arch}-musl-${flavor}.log
echo "!!! ${target} at ${tgpath} doesn't exit" \
| tee -a zzz.log \
> stage${s}-${arch}-musl-${flavor}.err
return 1
fi
banner ${s} ${arch} ${flavor}
catalyst -f stage${s}-${arch}-musl-${flavor}.conf \
| tee -a zzz.log \
> stage${s}-${arch}-musl-${flavor}.log \
2> stage${s}-${arch}-musl-${flavor}.err
if [[ -f "${tgpath}/${target}" ]]; then
rm -f "${tgpath}/${tglink}"
ln -s ${target} "${tgpath}/${tglink}"
else
echo "!!! ${target} was not generated" \
| tee -a zzz.log \
>stage${s}-${arch}-musl-${flavor}.err
return 1
fi
done
return 0
}
#
# approximate timings:
#
# catalyst -s current 3 minutes
# catalyst -f stage1 130 minutes
#
main() {
>zzz.log
# catalyst -s current | tee -a zzz.log >snapshot.log 2>snapshot.err
for arch in mipsel3; do
for flavor in vanilla; do
prepare_confs ${arch} ${flavor}
done
done
# for arch in mipsel3; do
# for flavor in vanilla; do
# do_stages ${arch} ${flavor}
# ret=$?
# if [[ $? == 1 ]]; then
# echo "FAILURE at ${arch} ${flavor} " | tee zzz.log
# return 1
# fi
# done
# done
}
main $1 &