cross

cross-compilation toolchain using musl libc
git clone git://z3bra.org/cross
Log | Files | Refs | README

commit 8a07bf728fe137c7176668d19721004c7106f059
parent 2dddec87b2a09542d04ed6bfe77289843b1dc5cf
Author: z3bra <willyatmailoodotorg>
Date:   Fri Jan 29 13:30:55 2016

Use the CVS version of pcc from cross-pcc

Diffstat:
 cross-pcc                                      | 16 ++++++++--------
 patches/pcc-libs-20160123-musl-config_sub.diff | 22 ++++++++++++++++++++++
 2 files changed, 30 insertions(+), 8 deletions(-)

diff --git a/cross-pcc b/cross-pcc @@ -18,10 +18,10 @@ # cross compiler environment MARCH=$(uname -m) TRIPLE=${TRIPLE:-${MARCH}-linux-musl} -PREFIX=${PREFIX:-${HOME}/cross/pcc-${MARCH}} -BLDDIR=${BLDDIR:-${HOME}/cross/build} -SRCDIR=${SRCDIR:-${HOME}/cross/source} -PATCHD=${PATCHD:-${HOME}/cross/patches} +PREFIX=${PREFIX:-/opt/cross/pcc} +BLDDIR=${BLDDIR:-${HOME}/dump/work/build} +SRCDIR=${SRCDIR:-${HOME}/dump/work/source} +PATCHD=${PATCHD:-${HOME}/devel/cross/patches} # compilation variables PATH="${PREFIX}/bin:${PATH}" @@ -32,14 +32,14 @@ LDFLAGS="-Wl,--as-needed" MAKEFLAGS="-j8" # versions -PCCV=${PCCV:-1.1.0} +PCCV=${PCCV:-20160123} BINV=${BINV:-2.25} MUSLV=${MUSLV:-1.1.10} KERNV=${KERNV:-4.1.4} # source mirrors -PCCMIRROR=ftp://pcc.ludd.ltu.se/pub/pcc-releases +PCCMIRROR=ftp://pcc.ludd.ltu.se/pub GNUMIRROR=ftp://ftp.gnu.org/gnu MUSLMIRROR=http://www.musl-libc.org/releases LINUXMIRROR=https://www.kernel.org/pub/linux/kernel/v4.x @@ -54,8 +54,8 @@ cd "${SRCDIR}" # ┗━┛╹ # Get all GNU tarballs grab_sources() { -curl -# "${PCCMIRROR}/pcc-${PCCV}.tgz" | tar xz -curl -# "${PCCMIRROR}/pcc-libs-${PCCV}.tgz" | tar xz +curl -# "${PCCMIRROR}/pcc/pcc-${PCCV}.tgz" | tar xz +curl -# "${PCCMIRROR}/pcc-libs/pcc-libs-${PCCV}.tgz" | tar xz curl -# "${GNUMIRROR}/binutils/binutils-${BINV}.tar.gz" | tar xz curl -# "${MUSLMIRROR}/musl-${MUSLV}.tar.gz" | tar xz curl -# "${LINUXMIRROR}/linux-${KERNV}.tar.xz" | tar xJ diff --git a/patches/pcc-libs-20160123-musl-config_sub.diff b/patches/pcc-libs-20160123-musl-config_sub.diff @@ -0,0 +1,22 @@ +diff -urN a/config.sub b/config.sub +--- a/config.sub 2015-08-11 21:55:34.497619099 +0200 ++++ b/config.sub 2015-08-11 21:56:21.652621262 +0200 +@@ -120,7 +120,7 @@ + # Here we must recognize all the valid KERNEL-OS combinations. + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` + case $maybe_os in +- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ ++ nto-qnx* | linux-gnu* | linux-dietlibc | linux-musl | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os +@@ -1289,6 +1289,9 @@ + -linux-dietlibc) + os=-linux-dietlibc + ;; ++ -linux-musl) ++ os=-linux-musl ++ ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;;