aboutsummaryrefslogtreecommitdiffstats
path: root/src/build-data/buildh.in
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-08-17 10:25:20 -0400
committerJack Lloyd <[email protected]>2016-08-17 10:25:20 -0400
commit852eaff2b6ddb57f129ad3479ea03f959a6f1bd4 (patch)
tree24d0fb2d6690aea0a414849da374bfdeebe71344 /src/build-data/buildh.in
parent9a63fc3976526213a4ccbd81a564f321f4dc5136 (diff)
parent6fbeda78c3bd252dde96eb51d4e023d09d0dd81a (diff)
Merge GH #585 Prevent x86-32 vs x86-64 build time confusion
Diffstat (limited to 'src/build-data/buildh.in')
-rw-r--r--src/build-data/buildh.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/build-data/buildh.in b/src/build-data/buildh.in
index 1d643248e..8b8f09ed5 100644
--- a/src/build-data/buildh.in
+++ b/src/build-data/buildh.in
@@ -272,4 +272,20 @@ Each read generates 32 bits of output
// The struct is only declared to force the semicolon, it is never defined.
#define BOTAN_FORCE_SEMICOLON struct BOTAN_DUMMY_STRUCT
+#if defined(BOTAN_TARGET_ARCH_IS_X86_64) && (\
+ (defined(_MSC_VER) && !defined(_WIN64)) || \
+ (defined(__clang__) && !defined(__x86_64__)) || \
+ (defined(__GNUG__) && !defined(__x86_64__)) \
+)
+ #error "Trying to compile Botan configured as x86_64 with non-x86_64 compiler."
+#endif
+
+#if defined(BOTAN_TARGET_ARCH_IS_X86_32) && (\
+ (defined(_MSC_VER) && defined(_WIN64)) || \
+ (defined(__clang__) && !defined(__i386__)) || \
+ (defined(__GNUG__) && !defined(__i386__)) \
+)
+ #error "Trying to compile Botan configured as x86_32 with non-x86_32 compiler."
+#endif
+
#endif