
bjam toolset=gcc context-impl=asm architecture=x86 instruction-set=native address-model=64 --with-context variant=release stage
Then I compile example link.cpp
Run it
It crashes!
When linking with static libboost_context.a it works...
OS: Linux artik-laptop 2.6.35-24-generic #42-Ubuntu SMP Thu Dec 2 02:41:37 UTC 2010 x86_64 GNU/Linux Compiler: gcc-4.4.5 CPU: Intel(R) Core(TM) i5 CPU M 460 @ 2.53GHz
I have not tested it on i5 but it should work too. I tried it on my system (Intel(R) Core(TM)2 Quad CPU Q6700 @ 2.66GHz, Linux c2dlx01 2.6.35-28-generic #49-Ubuntu SMP Tue Mar 1 14:39:03 UTC 2011 x86_64 GNU/Linux). cd libs/context/examples bjam toolset=gcc context-impl=asm architecture=x86 instruction-set=native address-model=64 --with-context variant=release ../../../bin.v2/libs/context/example/gcc-4.4.5/release/address-model-64/architecture-x86/context-impl-asm/instruction-set-native/link -> worked I changed <link> from 'static' to 'shared' in Jamfile.v2 in context/examples directory. bjam toolset=gcc context-impl=asm architecture=x86 instruction-set=native address-model=64 --with-context variant=release ../../../bin.v2/libs/context/example/gcc-4.4.5/release/address-model-64/architecture-x86/context-impl-asm/instruction-set-native/link -> worked ldd ../../../bin.v2/libs/context/example/gcc-4.4.5/release/address-model-64/architecture-x86/context-impl-asm/instruction-set-native/link linux-vdso.so.1 => (0x00007fffdc098000) libboost_context.so.1.45.0 => /home/graemer/Projekte/C++/boost-dev/bin.v2/libs/context/build/gcc-4.4.5/release/address-model-64/architecture-x86/context-impl-asm/instruction-set-native/libboost_context.so.1.45.0 (0x00007fcfe8343000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fcfe801a000) libm.so.6 => /lib/libm.so.6 (0x00007fcfe7d97000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007fcfe7b81000) libc.so.6 => /lib/libc.so.6 (0x00007fcfe77fd000) /lib64/ld-linux-x86-64.so.2 (0x00007fcfe855a000) ->shared library libboost_context.so.1.45.0 is loaded I'm not sure what you did that it crashes. Can you tell me on which line of code it happens (gdb -> stacktrace). the assembler file is invoked like: "g++" -x assembler-with-cpp -O3 -finline-functions -Wno-inline -Wall -march=native -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_DYN_LINK=1 -DNDEBUG -I"../../.." -c -o "../../../bin.v2/libs/context/build/gcc-4.4.5/release/address-model-64/architecture-x86/context-impl-asm/instruction-set-native/asm/fcontext_x86_64_sysv_elf_gas.o" "../../../libs/context/src/asm/fcontext_x86_64_sysv_elf_gas.S" the *.cpp files: "g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -march=native -fPIC -m64 -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_DYN_LINK=1 -DNDEBUG -I"../../.." -c -o "../../../bin.v2/libs/context/build/gcc-4.4.5/release/address-model-64/architecture-x86/context-impl-asm/instruction-set-native/protected_stack_posix.o" "../../../libs/context/src/protected_stack_posix.cpp" thx, Oliver