diff options
author | Jack Lloyd <[email protected]> | 2016-08-17 10:25:20 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-08-17 10:25:20 -0400 |
commit | 852eaff2b6ddb57f129ad3479ea03f959a6f1bd4 (patch) | |
tree | 24d0fb2d6690aea0a414849da374bfdeebe71344 | |
parent | 9a63fc3976526213a4ccbd81a564f321f4dc5136 (diff) | |
parent | 6fbeda78c3bd252dde96eb51d4e023d09d0dd81a (diff) |
Merge GH #585 Prevent x86-32 vs x86-64 build time confusion
-rw-r--r-- | src/build-data/buildh.in | 16 |
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 |