Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 917792 - dev-libs/nss-3.91 will fail to compile with -flto in an x86 (i686) environment
Summary: dev-libs/nss-3.91 will fail to compile with -flto in an x86 (i686) environment
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
Keywords: PullRequest
Depends on:
Blocks: lto
  Show dependency tree
Reported: 2023-11-23 08:01 UTC by ppw0
Modified: 2024-02-18 04:12 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---

build log (build.log,3.57 KB, text/x-log)
2023-11-23 08:01 UTC, ppw0
emerge --info (emerge_info.log,5.76 KB, text/x-log)
2023-11-23 08:02 UTC, ppw0

Note You need to log in before you can comment on or make changes to this bug.
Description ppw0 2023-11-23 08:01:35 UTC
Created attachment 875409 [details]
build log

Steps to reproduce:

 1. be in an x86 (i686) environment (chroot)
 2. set clang+lld as the default compiler
 3. try to emerge dev-libs/nss-3.91 with the -flto switch in CFLAGS/CXXFLAGS

The following error is produced:
>>> Compiling source in /var/tmp/portage/dev-libs/nss-3.91/work/nss-3.91/nss ...
 * abi_x86_32.x86: running multilib-minimal_abi_src_compile
 * Running compilation test to determine bit'ness
 * ERROR: dev-libs/nss-3.91::gentoo failed (compile phase):
 *   Failed to detect whether clang builds 64bits or 32bits, disable distcc if you're using it, please

Possibly related to bug 915890.

Attaching logs.
Comment 1 ppw0 2023-11-23 08:02:11 UTC
Created attachment 875410 [details]
emerge --info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-26 00:39:12 UTC
We should pass -fno-lto for the bitness check and/or switch to the new thing in toolchain-funcs.eclass.
Comment 3 Larry the Git Cow gentoo-dev 2023-12-16 08:24:51 UTC
The bug has been referenced in the following commit(s):

commit c39014fbcff1d16d14556bf750066a99d69c9e68
Author:     Joonas Niilola <>
AuthorDate: 2023-12-16 08:23:52 +0000
Commit:     Joonas Niilola <>
CommitDate: 2023-12-16 08:24:48 +0000

    dev-libs/nss: disable lto with clang on x86, on 3.96
    Signed-off-by: Joonas Niilola <>

 dev-libs/nss/nss-3.96.ebuild | 9 +++++++++
 1 file changed, 9 insertions(+)
Comment 4 Joonas Niilola gentoo-dev 2023-12-16 08:25:32 UTC
Will backport to nss-esr once it's clear that nss-esr even is a thing anymore.
Comment 5 Larry the Git Cow gentoo-dev 2023-12-16 09:53:26 UTC
The bug has been closed via the following commit(s):

commit 1387931f892a0eadab06a7f9f6cc2854f1105c24
Author:     Sam James <>
AuthorDate: 2023-12-16 08:35:46 +0000
Commit:     Joonas Niilola <>
CommitDate: 2023-12-16 09:53:24 +0000

    dev-libs/nss: fix bitness check for LTO
    Signed-off-by: Sam James <>
    Signed-off-by: Joonas Niilola <>

 dev-libs/nss/nss-3.96.ebuild | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
Comment 6 Larry the Git Cow gentoo-dev 2024-02-18 04:12:42 UTC
The bug has been referenced in the following commit(s):

commit 5342a0ba4686d0d75f7bdbf4e8645fa607748d92
Author:     Sam James <>
AuthorDate: 2024-02-18 04:11:59 +0000
Commit:     Sam James <>
CommitDate: 2024-02-18 04:12:32 +0000

    dev-libs/nspr: sync bitness check from dev-libs/nss
    Pass -fno-lto to the compiler and -S to file, as we do in dev-libs/nss.
    Signed-off-by: Sam James <>

 dev-libs/nspr/nspr-4.35-r2.ebuild | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)