From nobody Tue Apr 26 19:15:48 2022 X-Original-To: dev-commits-ports-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 E31F7199B3E0; Tue, 26 Apr 2022 19:15:49 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kns6Y0JXbz3qrJ; Tue, 26 Apr 2022 19:15:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651000549; 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=CCDJ/SbJxEcXGxNMwDHY+Cd0AfkcYIGoSZdZC1emp2A=; b=TPeqRksGGYniJ5S8c9amQdzuEna8tlgv98+YFK1HR6e98Yewp+RR8cKr9OGddJsyflk01m 5NwB4UaqKAapCNcrpl9O/2/RQ2TNHn3MAoyS4ikpDU5TlapluAs64s8IqzAESD00NHn+nY MEcWLkgqvH+xBnDVAG3EACjJZVCszP6LYs1pY2ZiryDc2OMe+sUls/PDJC5k13K/LFahza Xv+CV/rfn50E7avzmwH06038/y9qMnziTw/S+84Pc+fxmpGIYbEljO0HqKrSAnnAc+jr/H MlqEuQ2/TIJ8Z4wi0v6sSkfgciSIN4Kd0FDCoOVLZq2BAlEZr6emF83AczJN3g== 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 73C7D153F9; Tue, 26 Apr 2022 19:15:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23QJFm0Z084368; Tue, 26 Apr 2022 19:15:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23QJFmAY084367; Tue, 26 Apr 2022 19:15:48 GMT (envelope-from git) Date: Tue, 26 Apr 2022 19:15:48 GMT Message-Id: <202204261915.23QJFmAY084367@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dimitry Andric Subject: git: dd89b97ac0fc - main - devel/flang-clang: fix build with libc++ 14 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-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: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd89b97ac0fccbb4486ca60e2ed33f8d434719ed Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651000549; 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=CCDJ/SbJxEcXGxNMwDHY+Cd0AfkcYIGoSZdZC1emp2A=; b=quOSOZ6GCKx6oWkDovew1tc/F3od4nwiCpYCNtlZp8ZpRfkE+X/Cc7ROqx8s8Mw9fghyij rO+gkp1ei4nqbGbK25kAkMZX04oRGjIkt9jPZiHuKeCv2Rnm/kvRBHbYsVe8LLv/2lkkhx cAShvvB9HwSOLWERrk4OqH6BI75vRJCdzBVVyS4/szFjPLOIFjf63LPrx8FU4EBv23JmZZ bT0R3TbMW/P9W5GUZUhS6THfe6vjQpARYJqfn1L7CHbPNY1qAr9r8cDo4JeDZYqU2YGwIm VHuRjoCtFPmeOIGmltAQQ3lItvUCTR1/XsCtm4538rH1ErIVrmtnsgez0DcYnA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651000549; a=rsa-sha256; cv=none; b=tlpObcisbNvn18tTo8heheCtZVrsghlkroB0YxbWMMP9gsY+5lSl6day2URidRyCdMfYSf wjENRXcJO3iTo1+Lm5Agr0dElDsPuaImBGxjAXb2zj2VWRkWUr2Wlhlq/vCVZvfb/pIlVd sWqQUIcBu1j1Wh0hK5V6c5kxRcqBG1k6AAj2FhlF2C9ylq7rWNNwOjjZLX4cw8GKvlyeLC dx4lj46WSkUM2+iU7OmTrzhWpPYPmdQgeCvc7hEGJtCd5VtoHXP8u+ha+4cjdAVXnK7HW2 pfUJKOhaIdbtvnFc57byHMFGkB+SnCCl247VRtNk/t67xG0Ccc/fKBUXLBh8yQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim (src committer): URL: https://cgit.FreeBSD.org/ports/commit/?id=dd89b97ac0fccbb4486ca60e2ed33f8d434719ed commit dd89b97ac0fccbb4486ca60e2ed33f8d434719ed Author: Dimitry Andric AuthorDate: 2022-04-09 15:12:07 +0000 Commit: Dimitry Andric CommitDate: 2022-04-26 19:15:37 +0000 devel/flang-clang: fix build with libc++ 14 During an exp-run for llvm 14 (see bug 261742), it turned out that devel/flang-clang fails to build with libc++ 14: -- Performing Test LLVM_NO_OLD_LIBSTDCXX - Failed CMake Error at /usr/local/llvm70/lib/cmake/llvm/CheckCompilerVersion.cmake:38 (message): Host Clang must be able to find libstdc++4.8 or newer! Call Stack (most recent call first): /usr/local/llvm70/lib/cmake/llvm/HandleLLVMOptions.cmake:9 (include) CMakeLists.txt:95 (include) -- Configuring incomplete, errors occurred! See also "/wrkdirs/usr/ports/devel/flang-clang/work/.build/CMakeFiles/CMakeOutput.log". See also "/wrkdirs/usr/ports/devel/flang-clang/work/.build/CMakeFiles/CMakeError.log". *** Error code 1 This is because libc++ 14 no longer builds if the compiler doesn't support __builtin_is_constant_evaluated(). Similar to other ports, add a wrapper to make it work. PR: 263179 Approved by: maintainer timeout (2 weeks) MFH: 2022Q2 --- devel/flang-clang/Makefile | 3 +++ devel/flang-clang/files/builtin_is_constant_evaluated.h | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/devel/flang-clang/Makefile b/devel/flang-clang/Makefile index 79ebf1af1de9..01cd5778a93a 100644 --- a/devel/flang-clang/Makefile +++ b/devel/flang-clang/Makefile @@ -41,6 +41,9 @@ CMAKE_INSTALL_PREFIX= ${PREFIX}/flang CC= ${LOCALBASE}/llvm${LLVM_VER}/bin/clang CXX= ${LOCALBASE}/llvm${LLVM_VER}/bin/clang++ +# Support __builtin_is_constant_evaluated(), for libc++ >= 14 +CXXFLAGS+= -include ${FILESDIR}/builtin_is_constant_evaluated.h + post-patch: @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/lib/Driver/ToolChains/FreeBSD.cpp diff --git a/devel/flang-clang/files/builtin_is_constant_evaluated.h b/devel/flang-clang/files/builtin_is_constant_evaluated.h new file mode 100644 index 000000000000..724481d30d8f --- /dev/null +++ b/devel/flang-clang/files/builtin_is_constant_evaluated.h @@ -0,0 +1,4 @@ +#ifndef DEFINED___BUILTIN_IS_CONSTANT_EVALUATED +#define DEFINED___BUILTIN_IS_CONSTANT_EVALUATED +constexpr bool __builtin_is_constant_evaluated() { return false; } +#endif