From a726f2831c29fab4f3b453571f47cbc33c5622c4 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sun, 17 Sep 2017 01:41:20 +0300 Subject: [PATCH] Enabled "GLIBC_COMPATIBILITY" option by default [#CLICKHOUSE-3275]. --- CMakeLists.txt | 9 +++++++-- libs/libglibc-compatibility/glibc-compatibility.c | 2 -- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e642734a33c..a73871109ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,8 +71,13 @@ if (USE_STATIC_LIBRARIES) list(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES) endif () -option (USE_INTERNAL_MEMCPY "Use internal implementation of 'memcpy' function instead of provided by libc. Only for x86_64." ON) -option (GLIBC_COMPATIBILITY "Set to TRUE to enable compatibility with older glibc libraries. Implies USE_INTERNAL_MEMCPY." OFF) +if (CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*") + option (USE_INTERNAL_MEMCPY "Use internal implementation of 'memcpy' function instead of provided by libc. Only for x86_64." ON) + + if (CMAKE_SYSTEM MATCHES "Linux") + option (GLIBC_COMPATIBILITY "Set to TRUE to enable compatibility with older glibc libraries. Only for x86_64, Linux. Implies USE_INTERNAL_MEMCPY." ON) + endif() +endif () if (GLIBC_COMPATIBILITY) set (USE_INTERNAL_MEMCPY ON) diff --git a/libs/libglibc-compatibility/glibc-compatibility.c b/libs/libglibc-compatibility/glibc-compatibility.c index 9a8b8d67f36..5f9d8106794 100644 --- a/libs/libglibc-compatibility/glibc-compatibility.c +++ b/libs/libglibc-compatibility/glibc-compatibility.c @@ -1,8 +1,6 @@ /** Allows to build programs with libc 2.18 and run on systems with at least libc 2.4, * such as Ubuntu Lucid or CentOS 6. * - * Highly experimental, not recommended, disabled by default. - * * Also look at http://www.lightofdawn.org/wiki/wiki.cgi/NewAppsOnOldGlibc */