From nobody Sun May 25 09:21:21 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 4b4tgQ1Hl0z5xHXT; Sun, 25 May 2025 09:21:22 +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 4b4tgQ0YcWz3vR8; Sun, 25 May 2025 09:21:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748164882; 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=+TqWEVuny5c9yCHXlJWDS1HDpYjHMzx3E0iInifwA70=; b=WpjhsADrinFNWulZ4Oo5W0BfIxUMAWdtSlAZFTvvBsfNfgDk7XSbQa5lNqcd+zbE0GUopF ntFuR0g0ZafK+9EhoA4+kp9nIVGE2/CoJun+QKQT2f68U/jBDKBqJW8PLcm5gr0a8uz2Q+ F+QcJJV57kEu0gvgPd4rJCw6dLKT4S0SK6aBKkxzCrNKCIKYIYUw8x+8MGd3qksgP2B2Lq 8IS9YePmJ2uy/zPkpZNe6lJSDTTekFVqICluzLYcBRk6jP0XsExb2ndmqEwB1f3BZIoVu/ TZpaZQcPGOO7ownWza3LvB/5VpDP+f34YAJ7zZeIGoz6CCqodtSc808g8bA8hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748164882; 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=+TqWEVuny5c9yCHXlJWDS1HDpYjHMzx3E0iInifwA70=; b=P1Fyssl6dfCC5mlJOEhOKdioI9HnVSoUTaNnyIvoWrcnt+q8jyOR35DhvOzi/eSjobbaV/ UX9iQqx/HF9HhP0eCe7lihFHVKkAgWs2iEyhBzJI7/jEMZ5kHsozLf/vuEVxHVEcEXsugu 4YuKK5nef2Glc+AOMa6hwaoUe6zWW3cv/1DeRpG95YjaatqwJNV0uGZ5/1/SmFgiE9Q4RW Lwfkpo1osZ3ppSMWN5i3vyqnu9UtrR4zbjlGOBgyWJPCXGLEXQLDu4IbkqES1hTLXshKAw 7qdD9WaHJIe7r/SYN2tzEa+w1dkA6NUJVMHhRVf5w7ETcOXKu8zfyHhjL26CpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1748164882; a=rsa-sha256; cv=none; b=rMCGIpzf4y866oknqNQUttZoh8BtG7GEjlSoTANvWHw5adYDGlsVxEoqvcU66OXKEzOVxz R1odW999SlwCuH4H0LKmMLVmCNO0caxKxTdpVazU1c9d75rach+EJQf8y71Zw3DbJLLvFx L/diNX3CkymwOrLsl39LF4h+CbyX8ArEvGZejwBiENqAYhVuYu05pa5ZJYJ325atjVq7Vv m9cueEl/81LvpaXQH3JJRu+awpbD5ZKRUzAPylG0WNwHn2lOTrpqE3779KGoUnMp6XfQkT mOu8OIByLRuKgqiILWSW1N3lnw4W92uGYcGkUXkmlnH9hITLIcRBrSTshH4ezw== 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 4b4tgQ053Nz112; Sun, 25 May 2025 09:21:22 +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 54P9LLWb021766; Sun, 25 May 2025 09:21:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54P9LLWx021763; Sun, 25 May 2025 09:21:21 GMT (envelope-from git) Date: Sun, 25 May 2025 09:21:21 GMT Message-Id: <202505250921.54P9LLWx021763@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: 1c12934eba86 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 1c12934eba86c7294becc23c7518e0fb9b996fa8 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=1c12934eba86c7294becc23c7518e0fb9b996fa8 commit 1c12934eba86c7294becc23c7518e0fb9b996fa8 Author: Jordan Gordeev AuthorDate: 2025-05-18 19:55:05 +0000 Commit: Dimitry Andric CommitDate: 2025-05-25 09:20:41 +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