Ubuntu Trusty and clang3.9+ASan

Hi guys,

I was trying to get Address sanitizer working under Ubuntu Trusty with clang-3.9 (tested locally and on travis), but I hit the following error :

Linking CXX executable cmTC_c37c8

/home/travis/build/Lectem/range-v3/deps/cmake/bin/cmake -E

cmake_link_script CMakeFiles/cmTC_c37c8.dir/link.txt --verbose=1

/usr/bin/clang+±3.9 -fsanitize=address,undefined,integer

-fno-omit-frame-pointer -fno-sanitize=unsigned-integer-overflow

-D__extern_always_inline=inline -stdlib=libc++ -nostdinc++ -cxx-isystem

/usr/include/c++/v1/ -Wno-unused-command-line-argument

CMakeFiles/cmTC_c37c8.dir/testCXXCompiler.cxx.o -o cmTC_c37c8



unrecognized relocation (0x2a) in section `.text’

/usr/bin/ld: final link failed: Bad value

It works fine with Ubuntu Precise though, any idea how to fix this ? It seems to be related with the linker version but I’m not sure of what to do to fix it.

For reference the failing travis job (trusty) : https://travis-ci.org/Lectem/range-v3/jobs/271277307

And the same one but using Precise : https://travis-ci.org/Lectem/range-v3/jobs/271278949

Thanks !