From nobody Sun Feb 13 18:57:49 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 5F59F194FD8E; Sun, 13 Feb 2022 18:57: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 4Jxc7128gxz4lB2; Sun, 13 Feb 2022 18:57:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644778669; 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=14b8Y8SO3k4H+Cq3AB08CQ6WzLrTWQccpITBZIctEY8=; b=W90j922RC1rrcIv0u6SlPgVMvTc9UdlMWj4ILkRn1+hGHNEBhXXdBUQ1NBnTX4zszGoxNq +pwp2SbKGPWjC6T5owRL43e2Svt/RSiygsctHxhRTg/RPH6TkLZMiZMajwdMNVk5PhFv3Z 4Vm2JjhTeS6xrTajqyv3XWx4V820blTZCZBsNrYm2+mbULtXM8wlsXc+GvcLwcGsolSx1+ pvFUHwGK4n17+w4N8oujMOUGqhbqD5HPLwM6jgDNWn4xK3xxBotnQuodCz4yzzqpULbf1s JgUTmDPwhqDc9p51CNXPgIPVAXkC9eeEJn15sC6DskGIgCdyqydYOO1BE2sJ3A== 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 2B24A20161; Sun, 13 Feb 2022 18:57:49 +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 21DIvnff042259; Sun, 13 Feb 2022 18:57:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21DIvn4B042258; Sun, 13 Feb 2022 18:57:49 GMT (envelope-from git) Date: Sun, 13 Feb 2022 18:57:49 GMT Message-Id: <202202131857.21DIvn4B042258@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: 782745a8ef20 - main - devel/creduce: add crutch for using libc++ 14 with clang++ 8 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: 782745a8ef207fdaaaa6020ed51aea65f0b17437 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644778669; 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=14b8Y8SO3k4H+Cq3AB08CQ6WzLrTWQccpITBZIctEY8=; b=eSIJ1TiMZn8/rwjP69bdx+1O8i1ux2L/ucbuG/eQZwRqjX99vhVSbVUE4lQdcEyX+JHLIR jiV+RNPJsFFbAgUMsVfkGdP+xFyrha1em+mURkSqWRn52xpW5n8ATGQSFbiLdErO7xGz6t xwib4wpjOzEHWpZpxdo49y9SIW1ES2teKfxJhOqqRLpdLOa8yHuCMtIshfD9PxvyngUV3r LZhnCmRfGNVZL8eWy4ZuiE6QghtQ7AAqb/3xgaAfvdnrniO/DULDYFuqTMwczT4xOi2pAC i0jKwAAesyPyROikhX20aC6sXl4K5PBFe64avU8RWColKhJVtRozjMg4Ufa2mg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644778669; a=rsa-sha256; cv=none; b=ilDhLSdcusowIRfYKI6tfSX9SyLdvfcIiDtcsDO0IxfBuV1y8XDLtaG6pz+/cj3xH4qeQQ mHSrJlX350beyULYHHem2VLgH9WavW9SNtVEtyhz6Z2yHt/yzvE/tqUyeE6c25+xf05yWs p9tJsJ7g6NjZgiEn9vri3rO+csNuVBJ8j+GbUgynfMM6ENoJsfmfC7XczbBOAwqkk3sWtf ZRF8Xz38oxp+wNiORdoB17l0bSMm3/xZpMDuLaBrxhxK+zvl29PAw3OSMqI4APhVc8gt4m nUsq5LEy0WUj/bOsV8uIls8ECLkFzfu2XOmO2jIk2H1H5HupMelER5DkEJ7tuA== 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=782745a8ef207fdaaaa6020ed51aea65f0b17437 commit 782745a8ef207fdaaaa6020ed51aea65f0b17437 Author: Dimitry Andric AuthorDate: 2022-02-13 14:05:12 +0000 Commit: Dimitry Andric CommitDate: 2022-02-13 18:50:06 +0000 devel/creduce: add crutch for using libc++ 14 with clang++ 8 C-Reduce still depends on devel/llvm80, and this is no longer compatible with libc++ 14 or higher, since libc++ now requires support for the __builtin_is_constant_evaluated() builtin function (see https://github.com/llvm/llvm-project/commit/1123100a16a321d70508e2508ebc5d57ce7163dc ). As a crutch, add a small header which defines a constexpr __builtin_is_constant_evaluated() function, and include that at the top of every compiled file, using -include, whenever the base system clang version is 14 or higher. Approved by: swills (maintainer) MFH: 2022Q1 --- devel/creduce/Makefile | 10 +++++++++- devel/creduce/files/builtin_is_constant_evaluated.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/devel/creduce/Makefile b/devel/creduce/Makefile index d0cf2295c97f..ec9dfa3a841c 100644 --- a/devel/creduce/Makefile +++ b/devel/creduce/Makefile @@ -26,7 +26,7 @@ CONFIGURE_ENV= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${LLVM_VER} \ CXX=${LOCALBASE}/bin/clang++${LLVM_VER} \ CPP=${LOCALBASE}/bin/clang-cpp${LLVM_VER} -USES= autoreconf gmake libtool perl5 +USES= autoreconf compiler gmake libtool perl5 CFLAGS_powerpc64= -mabi=elfv2 @@ -36,4 +36,12 @@ CFLAGS_powerpc64= -mabi=elfv2 LLD_UNSAFE= yes .endif +.include + +# Detect base system libc++ >= 14 by checking for COMPILER_VERSION. +# Not really the ideal way, but it should work. +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 140 +CXXFLAGS+= -include ${FILESDIR}/builtin_is_constant_evaluated.h +.endif + .include diff --git a/devel/creduce/files/builtin_is_constant_evaluated.h b/devel/creduce/files/builtin_is_constant_evaluated.h new file mode 100644 index 000000000000..2775e8fa1bf3 --- /dev/null +++ b/devel/creduce/files/builtin_is_constant_evaluated.h @@ -0,0 +1 @@ +constexpr bool __builtin_is_constant_evaluated() { return false; }