<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jan 23, 2014 at 7:07 AM, Renato Golin <span dir="ltr"><<a href="mailto:renato.golin@linaro.org" target="_blank">renato.golin@linaro.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi samsonov, asl,<br>
<br>
First attempt to compile the RT library on ARM via CMake.<br>
<br>
The current changes builds:<br>
lib/clang/3.5/lib/linux/libclang_rt.arm.a<br>
lib/clang/3.5/lib/linux/libclang_rt.san-arm.a<br>
<br>
The UBSan tests are looking for:<br>
lib/clang/3.5/lib/linux/libclang_rt.san-armv7l.a<br>
lib/clang/3.5/lib/linux/libclang_rt.ubsan-armv7l.a<br>
lib/clang/3.5/lib/linux/libclang_rt.ubsan_cxx-armv7l.a<br>
<br>
So, not only it's looking for the wrong arch name (the libs should work on all ARM, so I don't think we should name it armv7), but it's also looking for the UBSan libraries, which weren't compiled. I'm not sure why not...<br>
</blockquote><div><br></div><div>How would this deal with hard-fp vs soft-fp? (I assume that soft-float is entirely pointless).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<a href="http://llvm-reviews.chandlerc.com/D2604" target="_blank">http://llvm-reviews.chandlerc.com/D2604</a><br>
<br>
Files:<br>
CMakeLists.txt<br>
lib/CMakeLists.txt<br>
lib/dfsan/lit_tests/lit.cfg<br>
lib/ubsan/lit_tests/lit.common.cfg<br>
<br>
Index: CMakeLists.txt<br>
===================================================================<br>
--- CMakeLists.txt<br>
+++ CMakeLists.txt<br>
@@ -98,6 +98,8 @@<br>
test_target_arch(i386 ${TARGET_32_BIT_CFLAGS})<br>
elseif("${LLVM_NATIVE_ARCH}" STREQUAL "PowerPC")<br>
test_target_arch(powerpc64 ${TARGET_64_BIT_CFLAGS})<br>
+elseif("${LLVM_NATIVE_ARCH}" STREQUAL "ARM")<br>
+ test_target_arch(arm "")<br>
endif()<br>
<br>
# We only support running instrumented tests when we're not cross compiling<br>
@@ -210,7 +212,7 @@<br>
# Architectures supported by Sanitizer runtimes. Specific sanitizers may<br>
# support only subset of these (e.g. TSan works on x86_64 only).<br>
filter_available_targets(SANITIZER_COMMON_SUPPORTED_ARCH<br>
- x86_64 i386 powerpc64)<br>
+ x86_64 i386 powerpc64 arm)<br>
<br>
add_subdirectory(include)<br>
<br>
Index: lib/CMakeLists.txt<br>
===================================================================<br>
--- lib/CMakeLists.txt<br>
+++ lib/CMakeLists.txt<br>
@@ -195,8 +195,72 @@<br>
i386/umoddi3.S<br>
${GENERIC_SOURCES})<br>
<br>
+set(arm_SOURCES<br>
+ arm/adddf3vfp.S<br>
+ arm/extendsfdf2vfp.S<br>
+ arm/nedf2vfp.S<br>
+ arm/addsf3vfp.S<br>
+ arm/fixdfsivfp.S<br>
+ arm/negdf2vfp.S<br>
+ arm/aeabi_dcmp.S<br>
+ arm/fixsfsivfp.S<br>
+ arm/negsf2vfp.S<br>
+ arm/aeabi_fcmp.S<br>
+ arm/fixunsdfsivfp.S<br>
+ arm/nesf2vfp.S<br>
+ arm/aeabi_idivmod.S<br>
+ arm/fixunssfsivfp.S<br>
+ arm/restore_vfp_d8_d15_regs.S<br>
+ arm/aeabi_ldivmod.S<br>
+ arm/floatsidfvfp.S<br>
+ arm/save_vfp_d8_d15_regs.S<br>
+ arm/aeabi_memcmp.S<br>
+ arm/floatsisfvfp.S<br>
+ arm/aeabi_memcpy.S<br>
+ arm/floatunssidfvfp.S<br>
+ arm/subdf3vfp.S<br>
+ arm/aeabi_memmove.S<br>
+ arm/floatunssisfvfp.S<br>
+ arm/subsf3vfp.S<br>
+ arm/aeabi_memset.S<br>
+ arm/gedf2vfp.S<br>
+ arm/switch16.S<br>
+ arm/aeabi_uidivmod.S<br>
+ arm/gesf2vfp.S<br>
+ arm/switch32.S<br>
+ arm/aeabi_uldivmod.S<br>
+ arm/gtdf2vfp.S<br>
+ arm/switch8.S<br>
+ arm/bswapdi2.S<br>
+ arm/gtsf2vfp.S<br>
+ arm/switchu8.S<br>
+ arm/bswapsi2.S<br>
+ arm/ledf2vfp.S<br>
+ arm/sync_synchronize.S<br>
+ arm/comparesf2.S<br>
+ arm/lesf2vfp.S<br>
+ arm/truncdfsf2vfp.S<br>
+ arm/divdf3vfp.S<br>
+ arm/ltdf2vfp.S<br>
+ arm/udivmodsi4.S<br>
+ arm/divmodsi4.S<br>
+ arm/ltsf2vfp.S<br>
+ arm/udivsi3.S<br>
+ arm/divsf3vfp.S<br>
+ arm/Makefile.mk<br>
+ arm/umodsi3.S<br>
+ arm/divsi3.S<br>
+ arm/modsi3.S<br>
+ arm/unorddf2vfp.S<br>
+ arm/eqdf2vfp.S<br>
+ arm/muldf3vfp.S<br>
+ arm/unordsf2vfp.S<br>
+ arm/eqsf2vfp.S<br>
+ arm/mulsf3vfp.S<br>
+ ${GENERIC_SOURCES})<br>
+<br>
if (NOT WIN32)<br>
- foreach(arch x86_64 i386)<br>
+ foreach(arch x86_64 i386 arm)<br>
if(CAN_TARGET_${arch})<br>
add_compiler_rt_static_runtime(clang_rt.${arch} ${arch}<br>
SOURCES ${${arch}_SOURCES}<br>
Index: lib/dfsan/lit_tests/lit.cfg<br>
===================================================================<br>
--- lib/dfsan/lit_tests/lit.cfg<br>
+++ lib/dfsan/lit_tests/lit.cfg<br>
@@ -67,3 +67,11 @@<br>
# DataFlowSanitizer tests are currently supported on Linux only.<br>
if config.host_os not in ['Linux']:<br>
config.unsupported = True<br>
+<br>
+# We're building the sanitizers on ARM, but the tests are looking for the<br>
+# wrong name of static objects, disable for now<br>
+if 'armv4' in config.root.target_triple or \<br>
+ 'armv5' in config.root.target_triple or \<br>
+ 'armv6' in config.root.target_triple or \<br>
+ 'armv7' in config.root.target_triple:<br>
+ config.unsupported = True<br>
Index: lib/ubsan/lit_tests/lit.common.cfg<br>
===================================================================<br>
--- lib/ubsan/lit_tests/lit.common.cfg<br>
+++ lib/ubsan/lit_tests/lit.common.cfg<br>
@@ -28,4 +28,12 @@<br>
if config.host_os not in ['Linux', 'Darwin']:<br>
config.unsupported = True<br>
<br>
+# We're building the sanitizers on ARM, but the tests are looking for the<br>
+# wrong name of static objects, disable for now<br>
+if 'armv4' in config.root.target_triple or \<br>
+ 'armv5' in config.root.target_triple or \<br>
+ 'armv6' in config.root.target_triple or \<br>
+ 'armv7' in config.root.target_triple:<br>
+ config.unsupported = True<br>
+<br>
config.pipefail = False<br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Saleem Abdulrasool<br>compnerd (at) compnerd (dot) org
</div></div>