diff --git a/extra/boost/PKGBUILD b/extra/boost/PKGBUILD index a13135428..816418575 100644 --- a/extra/boost/PKGBUILD +++ b/extra/boost/PKGBUILD @@ -11,6 +11,7 @@ # - changed _bindir to .linuxarm from .linuxx86 # - build armv6h with -march=armv6k # - specify arm architecture to b2 for aarch64 +# - build armv5 with c++98, can't support c++11 code in boost pkgbase=boost pkgname=('boost-libs' 'boost') @@ -43,6 +44,12 @@ build() { install -dm755 "${_stagedir}"/share/boostbook cp -a tools/boostbook/{xsl,dtd} "${_stagedir}"/share/boostbook/ + if [[ $CARCH == "arm" ]]; then + STD="c++98" + else + STD="c++14" + fi + # default "minimal" install: "release link=shared,static # runtime-link=shared threading=single,multi" # --layout=tagged will add the "-mt" suffix for multithreaded libraries @@ -59,7 +66,7 @@ build() { toolset=gcc \ python=2.7 \ cflags="${CPPFLAGS} ${CFLAGS} -fPIC -O3" \ - cxxflags="${CPPFLAGS} ${CXXFLAGS} -std=c++14 -fPIC -O3" \ + cxxflags="${CPPFLAGS} ${CXXFLAGS} -std=${STD} -fPIC -O3" \ linkflags="${LDFLAGS}" \ --layout=system \ ${JOBS} \ @@ -85,7 +92,7 @@ build() { toolset=gcc \ python=3.6 \ cflags="${CPPFLAGS} ${CFLAGS} -fPIC -O3" \ - cxxflags="${CPPFLAGS} ${CXXFLAGS} -std=c++14 -fPIC -O3" \ + cxxflags="${CPPFLAGS} ${CXXFLAGS} -std=${STD} -fPIC -O3" \ linkflags="${LDFLAGS}" \ --layout=system \ ${JOBS} \