From nobody Sun May 25 09:21:06 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4b4tg71ySGz5xHn6; Sun, 25 May 2025 09:21:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4b4tg71Qq7z3thp; Sun, 25 May 2025 09:21:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748164867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NY3DQU0SA8Ymk71yDFPpjHYV/s9bK/KcajTenjLMp9g=; b=UeRkIhjqlWa40wXbi3d+m7JCUsOVBV4FZ9Nm0KP4AJBm0Tj0Luj2PHOWo2z8wr3vg4kdOf 3T4cqrb5YDIpjrXIiM36F93FFt/Lti1efoq3rgU9l4fsuEOJwvz8GLSYGz0hplSvMaQpNi vg4bPEzMXh2x2ab4x2vmnw9zmlV3fOfDmbPuyWZG9p5UoWUcZwggYDQy9uDrJxWJVOJHeN RUXRgVQoPh+0hc4lo5ATDUAtXFuyXrm4fAENbEFbHVVdGO0JJGTdAIRJffQu8HjTes4KKs 70MDgzrDzv9LfN2XvYT2QYhccJuTU5wUU0xbtoLfjjjvdEwzATjb8sXErkLUnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748164867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NY3DQU0SA8Ymk71yDFPpjHYV/s9bK/KcajTenjLMp9g=; b=T5a4s8LBGavYP9OfdG/mvdkLfpCni3BWGqQyQHkzSHBp1tcuuPMTG/Ybxta6hb//AbFW4G KKxC+In31ARFWW26Q8SyS2eHL7Sm+x+94GfSVbSNTygA1MoBb9Dn7+e8527F6ZapIbfTR3 jvjO98Tl40qdNVXZXWA8gYeN7LXjrgkaRhfC/APXVXnJSmYtrhQGPVolGxW7ILulLBbVt3 opUq4xPOQym74fYgEDEzpVvaOQOi5p2Rgbb9AKaskFUmmcIUE7niTqag8tvcxIVR0B/ZBx W1sDdFoFM6U6vXmL7JtWbi9uKLlFLhSAOTKIpeJG1d+WhH+Uwv/kvFi5qrKuEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1748164867; a=rsa-sha256; cv=none; b=DVL7MGMhGHXC9/TG3Dfoyf/YqFnZzFJdGjM2VpKPpdop6uJ1lpwXsH4lt2sLGN7uAxnj2f qDYznhZMcoBcmJbQUnf/Q0ue1eQdIc7+SJHDT+WnFFNXgrnfb9rIfHt8ttgvcrkAnT4wFb MpG6GAQ9K3rVlsM4e7h+leP0SCEJSBG2o6ewhS9xQzcdj139kgUPQZti+iUtXsuqeFNSLO IR4uvmC6eZ6ZzRhUCXklesu01shS7BuPDTg8TM1c1C3cwPlTzbsUpypDPXTRSk5Wp2z20l NY7K8mRuXQvnpJKBjpDf/SS+Ay4VJKUs4GDCpcB5xgcTyuHE6EsyfDVoUO2xEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4b4tg70Z1BznJ; Sun, 25 May 2025 09:21:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54P9L6YD021586; Sun, 25 May 2025 09:21:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54P9L6r5021583; Sun, 25 May 2025 09:21:06 GMT (envelope-from git) Date: Sun, 25 May 2025 09:21:06 GMT Message-Id: <202505250921.54P9L6r5021583@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: cab029073dc6 - stable/14 - libc++: fix compiling with -fmodules List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cab029073dc6cb5814df44556e585b8fdb1c9846 Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=cab029073dc6cb5814df44556e585b8fdb1c9846 commit cab029073dc6cb5814df44556e585b8fdb1c9846 Author: Jordan Gordeev AuthorDate: 2025-05-18 19:55:05 +0000 Commit: Dimitry Andric CommitDate: 2025-05-25 09:20:32 +0000 libc++: fix compiling with -fmodules In /usr/include/c++/v1/__locale_dir/locale_base_api.h, xlocale.h is included without first including stdio.h and stdlib.h, which causes functions like strtoll_l() or sscanf_l() to not be declared. When compiling with -fmodules, locale_base_api.h is processed separately due to a declaration in /usr/include/c++/v1/module.modulemap, and this will cause errors due to the above undeclared symbols. Meanwhile, upstream has substantially reorganized this part of libc++'s headers, so apply a minimalistic workaround: specifically when compiling with -fmodules, add includes of stdio.h and stdlib.h. PR: 286342 MFC after: 1 week (cherry picked from commit c809b0184d0a6543bc5327d4252fa56a07ce4689) --- .../llvm-project/libcxx/include/__locale_dir/locale_base_api.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/libcxx/include/__locale_dir/locale_base_api.h b/contrib/llvm-project/libcxx/include/__locale_dir/locale_base_api.h index 8c000c558c52..e43e87375069 100644 --- a/contrib/llvm-project/libcxx/include/__locale_dir/locale_base_api.h +++ b/contrib/llvm-project/libcxx/include/__locale_dir/locale_base_api.h @@ -25,7 +25,13 @@ # include <__locale_dir/locale_base_api/fuchsia.h> #elif defined(__wasi__) || defined(_LIBCPP_HAS_MUSL_LIBC) # include <__locale_dir/locale_base_api/musl.h> -#elif defined(__APPLE__) || defined(__FreeBSD__) +#elif defined(__APPLE__) +# include +#elif defined(__FreeBSD__) +# if __has_feature(modules) +# include +# include +# endif # include #endif