Hello,

I'm cross compiling an asio http server example from x86 linux to mipsel linux using boost-1.37.0 and gcc 4.1.2.
I've compiled libraries successfully using bjam but the http server code produces the following errors:

# export ARCH=mipsel
# export CC=mipsel-ssd-linux-gnu-gcc
# export CXX=mipsel-ssd-linux-gnu-g++
# export LD=mipsel-ssd-linux-gnu-ld
# make
mipsel-ssd-linux-gnu-gcc -L/usr/cross/mipsel/mipsel-ssd-linux-gnu/lib -L../boost-1.37.0/lib-mipsel connection.o connection_manager.o mime_types.o posix_main.o reply.o request_handler.o request_parser.o server.o  -o httpd -lpthread -lstdc++ -lboost_thread-gcc-mt-1_37 -lboost_system-gcc-mt-1_37
connection.o: In function `boost::detail::atomic_conditional_increment(int*)':
connection.cpp:(.text._ZN5boost6detail28atomic_conditional_incrementEPi[boost::detail::atomic_conditional_increment(int*)]+0x78): undefined reference to `__sync_val_compare_and_swap_4'
connection.o: In function `boost::detail::atomic_decrement(int*)':
connection.cpp:(.text._ZN5boost6detail16atomic_decrementEPi[boost::detail::atomic_decrement(int*)]+0x2c): undefined reference to `__sync_fetch_and_add_4'
connection.o: In function `boost::detail::atomic_increment(int*)':
connection.cpp:(.text._ZN5boost6detail16atomic_incrementEPi[boost::detail::atomic_increment(int*)]+0x2c): undefined reference to `__sync_fetch_and_add_4'
../boost-1.37.0/lib-mipsel/libboost_thread-gcc-mt-1_37.a(thread.o): In function `boost::thread::get_thread_info() const':
thread.cpp:(.text+0x478): undefined reference to `__sync_fetch_and_add_4'
../boost-1.37.0/lib-mipsel/libboost_thread-gcc-mt-1_37.a(thread.o): In function `boost::detail::thread_data_base::~thread_data_base()':
thread.cpp:(.text+0x7ac): undefined reference to `__sync_fetch_and_add_4'
thread.cpp:(.text+0x7e0): undefined reference to `__sync_fetch_and_add_4'
... snip ...

I've seen "Disable sync use for arm and hppa" at
https://svn.boost.org/trac/boost/changeset/44440

I've also glanced at detail/sp_counted_base.hpp and detail/atomic_count_sync.hpp.

Is this a simple matter of avoiding this code as in the changeset, or should it be written? I don't know much about the MIPS architecture.

Thank you,
Gordon