From nobody Wed Dec 22 10:06:01 2021 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 7F6391905D6D; Wed, 22 Dec 2021 10:06:08 +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 4JJpqv4NRsz4YZd; Wed, 22 Dec 2021 10:06:03 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 7AEDD1B45C; Wed, 22 Dec 2021 10:06:01 +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 1BMA61tJ092132; Wed, 22 Dec 2021 10:06:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BMA61ix092131; Wed, 22 Dec 2021 10:06:01 GMT (envelope-from git) Date: Wed, 22 Dec 2021 10:06:01 GMT Message-Id: <202112221006.1BMA61ix092131@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: 3392ecd6d2a0 - stable/12 - Fix the mips64 world build after r364284. 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/12 X-Git-Reftype: branch X-Git-Commit: 3392ecd6d2a0368f77c3a1397b54023db74e21a9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640167565; 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=5jLHbuB6Jwe41ToLnhoLjXRUIy2VSV5eRY95GCttESg=; b=tahUBZGbcqKGcjU61K49QlE9/kv/NF2mtu5yarKlX/QwnPmq7pjXI6OUUrqbZbCZQwNNOt lqGHHdfxeKoQERrUc7cheJ5wCaDKS0R/Tg5NK2783HPUasIONMdHwS6d0RsVe1DJ4Pehcu mad6qgf9OtMqiuJQ4kYU8rsdjue+yswYBrUyJJ0YKlMXy+HIe/d0OitMB1lyiiH3W2Ipuv zVf0nFSSrtMRwZfcKJZxxNNhSS/qhJEhrsXE4C0qKEBI3/sPxjIS1RxvKRW24PUX0isXqE Yy/9p8iCWuiwofYzIezDzLfOKs+GPI7ok2uVo5FiNSneGyQaun9/3M49NaeLVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640167565; a=rsa-sha256; cv=none; b=BT98MUKhoi7GMb3WUFrYft1YvUdpRxbFwPutQWhni0voDcp0Nh5sQBcu5kpd2fvih1ViE5 ICid5whktU1iOPRGLG7G3xd1WC6MNkdxIcC4oJfhhbfmT1YWRaLwX+eIZkEqIh9SHhlP76 VqTfvVFP85kdX0ZrntSU3BUpQSYbjgMPlppVvU9qm1M61E+uTXeJnK6GX375sWuB6t0DdR /U4u+N66Pf+DQi7ccsxjOw7rcd9VcbFced+ZzvwjJ0fbruzaLj+sgHwJfI4AE/gJxEwsSq WGOxApC6TqDc6mVtb1t69NUd2ZFuGAnA9KJrfHfWBrSgWJ/I6zFkEh46G3j52w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=3392ecd6d2a0368f77c3a1397b54023db74e21a9 commit 3392ecd6d2a0368f77c3a1397b54023db74e21a9 Author: Dimitry Andric AuthorDate: 2020-08-19 17:05:30 +0000 Commit: Dimitry Andric CommitDate: 2021-12-22 09:58:32 +0000 Fix the mips64 world build after r364284. Linking the full version of clang 11 results in errors similar to: lld: error: /usr/src/contrib/llvm-project/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:736:(.text._ZN5clang4ento22CreateAnalysisConsumerERNS_16CompilerInstanceE+0xE0): relocation R_MIPS_CALL16 out of range: 48920 is not in [-32768, 32767]; references operator new(unsigned long) Add -mxgot to the compilation flags for llvm libraries to work around this error. This may be too big of a hammer, but it can always be refined later. MFC after: 6 weeks (cherry picked from commit 7eee1720520faaeee2dd91f23092b39f83b89216) --- lib/clang/llvm.build.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/clang/llvm.build.mk b/lib/clang/llvm.build.mk index d080bc57f1f3..7aa034a42d0c 100644 --- a/lib/clang/llvm.build.mk +++ b/lib/clang/llvm.build.mk @@ -112,3 +112,8 @@ CXXSTD?= c++14 CXXFLAGS+= -fno-exceptions CXXFLAGS+= -fno-rtti CXXFLAGS.clang+= -stdlib=libc++ + +.if ${MACHINE_ARCH:Mmips64} +STATIC_CFLAGS+= -mxgot +STATIC_CXXFLAGS+= -mxgot +.endif