[PATCH] Upstreaming changes to support Rust on Bitrig

Dave Huseby dhuseby at mozilla.com
Tue Feb 10 12:59:16 PST 2015


This patch adds a few things to LLVM that were necessary to bootstrap Rust on Bitrig.

http://reviews.llvm.org/D7543

Files:
  Makefile.config.in
  autoconf/config.sub
  configure
  lib/Target/X86/X86Subtarget.h

Index: Makefile.config.in
===================================================================
--- Makefile.config.in
+++ Makefile.config.in
@@ -117,6 +117,12 @@
 # Target operating system for which LLVM will compile for.
 TARGET_OS=@TARGET_OS@
 
+# Adjust paths for Bitrig
+ifeq ($(TARGET_OS),Bitrig)
+PROJ_docsdir    := $(PROJ_prefix)/share/docs/llvm
+PROJ_mandir     := $(PROJ_prefix)/man
+endif
+
 # Host hardware architecture
 HOST_ARCH=@HOST_ARCH@
 # Target hardware architecture
Index: autoconf/config.sub
===================================================================
--- autoconf/config.sub
+++ autoconf/config.sub
@@ -1354,7 +1354,7 @@
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -bitrig*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
Index: configure
===================================================================
--- configure
+++ configure
@@ -3966,6 +3966,11 @@
     llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
     llvm_cv_os_type="DragonFly"
     llvm_cv_platform_type="Unix" ;;
+  *-*-bitrig*)
+    llvm_cv_link_all_option="-Wl,--whole-archive"
+    llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
+    llvm_cv_os_type="Bitrig"
+    llvm_cv_platform_type="Unix" ;;
   *-*-hpux*)
     llvm_cv_link_all_option="-Wl,--whole-archive"
     llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
@@ -4052,6 +4057,8 @@
     llvm_cv_target_os_type="NetBSD" ;;
   *-*-dragonfly*)
     llvm_cv_target_os_type="DragonFly" ;;
+  *-*-bitrig*)
+    llvm_cv_target_os_type="Bitrig" ;;
   *-*-hpux*)
     llvm_cv_target_os_type="HP-UX" ;;
   *-*-interix*)
Index: lib/Target/X86/X86Subtarget.h
===================================================================
--- lib/Target/X86/X86Subtarget.h
+++ lib/Target/X86/X86Subtarget.h
@@ -393,6 +393,7 @@
   bool isTargetDragonFly() const { return TargetTriple.isOSDragonFly(); }
   bool isTargetSolaris() const { return TargetTriple.isOSSolaris(); }
   bool isTargetPS4() const { return TargetTriple.isPS4(); }
+  bool isTargetBitrig() const { return TargetTriple.isOSBitrig(); }
 
   bool isTargetELF() const { return TargetTriple.isOSBinFormatELF(); }
   bool isTargetCOFF() const { return TargetTriple.isOSBinFormatCOFF(); }

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7543.19704.patch
Type: text/x-patch
Size: 2524 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150210/afb053a4/attachment.bin>


More information about the llvm-commits mailing list