summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/tools/macos.inc
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/runtime/tools/macos.inc')
-rw-r--r--openmp/runtime/tools/macos.inc37
1 files changed, 37 insertions, 0 deletions
diff --git a/openmp/runtime/tools/macos.inc b/openmp/runtime/tools/macos.inc
new file mode 100644
index 00000000000..38f86b168d9
--- /dev/null
+++ b/openmp/runtime/tools/macos.inc
@@ -0,0 +1,37 @@
+#
+#//===----------------------------------------------------------------------===//
+#//
+#// The LLVM Compiler Infrastructure
+#//
+#// This file is dual licensed under the MIT and the University of Illinois Open
+#// Source Licenses. See LICENSE.txt for details.
+#//
+#//===----------------------------------------------------------------------===//
+#
+
+####### Detections and Commands ###############################################
+
+ifndef arch
+ ifeq ($(shell /usr/sbin/sysctl -n hw.machine),Power Macintosh)
+ ifeq ($(shell /usr/sbin/sysctl -n hw.optional.64bitops),1)
+ export arch:=ppc64
+ else
+ export arch:=ppc32
+ endif
+ else
+ ifeq ($(shell /usr/sbin/sysctl -n hw.optional.x86_64 2>/dev/null),1)
+ export arch:=intel64
+ else
+ export arch:=ia32
+ endif
+ endif
+endif
+
+CMD=$(SHELL) -c
+CWD=$(shell pwd)
+RM?=rm -f
+RMR?=rm -rf
+RD?=rmdir
+MD?=mkdir -p
+NUL= /dev/null
+SLASH=/
OpenPOWER on IntegriCloud