mingw-w64-binutils: revamped

This commit is contained in:
davehome 2011-07-15 04:19:21 -06:00
parent a9f54b40e1
commit 180b89fe2a

View file

@ -23,56 +23,45 @@ long_desc="
* This is a special version for mingw-w64."
wrksrc=binutils-$version
Add_dependency run glibc
Add_dependency run zlib
Add_dependency run gmp
Add_dependency run mpfr
Add_dependency build gcc
Add_dependency build make
Add_dependency build sed
Add_dependency build gawk
Add_dependency build bison
Add_dependency build flex
Add_dependency build gettext
Add_dependency build texinfo
Add_dependency build coreutils
Add_dependency build binutils
Add_dependency build gmp-devel
Add_dependency build mpfr-devel
wrksrc=binutils-$version
_mingwprefix=/opt
if [ "${xbps_machine}" = "x86_64" ]; then
_mingwtriplet="${xbps_machine}-w64-mingw32"
_target_args="--enable-targets=${_mingwtriplet},i686-w64-mingw32"
_multilib_args="--enable-multilib --enable-64-bit-bfd"
else
_mingwtriplet="${xbps_machine}-w32-mingw32"
_target_args="--enable-targets=${_mingwtriplet}"
_multilib_args="--disable-multilib"
fi
do_build()
{
if [ "${xbps_machine}" = "x86_64" ]; then
_triplet="${xbps_machine}-w64-mingw32"
_target_args="--enable-targets=${_triplet},i686-w64-mingw32"
_multilib_args="--enable-multilib --enable-64-bit-bfd"
else
_triplet="${xbps_machine}-w32-mingw32"
_target_args="--enable-targets=${_triplet}"
_multilib_args="--disable-multilib"
fi
./configure ${CONFIGURE_SHARED_ARGS} --enable-threads \
--target=${_triplet} ${_target_args} ${_multilib_args} \
--enable-plugins --enable-secureplt --with-mmap
./configure --prefix=${_mingwprefix} --enable-threads \
--target=${_mingwtriplet} ${_target_args} ${_multilib_args} \
--enable-plugins --enable-secureplt --with-mmap --disable-nls \
--exec-prefix=${_mingwprefix}/${_mingwtriplet}
make ${makejobs}
}
do_install()
{
# 'tools' are installed in ${DESTDIR}/${_triplet}/bin
make DESTDIR=${DESTDIR} install
# Remove info files that conflict with system binutils.
rm -rf ${DESTDIR}/usr/share/info
# Remove lib64 directory and it's only file: libiberty.a
rm -rf ${DESTDIR}/usr/lib64
rm -rf ${DESTDIR}/${_mingwprefix}/${_mingwtriplet}/lib64
# Remove extra locales
rm -rf ${DESTDIR}/usr/share/locale
# Remove useless manpages
rm -rf ${DESTDIR}/${_mingwprefix}/share
}