2011-07-19 01:28:46 +02:00
|
|
|
# Template build file for 'mingw-w64-gcc'
|
|
|
|
#
|
|
|
|
pkgname=mingw-w64-gcc
|
|
|
|
_majorver=4.6
|
|
|
|
version=${_majorver}.1
|
2011-11-14 18:12:47 +01:00
|
|
|
revision=6
|
2011-07-19 01:28:46 +02:00
|
|
|
distfiles=http://ftp.gnu.org/pub/gnu/gcc/gcc-$version/gcc-$version.tar.bz2
|
2013-04-14 04:24:51 +02:00
|
|
|
hostmakedepends="flex"
|
|
|
|
makedepends="mingw-w64-binutils mingw-w64-headers"
|
|
|
|
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
|
|
|
makedepends+=" gcc-multilib"
|
2012-05-23 20:58:45 +02:00
|
|
|
fi
|
2011-07-19 01:28:46 +02:00
|
|
|
short_desc="The GNU C Compiler (for mingw-w64)"
|
|
|
|
maintainer="davehome <davehome@redthumb.info.tm>"
|
|
|
|
homepage="http://mingw-w64.sourceforge.net/"
|
|
|
|
license="GFDL-1.2, GPL-3, LGPL-2.1"
|
|
|
|
checksum=8eebf51c908151d1f1a3756c8899c5e71572e8469a547ad72a1ef16a08a31b59
|
|
|
|
long_desc="
|
2011-07-19 10:55:43 +02:00
|
|
|
The GNU C Compiler suite, with support for C, C++, ObjC and ObjC++.
|
2011-07-19 01:28:46 +02:00
|
|
|
|
|
|
|
This is the mingw-64 cross-compiler, which supports building code for Win32
|
|
|
|
or Win64 (multilib). For the i686 platform, only 32bit is available."
|
|
|
|
|
|
|
|
_mingwprefix=/opt
|
|
|
|
|
2011-11-08 11:56:17 +01:00
|
|
|
if [ "${XBPS_MACHINE}" = "x86_64" ]; then
|
|
|
|
_triplet="${XBPS_MACHINE}-unknown-linux-gnu"
|
|
|
|
_mingwtriplet="${XBPS_MACHINE}-w64-mingw32"
|
2011-07-19 01:28:46 +02:00
|
|
|
_multilib_args="--enable-targets=all --enable-multilib"
|
|
|
|
_multilib_args="${_multilib_args} --enable-64bit --enable-32bit"
|
|
|
|
else
|
2011-11-08 11:56:17 +01:00
|
|
|
_triplet="${XBPS_MACHINE}-pc-linux-gnu"
|
|
|
|
_mingwtriplet="${XBPS_MACHINE}-w64-mingw32"
|
2011-07-19 01:28:46 +02:00
|
|
|
_multilib_args="--disable-multilib --disable-64bit --enable-32bit"
|
|
|
|
fi
|
|
|
|
|
2011-07-21 00:38:06 +02:00
|
|
|
wrksrc=gcc-${version}
|
|
|
|
build_wrksrc=${pkgname}-build
|
|
|
|
|
2012-05-23 20:58:45 +02:00
|
|
|
do_build() {
|
2011-07-19 01:28:46 +02:00
|
|
|
# As specified in the LFS book, disable installing libiberty.
|
|
|
|
sed -i 's/install_to_$(INSTALL_DEST) //' ${wrksrc}/libiberty/Makefile.in
|
|
|
|
# Do not run fixincludes
|
|
|
|
sed -i 's@\./fixinc\.sh@-c true@' ${wrksrc}/gcc/Makefile.in
|
|
|
|
|
|
|
|
unset LD_LIBRARY_PATH LDLIBPATH LDFLAGS CPPFLAGS
|
|
|
|
local SAVEDPATH=$PATH
|
|
|
|
export PATH="/opt/bin:/usr/local/bin:/usr/local/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin"
|
|
|
|
|
2011-07-21 00:38:06 +02:00
|
|
|
../configure --prefix=${_mingwprefix} --with-sysroot=${_mingwprefix} \
|
2011-07-19 01:28:46 +02:00
|
|
|
--bindir=${_mingwprefix}/bin --target=${_mingwtriplet} \
|
|
|
|
${_multilib_args} --enable-threads=win32 --disable-win32-registry \
|
|
|
|
--enable-version-specific-runtime-libs --enable-__cxa_atexit \
|
2011-07-20 02:25:51 +02:00
|
|
|
--enable-languages=c,c++,objc,obj-c++,lto --enable-tls \
|
2011-07-19 01:28:46 +02:00
|
|
|
--with-mpfr=$XBPS_MASTERDIR/usr --with-gmp=$XBPS_MASTERDIR/usr \
|
|
|
|
--with-ppl=${XBPS_MASTERDIR}/usr --with-cloog=${XBPS_MASTERDIR}/usr \
|
2011-07-20 02:25:51 +02:00
|
|
|
--with-system-zlib --enable-static --disable-shared --enable-lto \
|
2011-07-19 01:28:46 +02:00
|
|
|
--enable-linker-build-id --enable-gnu-unique-object \
|
|
|
|
--enable-checking=release --disable-nls --disable-bootstrap \
|
2011-07-19 03:12:06 +02:00
|
|
|
--libdir=${_mingwprefix}/lib --libexecdir=${_mingwprefix}/lib
|
2011-07-19 01:28:46 +02:00
|
|
|
|
|
|
|
make ${makejobs} all-gcc
|
|
|
|
|
|
|
|
export PATH=$SAVEDPATH
|
|
|
|
}
|
|
|
|
|
2012-05-23 20:58:45 +02:00
|
|
|
do_install() {
|
2011-07-21 00:38:06 +02:00
|
|
|
make DESTDIR=${DESTDIR} ${makejobs} install-gcc
|
2011-07-19 01:28:46 +02:00
|
|
|
|
|
|
|
# Remove useless manpages
|
|
|
|
rm -rf ${DESTDIR}/${_mingwprefix}/share
|
|
|
|
}
|
2013-04-14 04:24:51 +02:00
|
|
|
|
|
|
|
mingw-w64-gcc_package() {
|
|
|
|
pkg_install() {
|
|
|
|
vmove opt
|
|
|
|
}
|
|
|
|
}
|