From patchwork Sat Feb 17 09:53:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 85921 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5F2C9385DC3A for ; Sat, 17 Feb 2024 09:54:14 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 1D0613858D33 for ; Sat, 17 Feb 2024 09:53:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1D0613858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1D0613858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708163630; cv=none; b=ixEqFtk9gUHlSI0DXnHqaT5hOktQ0ntX+GRQWoc/Zlh6MawrhU1ijwwiqfh7WJm5h5Mue1QqlFAZgT6sREwXLd3FTqtChbf0KB/dEfv1WoAlzAVacgUJiCQ04ugl/oqbdZ1j6hLtH/esUOmkAmbeahANj9AE7QauWjbsR8bjhWg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708163630; c=relaxed/simple; bh=Dv/uJbUBpBP8Hzi2uDp6fER+yCcfRQfv594ukwma6i0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=XW0GeimdiWAzr48mcROHqc2KDu3TLaSfaxFminSMNmg5JUHQ7QV8v2ivwelW70l9D0Mn+C92IBAczPuj4tff0KLyukTjMJLYXQFIyR1Jt9Z8GOftIm7df2i5Ijc/Mo3FpnORVgF3SHx50P3VvFJWDGdmE9zxMBtnBu/dcCi5T8k= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708163624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=eT1ndzOxC7yAbTbSFcPSYIWIRib9TP8PfujFr8UifJY=; b=D1Ph3uJgdY05EM6EH0puFiBJvWkBogfhR5MrxVscw7I5FoCi5I6EnnbmECrQo2UQPhn1+M 01mpczpP+rj7tKJnoTDzEaZFR/kA0USOqJxtccDAO/HEcNET6h0f/Bwf+6Ty/rppMtAMbe LFRWyhbMnWI/ZgHGUD/UsFpkufKKXiI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-434-ld9myjy7PbKUZ3jG8XYsSg-1; Sat, 17 Feb 2024 04:53:42 -0500 X-MC-Unique: ld9myjy7PbKUZ3jG8XYsSg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7353E83B7E5 for ; Sat, 17 Feb 2024 09:53:42 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0130F4011A6F for ; Sat, 17 Feb 2024 09:53:41 +0000 (UTC) From: Florian Weimer To: gcc-patches@gcc.gnu.org Subject: [PATCH wwwdocs] gcc-14: Some very common historic Autoconf probes that no longer work Date: Sat, 17 Feb 2024 10:53:40 +0100 Message-ID: <87r0hb4dsr.fsf@oldenburg.str.redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org --- htdocs/gcc-14/porting_to.html | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) base-commit: 1fcd61437d6a3d7bf24b993b09d525486dc9a2e5 diff --git a/htdocs/gcc-14/porting_to.html b/htdocs/gcc-14/porting_to.html index 123b5e9f..ab65c5e7 100644 --- a/htdocs/gcc-14/porting_to.html +++ b/htdocs/gcc-14/porting_to.html @@ -437,6 +437,49 @@ issues addressed in more recent versions.) Versions before 2.69 may have generic probes (for example for standard C support) that rely on C features that were removed in C99 and thus fail with GCC 14. +

+Older Autoconf versions (for example, Autoconf 2.13) generate core +probes that are incompatible with C99. These include the basic +compiler functionality check: + +

+#include "confdefs.h"
+main(){return(0);}
+
+ +And a check for standard C compatibility: + +
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+ +(Several variants with different line breaks and whitespace were in +use.) If it is not possible to port the configure script to current +Autoconf, these issues can be patched directly: + +
+#include "confdefs.h"
+int main(){return(0);}
+
+ +And for the second probe: + +
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2;
+return 0; }
+
+ +There is a long tail of less frequent issues, involving keyword +checking (for inline), and checks for dlopen +and mmap. A setvbuf probe was previously +expected to fail at run time because it triggered undefined behavior, +now it fails because of a compilation error. +

Turning errors back into warnings