From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7814) id 04C7D3858039; Thu, 7 Oct 2021 20:13:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 04C7D3858039 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Fangrui Song To: glibc-cvs@sourceware.org Subject: [glibc/maskray/clang] configure: remove overly restrictive check for clang X-Act-Checkin: glibc X-Git-Author: Fangrui Song X-Git-Refname: refs/heads/maskray/clang X-Git-Oldrev: 490e6c62aa31a8aa5c4a059f6e646ede121edf0a X-Git-Newrev: 9c4d1c95332cf49230edff2ec500b54edb455b54 Message-Id: <20211007201334.04C7D3858039@sourceware.org> Date: Thu, 7 Oct 2021 20:13:34 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Oct 2021 20:13:34 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9c4d1c95332cf49230edff2ec500b54edb455b54 commit 9c4d1c95332cf49230edff2ec500b54edb455b54 Author: Fangrui Song Date: Sat Sep 25 22:03:08 2021 -0700 configure: remove overly restrictive check for clang Diff: --- configure | 4 ++-- configure.ac | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 39d75eb4ed..2b9602a6e8 100755 --- a/configure +++ b/configure @@ -5262,7 +5262,7 @@ int main () { -#if !defined __GNUC__ || __GNUC__ < 6 || (__GNUC__ == 6 && __GNUC_MINOR__ < 2) +#if (__GNUC__ < 6 || (__GNUC__ == 6 && __GNUC_MINOR__ < 2)) && !defined __clang__ #error insufficient compiler #endif ; @@ -6408,7 +6408,7 @@ else extern char *strstr (const char *, const char *) __asm ("my_strstr"); char *foo (const char *a, const char *b) { - return __builtin_strstr (a, b); + return strstr (a, b); } EOF if { ac_try='${CC-cc} -O3 -S conftest.c -o - | grep -F "my_strstr" > /dev/null' diff --git a/configure.ac b/configure.ac index 00f49f09f7..ade88d089b 100644 --- a/configure.ac +++ b/configure.ac @@ -1047,7 +1047,7 @@ AC_CHECK_PROG_VER(BISON, bison, --version, AC_CACHE_CHECK([if $CC is sufficient to build libc], libc_cv_compiler_ok, [ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[]], [[ -#if !defined __GNUC__ || __GNUC__ < 6 || (__GNUC__ == 6 && __GNUC_MINOR__ < 2) +#if (__GNUC__ < 6 || (__GNUC__ == 6 && __GNUC_MINOR__ < 2)) && !defined __clang__ #error insufficient compiler #endif]])], [libc_cv_compiler_ok=yes], @@ -1549,7 +1549,7 @@ cat > conftest.c <<\EOF extern char *strstr (const char *, const char *) __asm ("my_strstr"); char *foo (const char *a, const char *b) { - return __builtin_strstr (a, b); + return strstr (a, b); } EOF dnl