When build/link my application with -flto (using GCC 4.8.3 and Boost 1.59) I get the following error when linking the executable: 1:58 /bin/ld: _ZN5boost4asio6detail15keyword_tss_ptrINS1_10call_stackINS1_15task_io_serviceENS1_27task_io_service_thread_infoEE7contextEE6value_E: TLS definition in ./build/lib/mylib.so section .tbss mismatches non-TLS definition in build/src/my_app/main.o (symbol from plugin) section .gnu.linkonce.t._ZN5boost4asio6detail15keyword_tss_ptrINS1_10call_stackINS1_15task_io_serviceENS1_27task_io_service_thread_infoEE7contextEE6value_E build/src/my_app/main.o (symbol from plugin): could not read symbols: Bad value collect2: error: ld returned 1 exit status I do not see this error if I do not use the -flto option at link time. I confess I have no real idea what’s going on here - a bit of googling suggested this might be related to the __thread directive in the GCC for thread local storage, so I tried to rebuild Boost like: ./b2 define=BOOST_ASIO_DISABLE_THREAD_KEYWORK_EXTENSION. This didn’t help. -Matt