From 3bea6f626f03b02a5bf97311b8042f6d90e0c34c Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Sat, 26 Nov 2016 19:05:28 +0100 Subject: [PATCH] cross-mipsel-linux-muslhf: update to 0.22. --- .../files/fix-cxxflags-passing.patch | 1 + .../files/gcc-4.9.2-musl.diff | 1 - .../files/gcc-6.2.1-musl.diff | 1 + .../files/gcc-spec-env-r1.patch | 1 - srcpkgs/cross-mipsel-linux-muslhf/template | 91 +++++++++++++------ 5 files changed, 65 insertions(+), 30 deletions(-) create mode 120000 srcpkgs/cross-mipsel-linux-muslhf/files/fix-cxxflags-passing.patch delete mode 120000 srcpkgs/cross-mipsel-linux-muslhf/files/gcc-4.9.2-musl.diff create mode 120000 srcpkgs/cross-mipsel-linux-muslhf/files/gcc-6.2.1-musl.diff delete mode 120000 srcpkgs/cross-mipsel-linux-muslhf/files/gcc-spec-env-r1.patch diff --git a/srcpkgs/cross-mipsel-linux-muslhf/files/fix-cxxflags-passing.patch b/srcpkgs/cross-mipsel-linux-muslhf/files/fix-cxxflags-passing.patch new file mode 120000 index 0000000000..4a8c831e61 --- /dev/null +++ b/srcpkgs/cross-mipsel-linux-muslhf/files/fix-cxxflags-passing.patch @@ -0,0 +1 @@ +../../gcc/patches/fix-cxxflags-passing.patch \ No newline at end of file diff --git a/srcpkgs/cross-mipsel-linux-muslhf/files/gcc-4.9.2-musl.diff b/srcpkgs/cross-mipsel-linux-muslhf/files/gcc-4.9.2-musl.diff deleted file mode 120000 index 3d53eb4055..0000000000 --- a/srcpkgs/cross-mipsel-linux-muslhf/files/gcc-4.9.2-musl.diff +++ /dev/null @@ -1 +0,0 @@ -../../gcc/files/gcc-4.9.2-musl.diff \ No newline at end of file diff --git a/srcpkgs/cross-mipsel-linux-muslhf/files/gcc-6.2.1-musl.diff b/srcpkgs/cross-mipsel-linux-muslhf/files/gcc-6.2.1-musl.diff new file mode 120000 index 0000000000..9081d12e1b --- /dev/null +++ b/srcpkgs/cross-mipsel-linux-muslhf/files/gcc-6.2.1-musl.diff @@ -0,0 +1 @@ +../../gcc/files/gcc-6.2.1-musl.diff \ No newline at end of file diff --git a/srcpkgs/cross-mipsel-linux-muslhf/files/gcc-spec-env-r1.patch b/srcpkgs/cross-mipsel-linux-muslhf/files/gcc-spec-env-r1.patch deleted file mode 120000 index 8dd149359e..0000000000 --- a/srcpkgs/cross-mipsel-linux-muslhf/files/gcc-spec-env-r1.patch +++ /dev/null @@ -1 +0,0 @@ -../../gcc/patches/gcc-spec-env-r1.patch \ No newline at end of file diff --git a/srcpkgs/cross-mipsel-linux-muslhf/template b/srcpkgs/cross-mipsel-linux-muslhf/template index 347ea85c14..71837d713f 100644 --- a/srcpkgs/cross-mipsel-linux-muslhf/template +++ b/srcpkgs/cross-mipsel-linux-muslhf/template @@ -1,9 +1,9 @@ # Template build file for 'cross-mipsel-linux-muslhf' # _binutils_version=2.27 -_gcc_version=4.9.4 +_gcc_version=6.2.1 _musl_version=1.1.15 -_linux_version=3.18.25 +_linux_version=4.1.34 _triplet=mipsel-linux-muslhf _fpuflags="--with-float=hard --with-fp" @@ -11,21 +11,21 @@ _archflags="-march=mips32r2 -mhard-float" _sysroot="/usr/${_triplet}" pkgname=cross-${_triplet} -version=0.21 -revision=6 +version=0.22 +revision=1 short_desc="Cross toolchain for MIPS32r2 LE hardfloat target (musl)" maintainer="Juan RP " homepage="http://www.voidlinux.eu" license="GPL-3, GPL-2, MIT" distfiles=" - http://ftp.gnu.org/pub/gnu/binutils/binutils-${_binutils_version}.tar.bz2 - http://ftp.gnu.org/pub/gnu/gcc/gcc-${_gcc_version}/gcc-${_gcc_version}.tar.bz2 - http://www.kernel.org/pub/linux/kernel/v3.x/linux-${_linux_version}.tar.xz + ${GNU_SITE}/binutils/binutils-${_binutils_version}.tar.bz2 + https://repo.voidlinux.eu/distfiles/gcc-$_gcc_version.tar.xz + ${KERNEL_SITE}/kernel/v4.x/linux-${_linux_version}.tar.xz http://www.musl-libc.org/releases/musl-${_musl_version}.tar.gz" checksum=" 369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88 - 6c11d292cd01b294f9f84c9a59c230d80e9e4a47e5c6355f046bb36d4f358092 - c649874e2856101df7cefe5fdad313ebb2282a939fc1e95cf02222327745ff92 + a7addd2d4e42e66c3b56ced8baee5a11ef7fb577e23615a4f43877273eaf9409 + 412316b32b5c7a513ba3ab8e68fc443db4d9423f07b577473089def0ee7406af 97e447c7ee2a7f613186ec54a93054fe15469fe34d7d323080f7ef38f5ecb0fa" lib32disabled=yes @@ -49,6 +49,8 @@ _apply_patch() { } _binutils_build() { + local _args + [ -f ${wrksrc}/.binutils_build_done ] && return 0 cd ${wrksrc} @@ -57,10 +59,16 @@ _binutils_build() { [ ! -d binutils-build ] && mkdir binutils-build cd binutils-build - ../binutils-${_binutils_version}/configure \ - --prefix=/usr --target=${_triplet} --with-sysroot=${_sysroot} \ - --disable-nls --disable-multilib --disable-werror \ - --disable-shared ${_fpuflags} + _args="--prefix=/usr" + _args+=" --target=${_triplet}" + _args+=" --with-sysroot=${_sysroot}" + _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 install @@ -69,25 +77,40 @@ _binutils_build() { } _gcc_bootstrap() { + local _args + [ -f ${wrksrc}/.gcc_bootstrap_done ] && return 0 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}/gcc-spec-env-r1.patch + _apply_patch -p0 ${FILESDIR}/fix-cxxflags-passing.patch msg_normal "Building cross gcc bootstrap\n" [ ! -d ../gcc-bootstrap ] && mkdir ../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" \ - ../gcc-${_gcc_version}/configure --prefix=/usr \ - --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} + ../gcc-${_gcc_version}/configure ${_args} make ${makejobs} make install @@ -116,7 +139,7 @@ _musl_build() { msg_normal "Building cross musl libc\n" CC="${_triplet}-gcc" CFLAGS="-Os -pipe ${_archflags}" \ - ./configure --prefix=/usr \ + ./configure --prefix=/usr make ${makejobs} make DESTDIR=${_sysroot} install @@ -125,6 +148,8 @@ _musl_build() { } _gcc_build() { + local _args + [ -f ${wrksrc}/.gcc_build_done ] && return 0 cd ${wrksrc} @@ -133,12 +158,22 @@ _gcc_build() { [ ! -d gcc-build ] && mkdir gcc-build cd gcc-build - ../gcc-${_gcc_version}/configure \ - --target=${_triplet} --with-sysroot=${_sysroot} --prefix=/usr \ - --libexecdir=/usr/lib --enable-languages=c,c++,lto \ - --enable-lto --disable-libsanitizer \ - --disable-multilib --disable-nls --disable-libquadmath \ - --disable-libmudflap --enable-shared ${_fpuflags} + _args="--prefix=/usr" + _args+=" --libexecdir=/usr/lib" + _args+=" --target=${_triplet}" + _args+=" --with-sysroot=${_sysroot}" + _args+=" --enable-languages=c,c++,lto" + _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}