gcc-multilib: update to 4.6.1, rework for easy updates.
This commit is contained in:
parent
f6a62fac86
commit
4a8181db17
10 changed files with 41 additions and 35 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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 <xtraeme@gmail.com>"
|
||||
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}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue