From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 37DBF3857C59; Fri, 28 Oct 2022 17:42:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 37DBF3857C59 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666978956; bh=u4F9rr4cwFydNzVysB3PictsT5XsoyGDlVs6KUCIkVw=; h=From:To:Subject:Date:From; b=K+sQT1SWBZM25j2K1Jq5Gi3bsre/YmR243MeNR9n9apFjnT0/7LmPdqhmAU+c0W2B 0nL1OZI37FXilxJe/87Kc4bGmAnac7RFjsL2MECUIutNHHhkgsBWlbh4u2UoFjih+/ hDLpzwnv60xTWIxDxTN4u0VXs+PDUcjdlswiO+h8= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] configure: remove overly restrictive check for clang X-Act-Checkin: glibc X-Git-Author: Fangrui Song X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 68f40364d8fcc00d221ca5d2ad7868a51074a3f9 X-Git-Newrev: a1c32083b21b83bbed047b441d93883c4a6128cb Message-Id: <20221028174236.37DBF3857C59@sourceware.org> Date: Fri, 28 Oct 2022 17:42:36 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a1c32083b21b83bbed047b441d93883c4a6128cb commit a1c32083b21b83bbed047b441d93883c4a6128cb 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 ef1557ef6d..f777e4fafd 100755 --- a/configure +++ b/configure @@ -5289,7 +5289,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 ; @@ -6427,7 +6427,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 043b6973e0..03e14b13a0 100644 --- a/configure.ac +++ b/configure.ac @@ -1060,7 +1060,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], @@ -1508,7 +1508,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