From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 145A73858D3C; Fri, 9 Feb 2024 17:33:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 145A73858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1707499982; bh=VRVKQIQI2m1GmOQLsBJA5Ru7OmRBXHhl9j8I6Q4c4lM=; h=From:To:Subject:Date:From; b=r4bvPZeY91jJ1S195Eb4lPCbUgoU8vAdxPsvSEQYPS9X7oJNgghLWY1sHCnHJJf6+ HxO0ETkTLwrqya3Kh0kddAbOfBI4WyybRTmUFYFz/IAbV5dhjjip17RrTuPfjm3tqS m7TJp84abY8UsbgzUvmu3Q+7RDMYx1qqD+xk+8pk= 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: 57a0850db5c0ad334fda874c7c483585e2c8577d X-Git-Newrev: 0794a974e9463e54559f6a068f2c4950c238e07b Message-Id: <20240209173302.145A73858D3C@sourceware.org> Date: Fri, 9 Feb 2024 17:33:01 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0794a974e9463e54559f6a068f2c4950c238e07b commit 0794a974e9463e54559f6a068f2c4950c238e07b 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 624662bd62..3256638e43 100755 --- a/configure +++ b/configure @@ -5599,7 +5599,7 @@ int main (void) { -#if !defined __GNUC__ || __GNUC__ < 6 || (__GNUC__ == 6 && __GNUC_MINOR__ < 2) +#if (__GNUC__ < 6 || (__GNUC__ == 6 && __GNUC_MINOR__ < 2)) && !defined __clang__ #error insufficient compiler #endif ; @@ -7242,7 +7242,7 @@ else $as_nop 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 b5cc1aa9eb..704e4c259f 100644 --- a/configure.ac +++ b/configure.ac @@ -534,7 +534,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], @@ -1420,7 +1420,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