From 3c0e0d29d836c5c23070818d9aa98b4ae798bd0b Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Thu, 9 Jul 2015 11:58:35 +0000 Subject: [PATCH] boost: set abi and architecture for all target machines properly. --- srcpkgs/boost/template | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/srcpkgs/boost/template b/srcpkgs/boost/template index 05248ab67cb..d8d77214df3 100644 --- a/srcpkgs/boost/template +++ b/srcpkgs/boost/template @@ -1,7 +1,7 @@ # Template file for 'boost' pkgname=boost version=1.58.0 -revision=1 +revision=2 wrksrc="${pkgname}_${version//\./_}" hostmakedepends="bzip2-devel" makedepends="zlib-devel bzip2-devel icu-devel" @@ -20,23 +20,25 @@ if [ -z "$CROSS_BUILD" ]; then subpackages+=" boost-jam boost-python" fi -_abi=sysv -_toolset=gcc case "$XBPS_TARGET_MACHINE" in - arm*) _arch=arm; _toolset="gcc-arm"; _abi=aapcs;; - aarch64*) _arch=aarch64; _toolset="gcc-aarch64"; _abi=aapcs;; - mips*) _arch=mips; _toolset="gcc-mips"; _abi=o32;; + i686*) _arch=i386; _toolset="gcc-i386"; _abi=sysv ;; + x86_64*) _arch=x86_64; _toolset="gcc-x86_64"; _abi=sysv ;; + arm*) _arch=arm; _toolset="gcc-arm"; _abi=aapcs ;; + aarch64*) _arch=arm; _toolset="gcc-aarch64"; _abi=aapcs ;; + mips*) _arch=mips; _toolset="gcc-mips"; _abi=o32 ;; esac do_build() { if [ "$CROSS_BUILD" ]; then - echo "using gcc : ${_arch} : ${XBPS_CROSS_TRIPLET}-g++ ${CXXFLAGS} ;" > user-config.jam + echo "using gcc : ${_toolset#gcc-} : ${XBPS_CROSS_TRIPLET}-g++ ${CXXFLAGS} ;" \ + > user-config.jam else - echo "using gcc : : g++ ${CXXFLAGS} ;" > user-config.jam + echo "using gcc : ${_toolset#gcc-} : g++ ${CXXFLAGS} ;" \ + > user-config.jam fi ./bootstrap.sh -prefix=${DESTDIR}/usr - ./bjam --toolset=${_toolset} ${makejobs} abi=$_abi \ - --user-config=${wrksrc}/user-config.jam + ./bjam --toolset=${_toolset} ${makejobs} abi=$_abi architecture=$_arch \ + --user-config=${wrksrc}/user-config.jam --debug-building } do_install() { @@ -46,7 +48,7 @@ do_install() { fi # Install headers/libs - ./bjam --prefix=${DESTDIR}/usr abi=$_abi \ + ./bjam --prefix=${DESTDIR}/usr abi=$_abi architecture=$_arch \ --user-config=${wrksrc}/user-config.jam install # Install Boost.Build stuff.