From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A500B158091 for ; Sat, 18 Jun 2022 17:17:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D9389E09AB; Sat, 18 Jun 2022 17:17:51 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BAF4CE09AB for ; Sat, 18 Jun 2022 17:17:51 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B70E3341907 for ; Sat, 18 Jun 2022 17:17:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 208A0105 for ; Sat, 18 Jun 2022 17:17:49 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1655572661.79a3c0438c8f3885fb8d5840263b36c8ebd80f4f.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/mongodb/, dev-db/mongodb/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-db/mongodb/files/mongodb-4.4.10-no-force-lld.patch dev-db/mongodb/files/mongodb-5.0.5-no-force-lld.patch dev-db/mongodb/mongodb-4.4.10-r1.ebuild dev-db/mongodb/mongodb-5.0.5-r2.ebuild X-VCS-Directories: dev-db/mongodb/ dev-db/mongodb/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 79a3c0438c8f3885fb8d5840263b36c8ebd80f4f X-VCS-Branch: master Date: Sat, 18 Jun 2022 17:17:49 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 020e70fe-de9e-4a11-b53b-41e92e7b056c X-Archives-Hash: 0750f32bd3cafd24208c2e069c7f5e6b commit: 79a3c0438c8f3885fb8d5840263b36c8ebd80f4f Author: Sam James gentoo org> AuthorDate: Sat Jun 18 17:17:37 2022 +0000 Commit: Sam James gentoo org> CommitDate: Sat Jun 18 17:17:41 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79a3c043 dev-db/mongodb: don't force LLD See patch for details. Closes: https://bugs.gentoo.org/769986 Signed-off-by: Sam James gentoo.org> .../files/mongodb-4.4.10-no-force-lld.patch | 29 +++++++++++++ .../mongodb/files/mongodb-5.0.5-no-force-lld.patch | 49 ++++++++++++++++++++++ dev-db/mongodb/mongodb-4.4.10-r1.ebuild | 1 + dev-db/mongodb/mongodb-5.0.5-r2.ebuild | 1 + 4 files changed, 80 insertions(+) diff --git a/dev-db/mongodb/files/mongodb-4.4.10-no-force-lld.patch b/dev-db/mongodb/files/mongodb-4.4.10-no-force-lld.patch new file mode 100644 index 000000000000..471f3e226820 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-4.4.10-no-force-lld.patch @@ -0,0 +1,29 @@ +Don't automagically force lld > gold > bfd. Leave it up to the user. + +In particular, avoids issues with LTO enabled (via the flag/scons option) +where using GCC as compiler, as lld can't do LTO with GCC. + +https://bugs.gentoo.org/769986 +--- a/SConstruct ++++ b/SConstruct +@@ -3109,20 +3109,6 @@ def doConfigure(myenv): + myenv.Append( CCFLAGS=["/Zc:inline"]) + + if myenv.ToolchainIs('gcc', 'clang'): +- # This tells clang/gcc to use the gold linker if it is available - we prefer the gold linker +- # because it is much faster. Don't use it if the user has already configured another linker +- # selection manually. +- if not any(flag.startswith('-fuse-ld=') for flag in env['LINKFLAGS']): +- +- # lld has problems with separate debug info on some platforms. See: +- # - https://bugzilla.mozilla.org/show_bug.cgi?id=1485556 +- # - https://bugzilla.mozilla.org/show_bug.cgi?id=1485556 +- if get_option('separate-debug') == 'off': +- if not AddToLINKFLAGSIfSupported(myenv, '-fuse-ld=lld'): +- AddToLINKFLAGSIfSupported(myenv, '-fuse-ld=gold') +- else: +- AddToLINKFLAGSIfSupported(myenv, '-fuse-ld=gold') +- + # Usually, --gdb-index is too expensive in big static binaries, but for dynamic + # builds it works well. + if link_model.startswith("dynamic"): diff --git a/dev-db/mongodb/files/mongodb-5.0.5-no-force-lld.patch b/dev-db/mongodb/files/mongodb-5.0.5-no-force-lld.patch new file mode 100644 index 000000000000..6ce92778b6bd --- /dev/null +++ b/dev-db/mongodb/files/mongodb-5.0.5-no-force-lld.patch @@ -0,0 +1,49 @@ +Don't automagically force lld > gold > bfd. Leave it up to the user. + +In particular, avoids issues with LTO enabled (via the flag/scons option) +where using GCC as compiler, as lld can't do LTO with GCC. + +https://bugs.gentoo.org/769986 +--- a/SConstruct ++++ b/SConstruct +@@ -2824,40 +2824,6 @@ def doConfigure(myenv): + def AddToSHLINKFLAGSIfSupported(env, flag): + return AddFlagIfSupported(env, 'C', '.c', flag, True, SHLINKFLAGS=[flag]) + +- if myenv.ToolchainIs('gcc', 'clang'): +- # This tells clang/gcc to use the gold linker if it is available - we prefer the gold linker +- # because it is much faster. Don't use it if the user has already configured another linker +- # selection manually. +- if any(flag.startswith('-fuse-ld=') for flag in env['LINKFLAGS']): +- myenv.FatalError(f"Use the '--linker' option instead of modifying the LINKFLAGS directly.") +- +- linker_ld = get_option('linker') +- if linker_ld == 'auto': +- # lld has problems with separate debug info on some platforms. See: +- # - https://bugzilla.mozilla.org/show_bug.cgi?id=1485556 +- # - https://bugzilla.mozilla.org/show_bug.cgi?id=1485556 +- # +- # lld also apparently has problems with symbol resolution +- # in some esoteric configurations that apply for us when +- # using --link-model=dynamic mode, so disable lld there +- # too. See: +- # - https://bugs.llvm.org/show_bug.cgi?id=46676 +- # +- # We should revisit all of these issues the next time we upgrade our clang minimum. +- if get_option('separate-debug') == 'off' and get_option('link-model') != 'dynamic': +- if not AddToLINKFLAGSIfSupported(myenv, '-fuse-ld=lld'): +- AddToLINKFLAGSIfSupported(myenv, '-fuse-ld=gold') +- else: +- AddToLINKFLAGSIfSupported(myenv, '-fuse-ld=gold') +- elif link_model.startswith("dynamic") and linker_ld == 'bfd': +- # BFD is not supported due to issues with it causing warnings from some of +- # the third party libraries that mongodb is linked with: +- # https://jira.mongodb.org/browse/SERVER-49465 +- myenv.FatalError(f"Linker {linker_ld} is not supported with dynamic link model builds.") +- else: +- if not AddToLINKFLAGSIfSupported(myenv, f'-fuse-ld={linker_ld}'): +- myenv.FatalError(f"Linker {linker_ld} could not be configured.") +- + detectCompiler = Configure(myenv, help=False, custom_tests = { + 'CheckForCXXLink': CheckForCXXLink, + }) diff --git a/dev-db/mongodb/mongodb-4.4.10-r1.ebuild b/dev-db/mongodb/mongodb-4.4.10-r1.ebuild index 19e02103e966..8cd7e5807418 100644 --- a/dev-db/mongodb/mongodb-4.4.10-r1.ebuild +++ b/dev-db/mongodb/mongodb-4.4.10-r1.ebuild @@ -59,6 +59,7 @@ PATCHES=( "${FILESDIR}/${PN}-4.4.1-gcc11.patch" "${FILESDIR}/${PN}-5.0.2-glibc-2.34.patch" "${FILESDIR}/${PN}-4.4.10-boost-1.79.patch" + "${FILESDIR}/${PN}-4.4.10-no-force-lld.patch" ) S="${WORKDIR}/${MY_P}" diff --git a/dev-db/mongodb/mongodb-5.0.5-r2.ebuild b/dev-db/mongodb/mongodb-5.0.5-r2.ebuild index 9e993f26b1d4..6c89b11fff96 100644 --- a/dev-db/mongodb/mongodb-5.0.5-r2.ebuild +++ b/dev-db/mongodb/mongodb-5.0.5-r2.ebuild @@ -66,6 +66,7 @@ PATCHES=( "${FILESDIR}/${PN}-5.0.2-skip-no-exceptions.patch" "${FILESDIR}/${PN}-5.0.2-skip-reqs-check.patch" "${FILESDIR}/${PN}-5.0.2-boost-1.79.patch" + "${FILESDIR}/${PN}-5.0.5-no-force-lld.patch" ) S="${WORKDIR}/${MY_P}"