2008-11-21 10:36:43 +00:00
|
|
|
# Template build file for 'gcc-multilib'
|
|
|
|
pkgname=gcc-multilib
|
2011-07-10 15:55:18 +00:00
|
|
|
_majorver=4.6
|
2010-05-15 17:42:26 +00:00
|
|
|
_gmp_ver=5.0.1
|
2011-04-11 18:03:02 +00:00
|
|
|
_mpfr_ver=3.0.1
|
2010-10-30 15:59:30 +00:00
|
|
|
_mpc_ver=0.8.2
|
2011-07-10 15:55:18 +00:00
|
|
|
version=${_majorver}.1
|
2010-05-15 17:42:26 +00:00
|
|
|
wrksrc="gcc-${version}"
|
|
|
|
distfiles="
|
|
|
|
http://ftp.gnu.org/pub/gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2
|
2010-10-30 15:59:30 +00:00
|
|
|
http://ftp.gnu.org/pub/gnu/gmp/gmp-${_gmp_ver}.tar.bz2
|
2010-05-15 17:42:26 +00:00
|
|
|
http://www.mpfr.org/mpfr-current/mpfr-${_mpfr_ver}.tar.bz2
|
2010-10-30 15:59:30 +00:00
|
|
|
http://www.multiprecision.org/mpc/download/mpc-${_mpc_ver}.tar.gz"
|
2008-11-21 10:36:43 +00:00
|
|
|
short_desc="The GNU C Compiler suite (multilib libraries)"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
2010-05-15 17:42:26 +00:00
|
|
|
checksum="
|
2011-07-10 15:55:18 +00:00
|
|
|
8eebf51c908151d1f1a3756c8899c5e71572e8469a547ad72a1ef16a08a31b59
|
2010-05-15 17:42:26 +00:00
|
|
|
a2a610f01fd3298dc08c87bf30498c2402590e1bcb227fc40b15ee6d280939fb
|
2011-04-11 18:03:02 +00:00
|
|
|
e1977099bb494319c0f0c1f85759050c418a56884e9c6cef1c540b9b13e38e7f
|
2010-10-30 15:59:30 +00:00
|
|
|
ae79f8d41d8a86456b68607e9ca398d00f8b7342d1d83bcf4428178ac45380c7"
|
2008-11-21 10:36:43 +00:00
|
|
|
long_desc="
|
2010-05-15 17:42:26 +00:00
|
|
|
The GNU C Compiler suite, with support for C, C++, ObjC and ObjC++.
|
2008-11-21 10:36:43 +00:00
|
|
|
|
|
|
|
This package installs the 32 bit libraries required to compile 32 bit
|
|
|
|
code on x86_64 systems."
|
|
|
|
|
2010-05-15 17:42:26 +00:00
|
|
|
subpackages="libgcc32 libssp32 libgomp32 libobjc32 libstdc++32 libmudflap32"
|
2010-05-20 22:29:47 +00:00
|
|
|
subpackages="${subpackages} libstdc++32-devel libmudflap32-devel"
|
|
|
|
subpackages="${subpackages} gcc-c++-multilib gcc-objc-multilib"
|
|
|
|
subpackages="${subpackages} gcc-objc++-multilib"
|
2009-03-11 05:31:56 +00:00
|
|
|
|
2010-05-15 17:42:26 +00:00
|
|
|
disable_parallel_build=yes
|
|
|
|
noverifyrdeps=yes
|
|
|
|
only_for_archs=x86_64
|
|
|
|
|
2010-10-30 15:59:30 +00:00
|
|
|
Add_dependency run gcc ">=${version}"
|
2010-05-15 17:42:26 +00:00
|
|
|
Add_dependency run libgcc32 ">=${version}"
|
|
|
|
Add_dependency run libgomp32 ">=${version}"
|
|
|
|
Add_dependency run zlib32
|
|
|
|
Add_dependency run glibc32-devel
|
|
|
|
|
|
|
|
Add_dependency build glibc32-devel
|
|
|
|
Add_dependency build zlib32-devel
|
2011-07-10 15:55:18 +00:00
|
|
|
Add_dependency build coreutils
|
|
|
|
Add_dependency build gawk
|
|
|
|
Add_dependency build sed
|
2010-05-15 17:42:26 +00:00
|
|
|
|
2011-04-11 18:03:02 +00:00
|
|
|
do_build()
|
2010-05-15 17:42:26 +00:00
|
|
|
{
|
2010-10-30 15:59:30 +00:00
|
|
|
# As specified in the LFS book, disable installing libiberty.
|
2011-04-11 18:03:02 +00:00
|
|
|
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
|
2010-10-30 15:59:30 +00:00
|
|
|
# Do not run fixincludes
|
2011-04-11 18:03:02 +00:00
|
|
|
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
|
2010-10-30 15:59:30 +00:00
|
|
|
|
|
|
|
mkdir -p ${build_wrksrc}/gmp
|
2011-04-11 18:03:02 +00:00
|
|
|
{ mv ${XBPS_BUILDDIR}/gmp-${_gmp_ver} gmp; \
|
|
|
|
mv ${XBPS_BUILDDIR}/mpfr-${_mpfr_ver} mpfr; \
|
2011-07-10 15:55:18 +00:00
|
|
|
mv ${XBPS_BUILDDIR}/mpc-${_mpc_ver} mpc; }
|
2010-10-30 15:59:30 +00:00
|
|
|
|
2011-04-11 18:03:02 +00:00
|
|
|
cp -a gmp/*.h ${build_wrksrc}/gmp
|
2010-10-30 15:59:30 +00:00
|
|
|
|
2011-07-10 15:55:18 +00:00
|
|
|
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 \
|
2011-04-11 18:03:02 +00:00
|
|
|
--enable-clocale=gnu --enable-shared --disable-bootstrap \
|
|
|
|
--enable-threads=posix --enable-__cxa_atexit \
|
|
|
|
--disable-gold --disable-lto --with-system-zlib \
|
|
|
|
--enable-languages=c,c++,objc,obj-c++ --disable-nls \
|
|
|
|
--enable-multilib
|
2010-05-15 17:42:26 +00:00
|
|
|
|
2011-04-11 18:03:02 +00:00
|
|
|
make ${makejobs}
|
2011-07-10 15:55:18 +00:00
|
|
|
export PATH=$SAVEDPATH
|
2010-05-15 17:42:26 +00:00
|
|
|
}
|
2008-11-21 10:36:43 +00:00
|
|
|
|
2011-04-11 18:03:02 +00:00
|
|
|
do_install()
|
2008-11-21 10:36:43 +00:00
|
|
|
{
|
2011-07-10 15:55:18 +00:00
|
|
|
local triplet="x86_64-unknown-linux-gnu"
|
|
|
|
local libmddir="usr/lib/gcc/${triplet}/${_majorver}"
|
2010-05-20 22:29:47 +00:00
|
|
|
local dirn _dir_
|
2010-05-15 17:42:26 +00:00
|
|
|
|
2011-07-10 15:55:18 +00:00
|
|
|
vmkdir usr/lib
|
2011-04-11 18:03:02 +00:00
|
|
|
cd ${DESTDIR}/usr && ln -sf lib lib64 && cd ${wrksrc}/${build_wrksrc}
|
|
|
|
|
2011-07-10 15:55:18 +00:00
|
|
|
# Create major version to version symlink.
|
2011-04-11 18:03:02 +00:00
|
|
|
make DESTDIR=${DESTDIR} install
|
2011-07-10 15:55:18 +00:00
|
|
|
mv ${DESTDIR}/usr/lib/gcc/${triplet}/${version} \
|
|
|
|
${DESTDIR}/${libmddir}
|
2011-04-11 18:03:02 +00:00
|
|
|
|
2010-05-15 17:42:26 +00:00
|
|
|
# We are only interested in 32bit stuff, remove anything else.
|
2010-05-20 22:29:47 +00:00
|
|
|
rm -rf ${DESTDIR}/usr/{lib64,libexec,bin,share}
|
2010-05-15 17:42:26 +00:00
|
|
|
rm -f ${DESTDIR}/usr/lib/*.{spec,a,so*}
|
|
|
|
rm -f ${DESTDIR}/usr/lib32/{libiberty*,*.py}
|
|
|
|
rm -rf ${DESTDIR}/${libmddir}/{include,include-fixed,install-tools,plugin}
|
|
|
|
rm -f ${DESTDIR}/${libmddir}/*.{a,o}
|
2011-07-10 15:55:18 +00:00
|
|
|
rm -f ${DESTDIR}/${libmddir}/{c,lto}*
|
|
|
|
rm -f ${DESTDIR}/usr/lib32/libquadmath*
|
2010-05-15 17:42:26 +00:00
|
|
|
|
|
|
|
# Move around some stuff for multilib.
|
|
|
|
mv ${DESTDIR}/usr/lib32/lib{std,sup}c++.a ${DESTDIR}/${libmddir}/32
|
|
|
|
mv ${DESTDIR}/usr/lib32/lib{gomp,objc*}.a ${DESTDIR}/${libmddir}/32
|
|
|
|
mv ${DESTDIR}/usr/lib32/libssp*.a ${DESTDIR}/${libmddir}/32
|
|
|
|
|
2010-05-20 22:29:47 +00:00
|
|
|
# Keep libstdc++ 32bit headers, remove anything else.
|
2011-07-10 15:55:18 +00:00
|
|
|
rm -rf ${wrksrc}/xbps_32bits_libstdc++
|
|
|
|
mv ${DESTDIR}/usr/include/c++/${version}/${triplet}/32 \
|
2010-05-20 22:29:47 +00:00
|
|
|
${wrksrc}/xbps_32bits_libstdc++
|
|
|
|
rm -rf ${DESTDIR}/usr/include/c++/${version}/*
|
2011-07-10 15:55:18 +00:00
|
|
|
|
|
|
|
vmkdir usr/include/c++/${_majorver}/${triplet}
|
|
|
|
mv xbps_32bits_libstdc++ \
|
|
|
|
${DESTDIR}/usr/include/c++/${_majorver}/${triplet}/32
|
|
|
|
|
2010-05-15 17:42:26 +00:00
|
|
|
# Install specs file overriding native gcc with no multilib support.
|
2011-07-10 15:55:18 +00:00
|
|
|
vinstall host-${triplet}/gcc/specs 644 ${libmddir}
|
2008-11-21 10:36:43 +00:00
|
|
|
}
|