summaryrefslogtreecommitdiff
path: root/tools/common/target_detect.h
diff options
context:
space:
mode:
authorJohn Hodge (Mutabah) <acessdev@gmail.com>2018-06-30 09:22:50 +0800
committerGitHub <noreply@github.com>2018-06-30 09:22:50 +0800
commite7fa373946f2da1a67a5f74d92191da1a13f7841 (patch)
tree0dc1a5b54254cbece789de86e6223cc09d25b255 /tools/common/target_detect.h
parentb03d61ed130dad6fa88a3beb4c32e48f86fdf84e (diff)
parent44262d8ce69f28c3b691131c4fb5e8824563053e (diff)
downloadmrust-e7fa373946f2da1a67a5f74d92191da1a13f7841.tar.gz
Merge pull request #79 from myfreeweb/master
Add FreeBSD and DragonFly support
Diffstat (limited to 'tools/common/target_detect.h')
-rw-r--r--tools/common/target_detect.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/common/target_detect.h b/tools/common/target_detect.h
index 995ab6a4..a4c44ba4 100644
--- a/tools/common/target_detect.h
+++ b/tools/common/target_detect.h
@@ -34,6 +34,19 @@
# else
# define DEFAULT_TARGET_NAME "i586-windows-gnu"
# endif
+// - FreeBSD
+#elif defined(__FreeBSD__)
+# if defined(__amd64__)
+# define DEFAULT_TARGET_NAME "x86_64-unknown-freebsd"
+# elif defined(__aarch64__)
+# define DEFAULT_TARGET_NAME "aarch64-unknown-freebsd"
+# elif defined(__arm__)
+# define DEFAULT_TARGET_NAME "arm-unknown-freebsd"
+# elif defined(__i386__)
+# define DEFAULT_TARGET_NAME "i686-unknown-freebsd"
+# else
+# warning "Unable to detect a suitable default target (FreeBSD)"
+# endif
// - NetBSD
#elif defined(__NetBSD__)
# if defined(__amd64__)
@@ -54,6 +67,9 @@
# else
# warning "Unable to detect a suitable default target (OpenBSD)"
# endif
+// - DragonFly
+#elif defined(__DragonFly__)
+# define DEFAULT_TARGET_NAME "x86_64-unknown-dragonfly"
// - Apple devices
#elif defined(__APPLE__)
# define DEFAULT_TARGET_NAME "x86_64-apple-macosx"