2013-10-27 10:43:17 +00:00
|
|
|
# Template build file for 'gcc-multilib'
|
2014-03-09 12:51:56 +00:00
|
|
|
only_for_archs="x86_64"
|
|
|
|
_triplet="x86_64-unknown-linux-gnu"
|
2014-05-15 14:27:24 +00:00
|
|
|
_majorver=4.9
|
2014-03-09 12:51:56 +00:00
|
|
|
|
|
|
|
pkgname=gcc-multilib
|
2014-05-15 14:27:24 +00:00
|
|
|
version=${_majorver}.0
|
|
|
|
revision=1
|
2013-10-27 10:43:17 +00:00
|
|
|
wrksrc="gcc-${version}"
|
|
|
|
short_desc="The GNU C Compiler (multilib files)"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
|
|
homepage="http://gcc.gnu.org"
|
|
|
|
license="GFDL-1.2, GPL-3, LGPL-2.1"
|
|
|
|
distfiles="http://ftp.gnu.org/pub/gnu/gcc/gcc-$version/gcc-$version.tar.bz2"
|
2014-05-15 14:27:24 +00:00
|
|
|
checksum=b9b047a97bade9c1c89970bc8e211ff57b7b8998a1730a80a653d329f8ed1257
|
2013-10-27 10:43:17 +00:00
|
|
|
|
|
|
|
hostmakedepends="perl flex zip unzip"
|
2014-05-15 14:27:24 +00:00
|
|
|
|
|
|
|
makedepends="zlib-devel libmpc-devel>=1.0.1_2 ppl-devel>=1.0 cloog-devel
|
|
|
|
isl-devel libfl-devel glibc-32bit glibc-devel-32bit"
|
|
|
|
|
|
|
|
depends="
|
|
|
|
gcc>=${_majorver}
|
|
|
|
libgcc-32bit>=${_majorver}
|
|
|
|
libssp-devel-32bit>=${_majorver}
|
|
|
|
libgomp-devel-32bit>=${_majorver}
|
|
|
|
libitm-devel-32bit>=${_majorver}
|
|
|
|
libsanitizer-devel-32bit>=${_majorver}
|
|
|
|
libatomic-devel-32bit>=${_majorver}
|
|
|
|
libcilkrts-devel-32bit>=${_majorver}
|
|
|
|
libvtv-devel-32bit>=${_majorver}
|
|
|
|
zlib-32bit
|
|
|
|
glibc-devel-32bit"
|
2013-10-27 10:43:17 +00:00
|
|
|
|
|
|
|
do_configure() {
|
2014-05-15 14:27:24 +00:00
|
|
|
ldconfig &>/dev/null
|
|
|
|
|
2013-10-27 10:43:17 +00:00
|
|
|
# As specified in the LFS book, disable installing libiberty.
|
|
|
|
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
|
|
|
|
# Do not run fixincludes
|
|
|
|
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
|
|
|
|
|
|
|
|
./configure --prefix=/usr --mandir=/usr/share/man \
|
|
|
|
--infodir=/usr/share/info --libexecdir=/usr/lib \
|
|
|
|
--enable-clocale=gnu --disable-bootstrap --libdir=/usr/lib \
|
|
|
|
--enable-threads=posix --enable-__cxa_atexit --enable-multilib \
|
|
|
|
--disable-rpath --with-system-zlib --enable-shared --enable-lto \
|
|
|
|
--enable-linker-build-id --enable-gnu-unique-object \
|
|
|
|
--enable-checking=release --disable-libstdcxx-pch \
|
|
|
|
--with-ppl --enable-cloog-backend=isl --enable-libstdcxx-time \
|
2014-03-28 09:31:12 +00:00
|
|
|
--enable-tls --enable-languages="c,c++,objc,obj-c++,lto" \
|
2014-05-15 14:27:24 +00:00
|
|
|
--with-linker-hash-style=gnu
|
2013-10-27 10:43:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
|
|
|
make ${makejobs}
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
2014-03-09 12:51:56 +00:00
|
|
|
# Install to a tempdir and then only copy relevant files.
|
2013-10-27 10:43:17 +00:00
|
|
|
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
|
|
|
vmkdir usr/lib
|
|
|
|
cd ${DESTDIR}/usr
|
|
|
|
ln -sf lib lib64
|
|
|
|
fi
|
|
|
|
cd ${wrksrc}
|
2014-03-09 12:51:56 +00:00
|
|
|
make DESTDIR=${wrksrc}/${pkgname}-build install
|
2013-10-27 10:43:17 +00:00
|
|
|
|
|
|
|
# Make version a symlink of major version to make all versions
|
|
|
|
# from the same series work automagically.
|
2014-03-09 12:51:56 +00:00
|
|
|
vmkdir usr/include/c++/${_majorver}/${_triplet}
|
|
|
|
vmkdir usr/lib/gcc/${_triplet}/${_majorver}
|
2013-10-27 10:43:17 +00:00
|
|
|
|
2014-03-09 12:51:56 +00:00
|
|
|
cp -a ${wrksrc}/${pkgname}-build/usr/lib/gcc/${_triplet}/${version}/32 \
|
|
|
|
${DESTDIR}/usr/lib/gcc/${_triplet}/${_majorver}/
|
|
|
|
cp -a ${wrksrc}/${pkgname}-build/usr/include/c++/${version}/${_triplet}/32 \
|
|
|
|
${DESTDIR}/usr/include/c++/${_majorver}/${_triplet}
|
2013-10-27 10:43:17 +00:00
|
|
|
|
2014-03-09 12:51:56 +00:00
|
|
|
vinstall ${wrksrc}/host-${_triplet}/gcc/specs 644 usr/lib/gcc/${_triplet}/${_majorver}
|
2013-10-27 10:43:17 +00:00
|
|
|
|
2014-03-09 12:51:56 +00:00
|
|
|
rm -f ${DESTDIR}/usr/lib64
|
2013-10-27 10:43:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
gcc-c++-multilib_package() {
|
2014-03-09 12:51:56 +00:00
|
|
|
depends="gcc-c++>=${_majorver} gcc-multilib>=${_majorver} libstdc++-devel-32bit>=${_majorver}"
|
|
|
|
short_desc="GCC C++ compiler (multilib files)"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/include/c++
|
|
|
|
}
|
2013-10-27 10:43:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
gcc-objc-multilib_package() {
|
2014-05-15 14:27:24 +00:00
|
|
|
depends="gcc-multilib>=${_majorver} gcc-objc>=${_majorver} libobjc-devel-32bit>=${_majorver}"
|
2014-03-09 12:51:56 +00:00
|
|
|
short_desc="The GNU Objective-C compiler (multilib files)"
|
2013-10-27 10:43:17 +00:00
|
|
|
}
|