From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 3C2683858435; Mon, 29 Jan 2024 17:55:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C2683858435 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1706550938; bh=OeV+5xatM4gouiREg0LJnc88DQWyyjuyKs4xjD8Thl0=; h=From:To:Subject:Date:From; b=AG+g60x2suA2vmajkXWxd889DrNG7HDJFegjxDezKsc041BiobUkbNxCOc1nQO35g qbrwoQg4hivq7/wylAhq9BhyGZZQed1E4i5x2WzlMi577hplq5BqOsU4MXLvnKi1ox noaqcrb0KG8yjD3QQo4v9/wof8VsP8+ZJ5qF6Z6E= 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: Fix check for -fno-tree-loop-distribute-patterns X-Act-Checkin: glibc X-Git-Author: Fangrui Song X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 1deb4af36e9b57d17d013e5ea9a6b61dbe689d11 X-Git-Newrev: 8ef38d0076ad3cfb401feb9155ecc185944c6c16 Message-Id: <20240129175538.3C2683858435@sourceware.org> Date: Mon, 29 Jan 2024 17:55:38 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8ef38d0076ad3cfb401feb9155ecc185944c6c16 commit 8ef38d0076ad3cfb401feb9155ecc185944c6c16 Author: Fangrui Song Date: Sun Sep 26 00:15:23 2021 -0700 configure: Fix check for -fno-tree-loop-distribute-patterns clang does not support -fno-tree-loop-distribute-patterns and using on __attribute__ ((__optimize__ (...))) only triggers a warning with AC_TRY_COMMAND. Add -Werror so the tests fails if compiler does not support it. Diff: --- configure | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 688d9ae6e0..a3cc038ac1 100755 --- a/configure +++ b/configure @@ -7277,7 +7277,7 @@ __attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns"))) foo (void) {} EOF libc_cv_cc_loop_to_function=no -if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c' +if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Werror -c conftest.c' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? diff --git a/configure.ac b/configure.ac index c7f946c774..315fc5fb2b 100644 --- a/configure.ac +++ b/configure.ac @@ -1439,7 +1439,7 @@ __attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns"))) foo (void) {} EOF libc_cv_cc_loop_to_function=no -if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c]) +if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -Werror -c conftest.c]) then libc_cv_cc_loop_to_function=yes fi