From 4a8181db17419f054dcf6aa4cc59d87f5b70ff2c Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 10 Jul 2011 17:55:18 +0200 Subject: [PATCH] gcc-multilib: update to 4.6.1, rework for easy updates. --- .../gcc-multilib/gcc-c++-multilib.template | 7 ++- .../gcc-multilib/gcc-objc-multilib.template | 5 +-- srcpkgs/gcc-multilib/libgcc32.template | 3 +- .../gcc-multilib/libmudflap32-devel.template | 3 +- srcpkgs/gcc-multilib/libmudflap32.template | 3 +- srcpkgs/gcc-multilib/libobjc32.template | 3 +- srcpkgs/gcc-multilib/libssp32.template | 3 +- .../gcc-multilib/libstdc++32-devel.template | 3 +- srcpkgs/gcc-multilib/libstdc++32.template | 3 +- srcpkgs/gcc-multilib/template | 43 +++++++++++++------ 10 files changed, 41 insertions(+), 35 deletions(-) diff --git a/srcpkgs/gcc-multilib/gcc-c++-multilib.template b/srcpkgs/gcc-multilib/gcc-c++-multilib.template index 5559fd699e..d6d0a4a161 100644 --- a/srcpkgs/gcc-multilib/gcc-c++-multilib.template +++ b/srcpkgs/gcc-multilib/gcc-c++-multilib.template @@ -13,9 +13,8 @@ Add_dependency run libstdc++32-devel ">=${version}" do_install() { - local libmddir="/usr/lib/gcc/x86_64-unknown-linux-gnu/${version}" + local libmddir="usr/lib/gcc/x86_64-unknown-linux-gnu/${_majorver}" - mkdir -p ${DESTDIR}/${libmddir}/32 - mv ${SRCPKGDESTDIR}/${libmddir}/32/lib{std,sup}c++.a \ - ${DESTDIR}/${libmddir}/32 + vmove ${libmddir}/32/libstdc++.a ${libmddir}/32 + vmove ${libmddir}/32/libsupc++.a ${libmddir}/32 } diff --git a/srcpkgs/gcc-multilib/gcc-objc-multilib.template b/srcpkgs/gcc-multilib/gcc-objc-multilib.template index b1ed37b819..6aa5f08447 100644 --- a/srcpkgs/gcc-multilib/gcc-objc-multilib.template +++ b/srcpkgs/gcc-multilib/gcc-objc-multilib.template @@ -15,8 +15,7 @@ Add_dependency run libobjc32 ">=${version}" do_install() { - local libmddir="/usr/lib/gcc/x86_64-unknown-linux-gnu/${version}" + local libmddir="/usr/lib/gcc/x86_64-unknown-linux-gnu/${_majorver}" - mkdir -p ${DESTDIR}/${libmddir}/32 - mv ${SRCPKGDESTDIR}/${libmddir}/32/libobjc*.a ${DESTDIR}/${libmddir}/32 + vmove "${libmddir}/32/libobjc*.a" ${libmddir}/32 } diff --git a/srcpkgs/gcc-multilib/libgcc32.template b/srcpkgs/gcc-multilib/libgcc32.template index 5dba75f4d6..7478361914 100644 --- a/srcpkgs/gcc-multilib/libgcc32.template +++ b/srcpkgs/gcc-multilib/libgcc32.template @@ -9,6 +9,5 @@ noverifyrdeps=yes do_install() { - mkdir -p ${DESTDIR}/usr/lib32 - mv ${SRCPKGDESTDIR}/usr/lib32/libgcc_s.so* ${DESTDIR}/usr/lib32 + vmove "usr/lib32/libgcc_s.so*" usr/lib32 } diff --git a/srcpkgs/gcc-multilib/libmudflap32-devel.template b/srcpkgs/gcc-multilib/libmudflap32-devel.template index 63be61fdbd..417801eea0 100644 --- a/srcpkgs/gcc-multilib/libmudflap32-devel.template +++ b/srcpkgs/gcc-multilib/libmudflap32-devel.template @@ -13,6 +13,5 @@ Add_dependency run libmudflap32 do_install() { - mkdir -p ${DESTDIR}/usr/lib32 - mv ${SRCPKGDESTDIR}/usr/lib32/libmudflap*.a ${DESTDIR}/usr/lib32 + vmove "usr/lib32/libmudflap*.a" usr/lib32 } diff --git a/srcpkgs/gcc-multilib/libmudflap32.template b/srcpkgs/gcc-multilib/libmudflap32.template index ed41ee3a18..4f81e46538 100644 --- a/srcpkgs/gcc-multilib/libmudflap32.template +++ b/srcpkgs/gcc-multilib/libmudflap32.template @@ -10,6 +10,5 @@ Add_dependency run glibc32 do_install() { - mkdir -p ${DESTDIR}/usr/lib32 - mv ${SRCPKGDESTDIR}/usr/lib32/libmudflap*.so* ${DESTDIR}/usr/lib32 + vmove "usr/lib32/libmudflap*.so*" usr/lib32 } diff --git a/srcpkgs/gcc-multilib/libobjc32.template b/srcpkgs/gcc-multilib/libobjc32.template index 114dd9f69c..6051de0217 100644 --- a/srcpkgs/gcc-multilib/libobjc32.template +++ b/srcpkgs/gcc-multilib/libobjc32.template @@ -11,6 +11,5 @@ Add_dependency run glibc32 do_install() { - mkdir -p ${DESTDIR}/usr/lib32 - mv ${SRCPKGDESTDIR}/usr/lib32/libobjc.so* ${DESTDIR}/usr/lib32 + vmove "usr/lib32/libobjc.so*" usr/lib32 } diff --git a/srcpkgs/gcc-multilib/libssp32.template b/srcpkgs/gcc-multilib/libssp32.template index 2ae3af5b49..0877407ab8 100644 --- a/srcpkgs/gcc-multilib/libssp32.template +++ b/srcpkgs/gcc-multilib/libssp32.template @@ -10,6 +10,5 @@ Add_dependency run glibc32 do_install() { - mkdir -p ${DESTDIR}/usr/lib32 - mv ${SRCPKGDESTDIR}/usr/lib32/libssp.so* ${DESTDIR}/usr/lib32 + vmove "usr/lib32/libssp.so*" usr/lib32 } diff --git a/srcpkgs/gcc-multilib/libstdc++32-devel.template b/srcpkgs/gcc-multilib/libstdc++32-devel.template index 378d9d470a..60e4bbd3af 100644 --- a/srcpkgs/gcc-multilib/libstdc++32-devel.template +++ b/srcpkgs/gcc-multilib/libstdc++32-devel.template @@ -11,6 +11,5 @@ Add_dependency run libstdc++32 do_install() { - mkdir -p ${DESTDIR}/usr - mv ${SRCPKGDESTDIR}/usr/include ${DESTDIR}/usr + vmove usr/include usr } diff --git a/srcpkgs/gcc-multilib/libstdc++32.template b/srcpkgs/gcc-multilib/libstdc++32.template index da01be247b..51b822280e 100644 --- a/srcpkgs/gcc-multilib/libstdc++32.template +++ b/srcpkgs/gcc-multilib/libstdc++32.template @@ -11,6 +11,5 @@ Add_dependency run glibc32 do_install() { - mkdir -p ${DESTDIR}/usr/lib32 - mv ${SRCPKGDESTDIR}/usr/lib32/libstdc++.so* ${DESTDIR}/usr/lib32 + vmove "usr/lib32/libstdc++.so*" usr/lib32 } diff --git a/srcpkgs/gcc-multilib/template b/srcpkgs/gcc-multilib/template index 5fdbe934c7..583671d858 100644 --- a/srcpkgs/gcc-multilib/template +++ b/srcpkgs/gcc-multilib/template @@ -1,9 +1,10 @@ # Template build file for 'gcc-multilib' pkgname=gcc-multilib -version=4.6.0 +_majorver=4.6 _gmp_ver=5.0.1 _mpfr_ver=3.0.1 _mpc_ver=0.8.2 +version=${_majorver}.1 wrksrc="gcc-${version}" distfiles=" http://ftp.gnu.org/pub/gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2 @@ -14,7 +15,7 @@ build_style=custom-install short_desc="The GNU C Compiler suite (multilib libraries)" maintainer="Juan RP " checksum=" -23bd0013d76ac6fb4537e5e8f4e5947129362dcc32f0d08563b7d4d9e44c0e17 +8eebf51c908151d1f1a3756c8899c5e71572e8469a547ad72a1ef16a08a31b59 a2a610f01fd3298dc08c87bf30498c2402590e1bcb227fc40b15ee6d280939fb e1977099bb494319c0f0c1f85759050c418a56884e9c6cef1c540b9b13e38e7f ae79f8d41d8a86456b68607e9ca398d00f8b7342d1d83bcf4428178ac45380c7" @@ -41,24 +42,29 @@ Add_dependency run glibc32-devel Add_dependency build glibc32-devel Add_dependency build zlib32-devel +Add_dependency build coreutils +Add_dependency build gawk +Add_dependency build sed do_build() { # As specified in the LFS book, disable installing libiberty. sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in - # "Add" ppl-0.11 compatibility - sed -i "/ppl_minor_version=/s#10#11#" configure # Do not run fixincludes sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in mkdir -p ${build_wrksrc}/gmp { mv ${XBPS_BUILDDIR}/gmp-${_gmp_ver} gmp; \ mv ${XBPS_BUILDDIR}/mpfr-${_mpfr_ver} mpfr; \ - mv ${XBPS_BUILDDIR}/mpc-${_mpc_ver} mpc; } || return 1 + mv ${XBPS_BUILDDIR}/mpc-${_mpc_ver} mpc; } cp -a gmp/*.h ${build_wrksrc}/gmp - LDFLAGS= ./configure --prefix=/usr \ + unset LD_LIBRARY_PATH LDLIBPATH LDFLAGS CPPFLAGS + local SAVEDPATH=$PATH + export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin" + + ./configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib \ --enable-clocale=gnu --enable-shared --disable-bootstrap \ --enable-threads=posix --enable-__cxa_atexit \ --disable-gold --disable-lto --with-system-zlib \ @@ -66,17 +72,22 @@ do_build() --enable-multilib make ${makejobs} + export PATH=$SAVEDPATH } do_install() { - local libmddir="/usr/lib/gcc/x86_64-unknown-linux-gnu/${version}" + local triplet="x86_64-unknown-linux-gnu" + local libmddir="usr/lib/gcc/${triplet}/${_majorver}" local dirn _dir_ - mkdir -p ${DESTDIR}/usr/lib + vmkdir usr/lib cd ${DESTDIR}/usr && ln -sf lib lib64 && cd ${wrksrc}/${build_wrksrc} + # Create major version to version symlink. make DESTDIR=${DESTDIR} install + mv ${DESTDIR}/usr/lib/gcc/${triplet}/${version} \ + ${DESTDIR}/${libmddir} # We are only interested in 32bit stuff, remove anything else. rm -rf ${DESTDIR}/usr/{lib64,libexec,bin,share} @@ -84,6 +95,8 @@ do_install() rm -f ${DESTDIR}/usr/lib32/{libiberty*,*.py} rm -rf ${DESTDIR}/${libmddir}/{include,include-fixed,install-tools,plugin} rm -f ${DESTDIR}/${libmddir}/*.{a,o} + rm -f ${DESTDIR}/${libmddir}/{c,lto}* + rm -f ${DESTDIR}/usr/lib32/libquadmath* # Move around some stuff for multilib. mv ${DESTDIR}/usr/lib32/lib{std,sup}c++.a ${DESTDIR}/${libmddir}/32 @@ -91,13 +104,15 @@ do_install() mv ${DESTDIR}/usr/lib32/libssp*.a ${DESTDIR}/${libmddir}/32 # Keep libstdc++ 32bit headers, remove anything else. - mv ${DESTDIR}/usr/include/c++/${version}/x86_64-unknown-linux-gnu/32 \ + rm -rf ${wrksrc}/xbps_32bits_libstdc++ + mv ${DESTDIR}/usr/include/c++/${version}/${triplet}/32 \ ${wrksrc}/xbps_32bits_libstdc++ rm -rf ${DESTDIR}/usr/include/c++/${version}/* - install -d ${DESTDIR}/usr/include/c++/${version}/x86_64-unknown-linux-gnu - mv ${wrksrc}/xbps_32bits_libstdc++ \ - ${DESTDIR}/usr/include/c++/${version}/x86_64-unknown-linux-gnu/32 + + vmkdir usr/include/c++/${_majorver}/${triplet} + mv xbps_32bits_libstdc++ \ + ${DESTDIR}/usr/include/c++/${_majorver}/${triplet}/32 + # Install specs file overriding native gcc with no multilib support. - install -m644 ${wrksrc}/host-${xbps_machine}-unknown-linux-gnu/gcc/specs \ - ${DESTDIR}/${libmddir} + vinstall host-${triplet}/gcc/specs 644 ${libmddir} }