From: Jeffrey Walton Date: Fri, 28 Oct 2016 04:33:43 +0000 (-0400) Subject: [PATCH] Fix compile under Debian Hurd (i386) Debian Hurd defines __MACH__, and it... X-Git-Tag: archive/raspbian/8.7.0+git220824-1+rpi1~1^2^2^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=594c2400106556caecb1a2e504e54c79dfada513;p=libcrypto%2B%2B.git [PATCH] Fix compile under Debian Hurd (i386) Debian Hurd defines __MACH__, and it was picking up "#define CRYPTOPP_SECTION_INIT __attribute__((section (__DATA,__data)))" intended for Apple linkers Gbp-Pq: Name Hurd-compile-fix.patch --- diff --git a/config.h b/config.h index 3ad015c..2b92c60 100644 --- a/config.h +++ b/config.h @@ -337,9 +337,9 @@ NAMESPACE_END #endif // The section attribute attempts to initialize CPU flags to avoid Valgrind findings above -O1 -#if ((__MACH__ >= 1) && ((CRYPTOPP_LLVM_CLANG_VERSION >= 30600) || (CRYPTOPP_APPLE_CLANG_VERSION >= 70100) || (CRYPTOPP_GCC_VERSION >= 40300))) +#if ((defined(__MACH__) && defined(__APPLE__)) && ((CRYPTOPP_LLVM_CLANG_VERSION >= 30600) || (CRYPTOPP_APPLE_CLANG_VERSION >= 70100) || (CRYPTOPP_GCC_VERSION >= 40300))) #define CRYPTOPP_SECTION_INIT __attribute__((section ("__DATA,__data"))) -#elif ((__ELF__ >= 1) && (CRYPTOPP_GCC_VERSION >= 40300)) +#elif (defined(__ELF__) && (CRYPTOPP_GCC_VERSION >= 40300)) #define CRYPTOPP_SECTION_INIT __attribute__((section ("nocommon"))) #else #define CRYPTOPP_SECTION_INIT