From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id CA94B3857C6F for ; Sat, 22 May 2021 01:47:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CA94B3857C6F Received: from vapier (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DC905340C9A; Sat, 22 May 2021 01:47:36 +0000 (UTC) Date: Fri, 21 May 2021 21:47:36 -0400 From: Mike Frysinger To: "naohirot@fujitsu.com" Cc: "libc-alpha@sourceware.org" Subject: Re: [PATCH v4] configure: Replaced obsolete AC_TRY_COMPILE Message-ID: Mail-Followup-To: "naohirot@fujitsu.com" , "libc-alpha@sourceware.org" References: <20210510140755.844333-1-naohirot@fujitsu.com> <20210511013454.895309-1-naohirot@fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 May 2021 01:47:42 -0000 On 22 May 2021 01:32, naohirot@fujitsu.com wrote: > > On 11 May 2021 01:34, Naohiro Tamura wrote: > > > --- a/configure.ac > > > +++ b/configure.ac > > > > > > -[AC_TRY_COMPILE([], [ > > > +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ > > > #ifdef _FORTIFY_SOURCE > > > # error bogon > > > -#endif], > > > +#endif]])], > > > > this can be AC_PREPROC_IFELSE > > In case of _FORTIFY_SOURCE, it requires compiler optimize option more than -O1. > > $ man FEATURE_TEST_MACROS > > If _FORTIFY_SOURCE is set to 1, with compiler optimization level 1 (gcc -O1) and above, checks that shouldn't change the behavior of con‐ > forming programs are performed. With _FORTIFY_SOURCE set to 2, some more checking is added, but some conforming programs might fail. you'll want to leave a dnl in there explaining why so the next person doesn't try to "fix" it. -mike