Bug 1248391 - Unbreak --enable-rust on BSDs after bug 1177599. r=ted
authorJan Beich <jbeich@FreeBSD.org>
Thu, 24 Mar 2016 15:10:44 +0000
changeset 291209 7511231503fbee1ad7f1a936e531192f25efa262
parent 291208 3c89bafeec3b23f9a5f5707b1ddd3bc985d20ed0
child 291210 70e88ad137197c2b5cc73916c15b5385684b3a2e
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1248391, 1177599
milestone48.0a1
Bug 1248391 - Unbreak --enable-rust on BSDs after bug 1177599. r=ted
build/autoconf/rust.m4
--- a/build/autoconf/rust.m4
+++ b/build/autoconf/rust.m4
@@ -42,16 +42,44 @@ AC_DEFUN([MOZ_RUST_SUPPORT], [
     # compiled for the appropriate ABI.  We need to perform appropriate
     # munging to get the correct option to rustc.
     #
     # The canonical list of targets supported can be derived from:
     #
     # https://github.com/rust-lang/rust/tree/master/mk/cfg
     rust_target=
     case "$target" in
+      # Bitrig
+      x86_64-*-bitrig*)
+          rust_target=x86_64-unknown-bitrig
+          ;;
+
+      # DragonFly
+      x86_64-*-dragonfly*)
+          rust_target=x86_64-unknown-dragonfly
+          ;;
+
+      # FreeBSD, GNU/kFreeBSD
+      i*86-*-*freebsd*)
+          rust_target=i686-unknown-freebsd
+          ;;
+      x86_64-*-*freebsd*)
+          rust_target=x86_64-unknown-freebsd
+          ;;
+
+      # NetBSD
+      x86_64-*-netbsd*)
+          rust_target=x86_64-unknown-netbsd
+          ;;
+
+      # OpenBSD
+      x86_64-*-openbsd*)
+          rust_target=x86_64-unknown-openbsd
+          ;;
+
       # Linux
       i*86*linux-gnu)
           rust_target=i686-unknown-linux-gnu
           ;;
       x86_64*linux-gnu)
           rust_target=x86_64-unknown-linux-gnu
           ;;