On 2018-06-25 10:48 AM, Steven Watanabe via Boost-users wrote:
AMDG

On 06/25/2018 10:31 AM, Damien via Boost-users wrote:
On Jun 24, 2018, at 7:02 PM, Steven Watanabe via Boost-users
<boost-users@lists.boost.org> wrote:
<snip>
Okay.  I see what's going on here.  Boost.Context
only supports darwin and clang on OSX.

You can work around the issue by finding this
in libs/context/build/Jamfile.v2:

# X86_64/SYSV/MACH-O
alias asm_sources
   : asm/make_x86_64_sysv_macho_gas.S
     asm/jump_x86_64_sysv_macho_gas.S
     asm/ontop_x86_64_sysv_macho_gas.S
   : <abi>sysv
     <address-model>64
     <architecture>x86
     <binary-format>mach-o
     <toolset>clang
   ;

and making a copy, replacing clang with gcc.
This didn’t work, unfortunately the errors are the same as before.
I assumed that you were building for x86_64.  If you're building
for a different platform, then you'd need to find the alias for
that architecture, instead.
Actually I'd like to understand what we did wrong.  Just to be clear
because terminology can be different, that's a full 64-bit build for
64-bit Intel architecture, correct?
Right.  Hmm.  The easiest way to debug this is to use
--with-context --debug-building
which will show the build properties.
(--debug-building generates a lot of output, so it's
better to restrict it to Boost.Context only, hence
--with-context).

In particular, check the values of <abi> and <binary-format>
for the asm_sources target.  <architecture> and <address-model>
should be correct, especially since you're passing
address-model explicitly, but it wouldn't hurt to check them
as well.

  That is what we were after. Our
build command for a gcc release build was:

./b2 --toolset=gcc-8.1 address-model=64 --stagedir=./stage64release
--build-dir=./build64release --layout=system --without-mpi
variant=release link=shared threading=multi runtime-link=shared install
--prefix=./osx64release/indep --exec-prefix=./osx64release/bin
--libdir=./osx64release/lib --includedir=./osx64release/include

user-config.jam entry is:

# gcc 8
using gcc
    : 8.1
    : "/usr/local/bin/g++-8"
    ;

We revisited this, and we got it to work building 1.67 with a Brew installed gcc 8.  I thought I'd record it on the mailing list for anyone else who might need it.  This is on OSX 10.13.5.  It needs a new asm entry as above, under
# X86_64/SYSV/MACH-O
alias asm_sources
   : asm/make_x86_64_sysv_macho_gas.S
     asm/jump_x86_64_sysv_macho_gas.S
     asm/ontop_x86_64_sysv_macho_gas.S
   : <abi>sysv
     <address-model>64
     <architecture>x86
     <binary-format>mach-o
     <toolset>gcc
   ;
and we modified the user-config.jam to contain

# gcc 8
using gcc
    : 8.1
    : "/usr/local/opt/gcc8/bin/g++-8"
    : <cxxflags>"-std=c++14 -isystem /usr/local/opt/gcc8/include/c++/8.1.0"
    ;

Debug b2 command was: 
./b2 --toolset=gcc-8.1 address-model=64 --stagedir=./stage64debug --build-dir=./build64debug --layout=system --without-mpi variant=debug link=shared threading=multi runtime-link=shared install --prefix=./osx64debug/indep --exec-prefix=./osx64debug/bin --libdir=./osx64debug/lib --includedir=./osx64debug/include

Release is: 
./b2 --toolset=gcc-8.1 address-model=64 --stagedir=./stage64release --build-dir=./build64release --layout=system --without-mpi variant=release link=shared threading=multi runtime-link=shared install --prefix=./osx64release/indep --exec-prefix=./osx64release/bin --libdir=./osx64release/lib --includedir=./osx64release/include

Damien