Boost logo

Boost Users :

Subject: Re: [Boost-users] [Context] Boost.Context ARM64 support
From: mefyl (mefyl_at_[hidden])
Date: 2015-01-12 10:05:03


On Monday 12 January 2015 15:19:55 mefyl wrote:
> On Monday 12 January 2015 14:15:08 Oliver Kowalke wrote:
> > 2015-01-12 13:59 GMT+01:00 mefyl <mefyl_at_[hidden]>:
> > > "clang++" "-arch" "arm64" -ftemplate-depth-128 -O3 -finline-functions
> > > -Wno-inline -Wall -gdwarf-2 -fexceptions -isysroot
> > > /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/D
> > > ev
> > > elop\ er/SDKs/iPhoneOS8.1.sdk -arch arm -DBOOST_ALL_NO_LIB=1
> > > -DBOOST_ATOMIC_STATIC_LINK=1 -DBOOST_CHRONO_STATIC_LINK=1
> > > -DBOOST_CONTEXT_SOURCE -DBOOST_SYSTEM_NO_DEPRECATED
> > > -DBOOST_SYSTEM_STATIC_LINK=1 -DBOOST_T\
> > > HREAD_BUILD_LIB=1 -DBOOST_THREAD_POSIX -DBOOST_THREAD_USE_LIB=1 -DNDEBUG
> > > -I"." -c -o
> > > "bin.v2/libs/context/build/darwin-4.2.1/release/address-model-64/archite
> > > ct
> > > ure-arm/link-static/macosx-version-iphone-8.\
> > > 0/threading-multi/unsupported.o" "libs/context/src/unsupported.cpp"
> >
> > libs/context/src/unsupported.cpp should not be selected - please take care
> > that you use the version from github (branch develop).
> > Please note that you need to specify address-model, architecture, api and
> > binary-format at cmd line if you do cross-compiling.
>
> I had missed the "branch develop" part; it's indeed fixed there and works
> like a charm. Sorry.

My bad, it actually built for 32 bits. Here's what I have now, starting from scratch, specifying address-model, architecture, abi and binary-format:

Branch develop (boost: b991885, context: fae49e0)

$ ./bootstrap.sh --with-libraries=context
[...]
$ ./b2 toolset=clang link=static runtime-link=static --layout=tagged --prefix=/tmp architecture=arm abi=aapcs address-model=64 binary-format=mach-o
[...]
clang-darwin.compile.asm bin.v2/libs/context/build/clang-darwin-4.2.1/release/abi-aapcs/address-model-64/architecture-arm/link-static/runtime-link-static/threading-multi/asm/make_arm64_aapcs_macho_gas.o
libs/context/src/asm/make_arm64_aapcs_macho_gas.S:54:21: error: unexpected token in argument list
    ; shift address in x0 (allocated stack) to lower 16 byte boundary
[ ... many ASM errors ... ]
    "clang++" -x assembler-with-cpp -O3 -O3 -finline-functions -Wno-inline -Wall -DBOOST_ALL_NO_LIB=1 -DBOOST_CHRONO_STATIC_LINK=1 -DBOOST_CONTEXT_SOURCE -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_SYSTEM_STATIC_LINK=1 -DBOOST_THREAD_BUILD_LIB=1 -DBOOST_THREAD_POSIX -DBOOST_THREAD_USE_LIB=1 -DNDEBUG -I"." -c -o "bin.v2/libs/context/build/clang-darwin-4.2.1/release/abi-aapcs/address-model-64/architecture-arm/link-static/runtime-link-static/threading-multi/asm/make_arm64_aapcs_macho_gas.o" "libs/context/src/asm/make_arm64_aapcs_macho_gas.S"

Running that exact compilation adding "-arch arm64" fixes it.

-- 
Quentin "mefyl" Hocquet
CTO @ infinit.io

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net