]> git.proxmox.com Git - rustc.git/blobdiff - src/compiler-rt/make/platform/triple.mk
Imported Upstream version 1.6.0+dfsg1
[rustc.git] / src / compiler-rt / make / platform / triple.mk
index 792e8062006182cf12e7d3aee9e6450f2b671440..0d68b2eafdd5c46d6ea5e45af6ddd8a2ca94fdb7 100644 (file)
@@ -25,7 +25,7 @@ endif
 endif
 
 # Filter out stuff that gcc cannot compile (these are only needed for clang-generated code anywasys).
-CommonFunctions_gcc := $(filter-out atomic enable_execute_stack,$(CommonFunctions))
+CommonFunctions_gcc := $(filter-out atomic% enable_execute_stack,$(CommonFunctions))
 
 # Filter out stuff which is not available on specific target
 # For example, sync_fetch_and_add_4 uses Thumb instructions, which are unavailable
@@ -54,6 +54,18 @@ ifeq ($(TargetTriple),arm-linux-androideabi)
                 sync_fetch_and_umin_8
 endif
 
+# Disable emutls on MIPS
+# Rust uses GCC 4.4 to cross-compile, which doesn't have some builtins
+ifneq (,$(findstring mips,$(TargetTriple)))
+    CommonDisabledFunctions := emutls
+endif
+
+# Disable emutls on Windows
+# emutls works on POSIX only as it uses pthreads
+ifneq (,$(findstring windows,$(TargetTriple)))
+    CommonDisabledFunctions := emutls
+endif
+
 # Clear cache is builtin on aarch64-apple-ios
 # arm64 and aarch64 are synonims, but iOS targets usually use arm64 (history reasons)
 ifeq (aarch64-apple-ios,$(subst arm64,aarch64,$(TargetTriple)))