cross-mipsel-linux-muslhf: update to 0.22.

This commit is contained in:
Enno Boland 2016-11-26 19:05:28 +01:00
parent e5a2acc3e2
commit 3bea6f626f
5 changed files with 65 additions and 30 deletions

View file

@ -0,0 +1 @@
../../gcc/patches/fix-cxxflags-passing.patch

View file

@ -1 +0,0 @@
../../gcc/files/gcc-4.9.2-musl.diff

View file

@ -0,0 +1 @@
../../gcc/files/gcc-6.2.1-musl.diff

View file

@ -1 +0,0 @@
../../gcc/patches/gcc-spec-env-r1.patch

View file

@ -1,9 +1,9 @@
# Template build file for 'cross-mipsel-linux-muslhf' # Template build file for 'cross-mipsel-linux-muslhf'
# #
_binutils_version=2.27 _binutils_version=2.27
_gcc_version=4.9.4 _gcc_version=6.2.1
_musl_version=1.1.15 _musl_version=1.1.15
_linux_version=3.18.25 _linux_version=4.1.34
_triplet=mipsel-linux-muslhf _triplet=mipsel-linux-muslhf
_fpuflags="--with-float=hard --with-fp" _fpuflags="--with-float=hard --with-fp"
@ -11,21 +11,21 @@ _archflags="-march=mips32r2 -mhard-float"
_sysroot="/usr/${_triplet}" _sysroot="/usr/${_triplet}"
pkgname=cross-${_triplet} pkgname=cross-${_triplet}
version=0.21 version=0.22
revision=6 revision=1
short_desc="Cross toolchain for MIPS32r2 LE hardfloat target (musl)" short_desc="Cross toolchain for MIPS32r2 LE hardfloat target (musl)"
maintainer="Juan RP <xtraeme@voidlinux.eu>" maintainer="Juan RP <xtraeme@voidlinux.eu>"
homepage="http://www.voidlinux.eu" homepage="http://www.voidlinux.eu"
license="GPL-3, GPL-2, MIT" license="GPL-3, GPL-2, MIT"
distfiles=" distfiles="
http://ftp.gnu.org/pub/gnu/binutils/binutils-${_binutils_version}.tar.bz2 ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.bz2
http://ftp.gnu.org/pub/gnu/gcc/gcc-${_gcc_version}/gcc-${_gcc_version}.tar.bz2 https://repo.voidlinux.eu/distfiles/gcc-$_gcc_version.tar.xz
http://www.kernel.org/pub/linux/kernel/v3.x/linux-${_linux_version}.tar.xz ${KERNEL_SITE}/kernel/v4.x/linux-${_linux_version}.tar.xz
http://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz" http://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz"
checksum=" checksum="
369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88 369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88
6c11d292cd01b294f9f84c9a59c230d80e9e4a47e5c6355f046bb36d4f358092 a7addd2d4e42e66c3b56ced8baee5a11ef7fb577e23615a4f43877273eaf9409
c649874e2856101df7cefe5fdad313ebb2282a939fc1e95cf02222327745ff92 412316b32b5c7a513ba3ab8e68fc443db4d9423f07b577473089def0ee7406af
97e447c7ee2a7f613186ec54a93054fe15469fe34d7d323080f7ef38f5ecb0fa" 97e447c7ee2a7f613186ec54a93054fe15469fe34d7d323080f7ef38f5ecb0fa"
lib32disabled=yes lib32disabled=yes
@ -49,6 +49,8 @@ _apply_patch() {
} }
_binutils_build() { _binutils_build() {
local _args
[ -f ${wrksrc}/.binutils_build_done ] && return 0 [ -f ${wrksrc}/.binutils_build_done ] && return 0
cd ${wrksrc} cd ${wrksrc}
@ -57,10 +59,16 @@ _binutils_build() {
[ ! -d binutils-build ] && mkdir binutils-build [ ! -d binutils-build ] && mkdir binutils-build
cd binutils-build cd binutils-build
../binutils-${_binutils_version}/configure \ _args="--prefix=/usr"
--prefix=/usr --target=${_triplet} --with-sysroot=${_sysroot} \ _args+=" --target=${_triplet}"
--disable-nls --disable-multilib --disable-werror \ _args+=" --with-sysroot=${_sysroot}"
--disable-shared ${_fpuflags} _args+=" --disable-nls"
_args+=" --disable-multilib"
_args+=" --disable-werror"
_args+=" --disable-shared"
_args+=" ${_fpuflags}"
../binutils-${_binutils_version}/configure ${_args}
make configure-host && make ${makejobs} make configure-host && make ${makejobs}
make install make install
@ -69,25 +77,40 @@ _binutils_build() {
} }
_gcc_bootstrap() { _gcc_bootstrap() {
local _args
[ -f ${wrksrc}/.gcc_bootstrap_done ] && return 0 [ -f ${wrksrc}/.gcc_bootstrap_done ] && return 0
cd ${wrksrc}/gcc-${_gcc_version} cd ${wrksrc}/gcc-${_gcc_version}
_apply_patch -p1 ${FILESDIR}/gcc-4.9.2-musl.diff _apply_patch -p1 ${FILESDIR}/gcc-6.2.1-musl.diff
_apply_patch -p0 ${FILESDIR}/libcpp-source_date_epoch.patch _apply_patch -p0 ${FILESDIR}/libcpp-source_date_epoch.patch
_apply_patch -p0 ${FILESDIR}/gcc-spec-env-r1.patch _apply_patch -p0 ${FILESDIR}/fix-cxxflags-passing.patch
msg_normal "Building cross gcc bootstrap\n" msg_normal "Building cross gcc bootstrap\n"
[ ! -d ../gcc-bootstrap ] && mkdir ../gcc-bootstrap [ ! -d ../gcc-bootstrap ] && mkdir ../gcc-bootstrap
cd ../gcc-bootstrap cd ../gcc-bootstrap
_args="--prefix=/usr"
_args+=" --target=${_triplet}"
_args+=" --with-sysroot=${_sysroot}"
_args+=" --with-newlib"
_args+=" --enable-languages=c"
_args+=" --with-newlib"
_args+=" --disable-libssp"
_args+=" --disable-nls"
_args+=" --disable-libquadmath"
_args+=" --disable-threads"
_args+=" --disable-decimal-float"
_args+=" --disable-shared"
_args+=" --disable-libmpx"
_args+=" --disable-libmudflap"
_args+=" --disable-libgomp"
_args+=" --disable-libatomic"
_args+=" ${_fpuflags}"
CFLAGS="-O0 -g0" CXXFLAGS="-O0 -g0" \ CFLAGS="-O0 -g0" CXXFLAGS="-O0 -g0" \
../gcc-${_gcc_version}/configure --prefix=/usr \ ../gcc-${_gcc_version}/configure ${_args}
--target=${_triplet} --with-sysroot=${_sysroot} --with-newlib \
--enable-languages=c --with-newlib --disable-libssp --disable-nls \
--disable-libquadmath --disable-threads --disable-decimal-float \
--disable-shared --disable-libmudflap --disable-libgomp \
--disable-libatomic ${_fpuflags}
make ${makejobs} make ${makejobs}
make install make install
@ -116,7 +139,7 @@ _musl_build() {
msg_normal "Building cross musl libc\n" msg_normal "Building cross musl libc\n"
CC="${_triplet}-gcc" CFLAGS="-Os -pipe ${_archflags}" \ CC="${_triplet}-gcc" CFLAGS="-Os -pipe ${_archflags}" \
./configure --prefix=/usr \ ./configure --prefix=/usr
make ${makejobs} make ${makejobs}
make DESTDIR=${_sysroot} install make DESTDIR=${_sysroot} install
@ -125,6 +148,8 @@ _musl_build() {
} }
_gcc_build() { _gcc_build() {
local _args
[ -f ${wrksrc}/.gcc_build_done ] && return 0 [ -f ${wrksrc}/.gcc_build_done ] && return 0
cd ${wrksrc} cd ${wrksrc}
@ -133,12 +158,22 @@ _gcc_build() {
[ ! -d gcc-build ] && mkdir gcc-build [ ! -d gcc-build ] && mkdir gcc-build
cd gcc-build cd gcc-build
../gcc-${_gcc_version}/configure \ _args="--prefix=/usr"
--target=${_triplet} --with-sysroot=${_sysroot} --prefix=/usr \ _args+=" --libexecdir=/usr/lib"
--libexecdir=/usr/lib --enable-languages=c,c++,lto \ _args+=" --target=${_triplet}"
--enable-lto --disable-libsanitizer \ _args+=" --with-sysroot=${_sysroot}"
--disable-multilib --disable-nls --disable-libquadmath \ _args+=" --enable-languages=c,c++,lto"
--disable-libmudflap --enable-shared ${_fpuflags} _args+=" --enable-lto"
_args+=" --disable-libsanitizer"
_args+=" --disable-multilib"
_args+=" --disable-nls"
_args+=" --disable-libquadmath"
_args+=" --disable-libmpx"
_args+=" --disable-libmudflap"
_args+=" --enable-shared"
_args+=" ${_fpuflags}"
../gcc-${_gcc_version}/configure ${_args}
make ${makejobs} make ${makejobs}