summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/config/checks/architecture
diff options
context:
space:
mode:
Diffstat (limited to 'src/boost/libs/config/checks/architecture')
-rw-r--r--src/boost/libs/config/checks/architecture/32.cpp9
-rw-r--r--src/boost/libs/config/checks/architecture/64.cpp9
-rw-r--r--src/boost/libs/config/checks/architecture/Jamroot.jam25
-rw-r--r--src/boost/libs/config/checks/architecture/arm.cpp15
-rw-r--r--src/boost/libs/config/checks/architecture/combined.cpp21
-rw-r--r--src/boost/libs/config/checks/architecture/mips1.cpp11
-rw-r--r--src/boost/libs/config/checks/architecture/power.cpp14
-rw-r--r--src/boost/libs/config/checks/architecture/riscv.cpp10
-rw-r--r--src/boost/libs/config/checks/architecture/s390x.cpp11
-rw-r--r--src/boost/libs/config/checks/architecture/sparc.cpp11
-rw-r--r--src/boost/libs/config/checks/architecture/x86.cpp16
11 files changed, 152 insertions, 0 deletions
diff --git a/src/boost/libs/config/checks/architecture/32.cpp b/src/boost/libs/config/checks/architecture/32.cpp
new file mode 100644
index 00000000..d3d2dba2
--- /dev/null
+++ b/src/boost/libs/config/checks/architecture/32.cpp
@@ -0,0 +1,9 @@
+// 32.cpp
+//
+// Copyright (c) 2012 Steven Watanabe
+//
+// Distributed under the Boost Software License Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+int test[sizeof(void*) == 4? 1 : -1];
diff --git a/src/boost/libs/config/checks/architecture/64.cpp b/src/boost/libs/config/checks/architecture/64.cpp
new file mode 100644
index 00000000..5a33bc64
--- /dev/null
+++ b/src/boost/libs/config/checks/architecture/64.cpp
@@ -0,0 +1,9 @@
+// 64.cpp
+//
+// Copyright (c) 2012 Steven Watanabe
+//
+// Distributed under the Boost Software License Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+int test[sizeof(void*) == 8? 1 : -1];
diff --git a/src/boost/libs/config/checks/architecture/Jamroot.jam b/src/boost/libs/config/checks/architecture/Jamroot.jam
new file mode 100644
index 00000000..0d3b5e7b
--- /dev/null
+++ b/src/boost/libs/config/checks/architecture/Jamroot.jam
@@ -0,0 +1,25 @@
+# Jamfile.jam
+#
+# Copyright 2012 Steven Watanabe
+#
+# Distributed under the Boost Software License Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+project /boost/architecture
+ : requirements
+ -<conditional>@boostcpp.deduce-address-model
+ -<conditional>@boostcpp.deduce-architecture
+ ;
+
+obj 32 : 32.cpp ;
+obj 64 : 64.cpp ;
+
+obj arm : arm.cpp ;
+obj combined : combined.cpp ;
+obj mips1 : mips1.cpp ;
+obj power : power.cpp ;
+obj riscv : riscv.cpp ;
+obj sparc : sparc.cpp ;
+obj x86 : x86.cpp ;
+obj s390x : s390x.cpp ;
diff --git a/src/boost/libs/config/checks/architecture/arm.cpp b/src/boost/libs/config/checks/architecture/arm.cpp
new file mode 100644
index 00000000..794aba8b
--- /dev/null
+++ b/src/boost/libs/config/checks/architecture/arm.cpp
@@ -0,0 +1,15 @@
+// arm.cpp
+//
+// Copyright (c) 2012 Steven Watanabe
+//
+// Distributed under the Boost Software License Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#if !defined(__arm__) && !defined(__thumb__) && \
+ !defined(__TARGET_ARCH_ARM) && !defined(__TARGET_ARCH_THUMB) && \
+ !defined(_ARM) && !defined(_M_ARM) && \
+ !defined(__aarch64__)
+#error "Not ARM"
+#endif
+
diff --git a/src/boost/libs/config/checks/architecture/combined.cpp b/src/boost/libs/config/checks/architecture/combined.cpp
new file mode 100644
index 00000000..4e5a387b
--- /dev/null
+++ b/src/boost/libs/config/checks/architecture/combined.cpp
@@ -0,0 +1,21 @@
+// combined.cpp
+//
+// Copyright (c) 2012 Steven Watanabe
+// 2014 Oliver Kowalke
+//
+// Distributed under the Boost Software License Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#if !defined(i386) && !defined(__i386__) && !defined(__i386) \
+ && !defined(__i486__) && !defined(__i586__) && !defined(__i686__) \
+ && !defined(_M_IX86) && !defined(__X86__) && !defined(_X86_) \
+ && !defined(__THW_INTEL__) && !defined(__I86__) && !defined(__INTEL__) \
+ && !defined(__amd64__) && !defined(__x86_64__) && !defined(__amd64) \
+ && !defined(__x86_64) && !defined(_M_X64) \
+ && !defined(__powerpc) && !defined(__powerpc__) && !defined(__ppc) \
+ && !defined(__ppc__) && !defined(_M_PPC) && !defined(_ARCH_PPC) \
+ && !defined(__POWERPC__) && !defined(__PPCGECKO__) \
+ && !defined(__PPCBROADWAY) && !defined(_XENON)
+#error "Not combined"
+#endif
diff --git a/src/boost/libs/config/checks/architecture/mips1.cpp b/src/boost/libs/config/checks/architecture/mips1.cpp
new file mode 100644
index 00000000..adc4a61d
--- /dev/null
+++ b/src/boost/libs/config/checks/architecture/mips1.cpp
@@ -0,0 +1,11 @@
+// mips1.cpp
+//
+// Copyright (c) 2012 Steven Watanabe
+//
+// Distributed under the Boost Software License Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#if !((defined(__mips) && __mips == 1) || defined(_MIPS_ISA_MIPS1) || defined(_R3000))
+#error "Not MIPS1"
+#endif
diff --git a/src/boost/libs/config/checks/architecture/power.cpp b/src/boost/libs/config/checks/architecture/power.cpp
new file mode 100644
index 00000000..0551194a
--- /dev/null
+++ b/src/boost/libs/config/checks/architecture/power.cpp
@@ -0,0 +1,14 @@
+// power.cpp
+//
+// Copyright (c) 2012 Steven Watanabe
+//
+// Distributed under the Boost Software License Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#if !defined(__powerpc) && !defined(__powerpc__) && !defined(__ppc) \
+ && !defined(__ppc__) && !defined(_M_PPC) && !defined(_ARCH_PPC) \
+ && !defined(__POWERPC__) && !defined(__PPCGECKO__) \
+ && !defined(__PPCBROADWAY) && !defined(_XENON)
+#error "Not PPC"
+#endif
diff --git a/src/boost/libs/config/checks/architecture/riscv.cpp b/src/boost/libs/config/checks/architecture/riscv.cpp
new file mode 100644
index 00000000..d2cea68b
--- /dev/null
+++ b/src/boost/libs/config/checks/architecture/riscv.cpp
@@ -0,0 +1,10 @@
+// riscv.cpp
+//
+// Copyright Andreas Schwab 2019
+// Distributed under the Boost Software License Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#if !defined(__riscv)
+#error "Not RISC-V"
+#endif
diff --git a/src/boost/libs/config/checks/architecture/s390x.cpp b/src/boost/libs/config/checks/architecture/s390x.cpp
new file mode 100644
index 00000000..a3630706
--- /dev/null
+++ b/src/boost/libs/config/checks/architecture/s390x.cpp
@@ -0,0 +1,11 @@
+// s390x.cpp
+//
+// Copyright (c) 2012 Steven Watanabe
+//
+// Distributed under the Boost Software License Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#if !defined(__s390x__)
+#error "Not S390x"
+#endif
diff --git a/src/boost/libs/config/checks/architecture/sparc.cpp b/src/boost/libs/config/checks/architecture/sparc.cpp
new file mode 100644
index 00000000..3df2df84
--- /dev/null
+++ b/src/boost/libs/config/checks/architecture/sparc.cpp
@@ -0,0 +1,11 @@
+// power.cpp
+//
+// Copyright (c) 2012 Steven Watanabe
+//
+// Distributed under the Boost Software License Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#if !defined(__sparc__) && !defined(__sparc)
+#error "Not SPARC"
+#endif
diff --git a/src/boost/libs/config/checks/architecture/x86.cpp b/src/boost/libs/config/checks/architecture/x86.cpp
new file mode 100644
index 00000000..0d2f9c2e
--- /dev/null
+++ b/src/boost/libs/config/checks/architecture/x86.cpp
@@ -0,0 +1,16 @@
+// x86.cpp
+//
+// Copyright (c) 2012 Steven Watanabe
+//
+// Distributed under the Boost Software License Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#if !defined(i386) && !defined(__i386__) && !defined(__i386) \
+ && !defined(__i486__) && !defined(__i586__) && !defined(__i686__) \
+ && !defined(_M_IX86) && !defined(__X86__) && !defined(_X86_) \
+ && !defined(__THW_INTEL__) && !defined(__I86__) && !defined(__INTEL__) \
+ && !defined(__amd64__) && !defined(__x86_64__) && !defined(__amd64) \
+ && !defined(__x86_64) && !defined(_M_X64)
+#error "Not x86"
+#endif