From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by sourceware.org (Postfix) with ESMTPS id EDB46395C067 for ; Wed, 16 Nov 2022 19:00:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EDB46395C067 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=owlfolio.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=owlfolio.org Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 2B3E65C012F; Wed, 16 Nov 2022 14:00:44 -0500 (EST) Received: from imap45 ([10.202.2.95]) by compute1.internal (MEProxy); Wed, 16 Nov 2022 14:00:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=owlfolio.org; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1668625244; x=1668711644; bh=LmQTww7hGt fpn5QwrRbeyXBhg6ehTVjFh7hzdketGy8=; b=bqabdtjMxoIdOW0jvfzb7Lxvi1 Ea6n4pKYKIRO4EcDmk1GktCqb0PZkR1WA3Aq66tWepkh6sXTYPiAa8fih4Uhdgoa UB49tfgs9BCOhVnv7OAS+C3wqtl88wCaNFh5NQer1N87LL6fshRx3egwf3jSaL1d Ks60f9YAB4udiJuN6kAhy8wdKT3J8BKzYq9jx9R2fJ6j3RwKpifo+7c1IMY9sCPv FZ1xH6St1zk8nlJrLf6DPlri5tCz8HyhexLaDiYvDpZqwrP2ujZWJ9s6R3lpR8G4 lD8D7S95xCj0rHW6fhCsaA6dxfMBudYlJUsDWHTVGT0u0XfedAWriqse82Jw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1668625244; x=1668711644; bh=LmQTww7hGtfpn5QwrRbeyXBhg6eh TVjFh7hzdketGy8=; b=RbzrCqMNep07jmdXLVYQeMctnLnZOcart6EtrcnjT/yj 0EM5scozQi215ZEyouJRETrdrTT6Hu8BmUrYLZsiqRzrkLXPZ5UqBrqqSzQN8ZJy A4kedfv7uSmfzzTfvWmWDEzYitOqKnKqFkR+fOWL8PqXqmTHdSmZiFqMUczL3AHt zv0+u+Utn4W8qaKCc9sIk8L2t+FjoPd0yqKV/5aN0EQewtYhJVHZ129bzAuIF+qn hP7LQO5l1FwnKsL9uh8rfzhQUuNz+z2LfOKGRRNkVtfpicsAH+udNmDKtwSg+zal 3FMXSzMdPqIZz2chbchmx4ctINyn0IoIrm2+HGS9OQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrgeeigdduudelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedfkggr tghkucghvghinhgsvghrghdfuceoiigrtghksehofihlfhholhhiohdrohhrgheqnecugg ftrfgrthhtvghrnhepueehteeiffdtgfeiledugedvvdevtedtleekvdekteehvdfgkeej ffelveehffdunecuffhomhgrihhnpegvfihonhhtfhhigidrtghomhenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpeiirggtkhesohiflhhfohhl ihhordhorhhg X-ME-Proxy: Feedback-ID: i876146a2:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 7731D272007A; Wed, 16 Nov 2022 14:00:43 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1115-g8b801eadce-fm-20221102.001-g8b801ead Mime-Version: 1.0 Message-Id: In-Reply-To: <4cfa16b3-e9e0-0ec0-659c-e4aef6090995@cs.ucla.edu> References: <24ed5604-305a-4343-a1b6-a789e4723849@app.fastmail.com> <251923e7-57be-1611-be10-49c3067adf0d@cs.ucla.edu> <7ef0ce03-d908-649a-a6ee-89fea374d2b1@cs.ucla.edu> <9cb106e9-16ff-65ec-6a44-6567c77521dc@cs.ucla.edu> <06a5d2cd-44eb-7404-17f3-ff64dd505427@cs.ucla.edu> <4cfa16b3-e9e0-0ec0-659c-e4aef6090995@cs.ucla.edu> Date: Wed, 16 Nov 2022 13:59:48 -0500 From: "Zack Weinberg" To: "Paul Eggert" , "Michael Matz" Cc: "Jonathan Wakely" , "Aaron Ballman" , c-std-porting@lists.linux.dev, "Autoconf Development" , gcc@gcc.gnu.org, "via cfe-commits" , "Gnulib bugs" Subject: Re: How can Autoconf help with the transition to stricter compilation defaults? Content-Type: text/plain X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, Nov 16, 2022, at 1:17 PM, Paul Eggert wrote: ... > If Clang's threatened pickiness were of some real use elsewhere, it > might be justifiable for default Clang to break Autoconf. But so far we > haven't seen real-world uses that would justify this pickiness for > Autoconf's use of 'char memset_explicit(void);'. I don't have time this week to really get into this argument but I want to point out that I'm generally in agreement with Rich Felker's argument (in https://ewontfix.com/13/) that AC_CHECK_FUNC *should not* just probe for linkability of a symbol, because: - Not including the appropriate headers means that the probe bypasses compile-time symbol renaming and therefore probes for *the wrong symbol*, potentially causing both false detection and false non-detection (to tie it to another subthread, notice that one of the things -D_TIME_BITS=64 triggers (from glibc's headers) is enable dozens of __REDIRECT annotations in time.h) - Only probing the symbol, and not its type signature, means for instance that if the program expects GNU strerror_r but the system provides POSIX strerror_r, or vice versa, Autoconf's check will succeed but the program will fail to compile (in more subtle cases it might be miscompiled instead) (N.B. I *don't* agree with the assertion at the bottom of that page that "taking explicit action to prevent linking against [symbols intended to be exposed for binary compatibility only], involves hacks that are even worse and more fragile than what configure is doing" -- yes, it sucks that the toolchain support for ELF symbol versioning is still mostly absent, 20 years after the concept was introduced, but `asm(".symver __strtod_l_compat, strtod_l@SOME_CONCRETE_VERSION_TAG")` is straightforward (if cryptic) and robust on all the platforms where it works at all.) zw