From patchwork Sun Jul 26 04:27:37 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Turner X-Patchwork-Id: 139947 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 618BA4BA2E19 for ; Sun, 26 Jul 2026 04:28:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 618BA4BA2E19 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=RVfOsEwT X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) by sourceware.org (Postfix) with ESMTPS id 9D57D4BA2E13 for ; Sun, 26 Jul 2026 04:27:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9D57D4BA2E13 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9D57D4BA2E13 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::f2f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1785040065; cv=none; b=YD/W27YA09PGfqjmqF7hSoQzZrfe/yBClJ77T8gwiDk7MfPXc9JBZNXGf5rO/G7cqNX1qPtJPof5Bj2qluVDnbM5+pI4NZEpoPXFntm2luHwNinmvqrAvJBtL4zBC4hrNwld5AROzdMac+o45ja0caIR6IyKCXIA+o6+Brml0WA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1785040065; c=relaxed/simple; bh=2fGiNBlMSNY5aDH6FIUyM51brt1Sz4WrKhTKFJu98LI=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=r0oEUykP5+8NTz8F9Sd8XHZnGDGtuwbD2yh51N5IqcCPbeSlFsCFg1LzZnDGs87D8S25jSwB5VCe1L4lBIVPAd7MZbY437+Ox2lYq0QvD4WrQh/AnN6oC+szQP1DkBHbzqLIfuAjIOA097GqSVvQtUu3NTP6ifA4m4ruutVkEcg= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=RVfOsEwT DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9D57D4BA2E13 Received: by mail-qv1-xf2f.google.com with SMTP id 6a1803df08f44-9030f8ea3b3so17240546d6.1 for ; Sat, 25 Jul 2026 21:27:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785040065; x=1785644865; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=koSx5QbdDt5+wHbTRAyt3tOBRC0uxdBajzv5/ITBRZ0=; b=RVfOsEwTYkpusT4qbriilkE8mvhn60WWsYNGMCBu/5G+x8TTzqRLPr4oJcbXwvhvVy mLBPbVowpSXOO7n2qMQdpX7GUpbyGMxYiD7wDOV0wCMffzSjaCnwYSUpFYe8QYnHPpJm FK5Xl4WLJKLvb1k4DT3h0HVIjCbyXmXYfrExYeEH9FPrW0MZJsM3Bh7S8+AEz/7qLP/v F9oD7v6apv5nVEr0bxfRneGY4THBLAPV0QYyw5iZeq8M9k5GHGm7JI5eU0pBZ0GY1ZCg AhRTn+KGdKUKRR5CN3u73V5x8MFwwdB/UQZlUWgItZ/QwZdeg3fpfIiKVLR7uUSdPPi5 GuQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785040065; x=1785644865; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=koSx5QbdDt5+wHbTRAyt3tOBRC0uxdBajzv5/ITBRZ0=; b=Z4b/1ccYQ0Uxx5HpzZiw/b/d9F2VAkTUoia9az3UAR6fV5qBRac2xgvkBYmcjHE9GN j2EJDFuX1RRg3qpBX0/UJQvOaQZFHugn/ETGZvdpiQRAXUMqEkGbkVNyQBUFueBd2od1 iEPQL3H8A6AbpHrYHw7QCSH2eGelVOAP8fLhMPZXJn1RQR3TtLllMmCyuRlbfQ0APuGE 5QyjFJYnkq1LPjYvbzfJzItiikYieAFeY9Jj7bUwJBEDsA6yPFLAOgtri5bgtSdiZlNN A4M7vVc4QxY8YM9B33JTERdBUgs+m199br9wBSW77mOSw2Bxj3tJ96m1cA2aQ/n1hOTS Q3zw== X-Gm-Message-State: AOJu0YxXDpnmza5EZu1vlS/3xUv/ejcVgGd1gWxvKIsdY4vTsRQB6nET +FdN+vMClP1uU0fU2u7EHk9IIfpMJROAR7v8JfWC6PU48PJ2xSjERbyi3uSSgQ== X-Gm-Gg: AR+sD11nPso7wwkWlBv2/NJOjh+zGN5Zdt5I2gT1eMZJzZs7/36FwjvwiS8EI4W1YqR O35tRuG6/F24+MxP0nvIh7h5jWhci/CSSd7kbcqxmcO8RLw6oO0Pj5GwFJkq1TcsiFqK2q6UNgD gGzOBO7vEOseGZuVBQlJaeNi3OW9KhW4+S/Uh1m9daE6l+pftq2PTinB+z73G4hDdLcfgtPU4Yx WWOkoZLGUPI/M772pDg6Yjt01oyvqnD1YIWG8EFvTX3vcflXxnFOocNnQtmu9z5vglNfQSyaiqb nNOr4EME0sUlEObKCNm+yKg3jvtk0QCJ2w/kKojJZQ4g+kB9irCAAz0UcwjXP04nZzM74CYtwEu suptdTXwsYIxcDRhwv0xWv92ZNAv6aIuYGeMQR33aPoVGq3Q0G1UlQYRyJYY/N5WvNMkAIjJ9aM XZC/uDC8LEMfh9xRtCW7V7EePoH7EOF7WrgLrHm8Tq94f/QDDhGStoDg== X-Received: by 2002:a05:6214:451a:b0:8f1:587a:10d2 with SMTP id 6a1803df08f44-907ec7fd034mr50911746d6.36.1785040065075; Sat, 25 Jul 2026 21:27:45 -0700 (PDT) Received: from localhost (host05.distrikthotelips2.d.subnet.rcn.com. [207.96.107.85]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-907e854feadsm33914176d6.15.2026.07.25.21.27.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Jul 2026 21:27:44 -0700 (PDT) From: Matt Turner To: libc-alpha@sourceware.org Cc: Matt Turner Subject: [PATCH] ldbl-opt: Fix -mlong-double-128 configure test for Clang Date: Sun, 26 Jul 2026 00:27:37 -0400 Message-ID: <20260726042738.2629285-1-mattst88@gmail.com> X-Mailer: git-send-email 2.54.0 MIME-Version: 1.0 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org The check for -mlong-double-128 support wrapped its test code in AC_LANG_PROGRAM, which places the body inside main(). The body defines a function, so it became a nested function definition -- a GCC extension that Clang does not implement, making the test fail (and thus the whole build error out) with Clang even though it supports -mlong-double-128. Use AC_LANG_SOURCE so the function is defined at file scope, matching the pattern already used by the powerpc64le compiler checks, and regenerate configure. Reviewed-by: Sam James --- sysdeps/ieee754/ldbl-opt/configure | 7 ------- sysdeps/ieee754/ldbl-opt/configure.ac | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) mode change 100644 => 100755 sysdeps/ieee754/ldbl-opt/configure diff --git ./sysdeps/ieee754/ldbl-opt/configure ./sysdeps/ieee754/ldbl-opt/configure old mode 100644 new mode 100755 index bc6552da0b..7769cc9781 --- ./sysdeps/ieee754/ldbl-opt/configure +++ ./sysdeps/ieee754/ldbl-opt/configure @@ -13,17 +13,10 @@ CFLAGS="$CFLAGS -mlong-double-128" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int -main (void) -{ - #ifndef __LONG_DOUBLE_128__ # error "compiler did not predefine __LONG_DOUBLE_128__ as expected" #endif long double foobar (long double x) { return x; } - ; - return 0; -} _ACEOF if ac_fn_c_try_compile "$LINENO" then : diff --git ./sysdeps/ieee754/ldbl-opt/configure.ac ./sysdeps/ieee754/ldbl-opt/configure.ac index 70e3b32dc6..1c500ad581 100644 --- ./sysdeps/ieee754/ldbl-opt/configure.ac +++ ./sysdeps/ieee754/ldbl-opt/configure.ac @@ -6,7 +6,7 @@ AC_CACHE_CHECK(whether $CC $CFLAGS supports -mlong-double-128, libc_cv_mlong_double_128, [dnl save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mlong-double-128" -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #ifndef __LONG_DOUBLE_128__ # error "compiler did not predefine __LONG_DOUBLE_128__ as expected" #endif