DynamoRIO build failure using clang: asm goto is not supported
Created by: zhaoqin
Building DynamoRIO with tests using clang (3.4 and 3.7) failed:
> CC=/.../Clang/clang+llvm-3.7.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang CXX=/.../Clang/clang+llvm-3.7.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang++ cmake -DDEBUG=ON -DBUILD_TESTS=ON ../../dynamorio.git
> make -j
...
[ 59%] Building C object suite/tests/CMakeFiles/client.annotation-concurrency.dir/client-interface/annotation-concurrency.c.o
/usr/local/google/home/zhaoqin/Workspace/DynamoRIO/dynamorio.git/suite/tests/client-interface/annotation-concurrency.c:149:5: error: expected '(' after 'asm'
TEST_ANNOTATION_SET_MODE(thread_handling_index, MODE_1,
^
/usr/local/google/home/zhaoqin/Workspace/DynamoRIO/builds/build_x64_dbg.clang/suite/tests/annotations/test_mode_annotations.h:47:5: note: expanded from macro 'TEST_ANNOTATION_SET_MODE'
DR_ANNOTATION_OR_NATIVE(test_annotation_set_mode, native_version, context_id, mode)
^
/usr/local/google/home/zhaoqin/Workspace/DynamoRIO/dynamorio.git/core/lib/dr_annotations_asm.h:216:22: note: expanded from macro 'DR_ANNOTATION_OR_NATIVE'
__asm__ volatile goto (".byte 0xeb; .byte "LABEL_REFERENCE_LENGTH"; \
^
It looks like clang does not support asm goto
, xref https://llvm.org/bugs/show_bug.cgi?id=9295.