when compiling yosefk-checkedthreads_test with -fno-common (which is defined for the asan testcase), it is no longer able to link:
$ make yosefk-checkedthreads_test CFLAGS="-fno-common"
clang -fno-common yosefk-checkedthreads_test.c yosefk-checkedthreads/src/*.c ../C-Hayai/build/src/libchayai.a -DUSE_PAPI \
-o "./yosefk-checkedthreads_test" -I ../C-Hayai/src -lm -lpapi -lpthread -I yosefk-checkedthreads/include
/tmp/stubs_openmp-b86768.o:(.bss+0x38): multiple definition of `g_ct_pthreads_imp'
/tmp/pthreads_imp-b02a0a.o:(.data+0x0): first defined here
/tmp/stubs_pthreads-4a931b.o:(.bss+0x38): multiple definition of `g_ct_openmp_imp'
/tmp/openmp_imp-41e628.o:(.data+0x0): first defined here
/tmp/stubs_pthreads-4a931b.o:(.bss+0x0): multiple definition of `g_ct_tbb_imp'
/tmp/stubs_openmp-b86768.o:(.bss+0x0): first defined here
/tmp/stubs_tbb-bcbd7c.o:(.bss+0x0): multiple definition of `g_ct_openmp_imp'
/tmp/openmp_imp-41e628.o:(.data+0x0): first defined here
/tmp/stubs_tbb-bcbd7c.o:(.bss+0x38): multiple definition of `g_ct_pthreads_imp'
/tmp/pthreads_imp-b02a0a.o:(.data+0x0): first defined here
/tmp/tbb_stub-7abb72.o:(.bss+0x0): multiple definition of `g_ct_tbb_imp'
/tmp/stubs_openmp-b86768.o:(.bss+0x0): first defined here
clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:465: yosefk-checkedthreads_test] Error 1
when compiling
yosefk-checkedthreads_test
with-fno-common
(which is defined for the asan testcase), it is no longer able to link: