Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 870172 - sys-devel/gcc-11.3.0: unrecognized command-line option '-fuse-ld=mold'; did you mean '-fuse-ld=gold'
Summary: sys-devel/gcc-11.3.0: unrecognized command-line option '-fuse-ld=mold'; did y...
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: systemwide-mold
  Show dependency tree
 
Reported: 2022-09-15 02:07 UTC by gaga.gero
Modified: 2022-09-16 00:53 UTC (History)
0 users

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


Attachments
build.log (build.log.xz,199.37 KB, application/x-xz)
2022-09-15 02:07 UTC, gaga.gero
Details
Build logs produced by GCC (gcc-build-logs.tar.bz2,545.19 KB, application/x-bzip)
2022-09-15 02:15 UTC, gaga.gero
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gaga.gero 2022-09-15 02:07:56 UTC
Created attachment 805210 [details]
build.log

GCC 11.3.0 fails to build with the mold linker, probably affecting earlier versions as well. GCC 12 works fine. The specific error seems to be "xg++: error: unrecognized command-line option '-fuse-ld=mold'; did you mean '-fuse-ld=gold'?", which happens in the bootstrapping stage.
Comment 1 gaga.gero 2022-09-15 02:13:04 UTC
emerge --info:

Portage 3.0.30 (python 3.10.6-final-0, default/linux/amd64/17.1, gcc-12.1.1, glibc-2.35-r8, 5.15.59-gentoo-x86-64-g01 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.15.59-gentoo-x86-64-g01-x86_64-Intel-R-_Core-TM-_i5-4460_CPU_@_3.20GHz-with-glibc2.35
KiB Mem:    16317932 total,  12110800 free
KiB Swap:    8126624 total,   8126624 free
Timestamp of repository gentoo: Wed, 14 Sep 2022 13:30:01 +0000
Head commit of repository gentoo: da876bb7967ac450e1986fca23382881dd441229
Timestamp of repository guru: Wed, 14 Sep 2022 04:31:47 +0000
Head commit of repository guru: 47163b98633a4f6351b5bd2ad9f5dcb37ea94227

Timestamp of repository torbrowser: Wed, 07 Sep 2022 08:26:01 +0000
Head commit of repository torbrowser: 838a5d29ff91263e7a2ded40e86d72d7763a0bc6

sh bash 5.1_p16-r1
ld GNU ld (Gentoo 2.38 p4) 2.38
ccache version 4.5.1 [disabled]
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r1::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.34.1-r3::gentoo
dev-lang/python:           3.8.13_p8::gentoo, 3.9.13_p6::gentoo, 3.10.6_p4::gentoo
dev-lang/rust:             1.62.1::gentoo
dev-util/ccache:           4.5.1::gentoo
dev-util/cmake:            3.23.3::gentoo
dev-util/meson:            0.62.2::gentoo
sys-apps/baselayout:       2.8::gentoo
sys-apps/openrc:           0.44.10::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.13-r2::gentoo, 2.71-r1::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.38-r2::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/clang:           13.0.1::gentoo, 14.0.6-r1::gentoo
sys-devel/gcc:             11.3.0::gentoo, 12.1.1_p20220625::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/lld:             13.0.1::gentoo
sys-devel/llvm:            13.0.1::gentoo, 14.0.6-r2::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.35-r8::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo

torbrowser
    location: /var/db/repos/torbrowser
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/torbrowser.git
    masters: gentoo

crossdev
    location: /var/db/repos/portage-crossdev
    masters: gentoo
    priority: 10

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.4/ext-active/ /etc/php/apache2-php8.0/ext-active/ /etc/php/apache2-php8.1/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cgi-php8.0/ext-active/ /etc/php/cgi-php8.1/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/php/cli-php8.0/ext-active/ /etc/php/cli-php8.1/ext-active/ /etc/php/fpm-php7.4/ext-active/ /etc/php/fpm-php8.0/ext-active/ /etc/php/fpm-php8.1/ext-active/ /etc/php/phpdbg-php7.4/ext-active/ /etc/php/phpdbg-php8.0/ext-active/ /etc/php/phpdbg-php8.1/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe -march=native"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=native"
GENTOO_MIRRORS="http://ftp.fi.muni.cz/pub/linux/gentoo/ ftp://ftp.fi.muni.cz/pub/linux/gentoo/ rsync://ftp.fi.muni.cz/pub/linux/gentoo/ http://mirror.dkm.cz/gentoo/ https://mirror.dkm.cz/gentoo/ ftp://mirror.dkm.cz/gentoo/ rsync://mirror.dkm.cz/gentoo/ http://gentoo.mirror.web4u.cz/ ftp://gentoo.mirror.web4u.cz/ http://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo rsync://ftp.wh2.tu-dresden.de/gentoo https://ftp.uni-hannover.de/gentoo/ http://ftp.uni-hannover.de/gentoo/ ftp://ftp.uni-hannover.de/gentoo/ https://ftp.halifax.rwth-aachen.de/gentoo/ http://ftp.halifax.rwth-aachen.de/gentoo/ ftp://ftp.halifax.rwth-aachen.de/gentoo/ rsync://ftp.halifax.rwth-aachen.de/gentoo/ https://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ rsync://ftp-stud.hs-esslingen.de/gentoo/"
LANG="en_GB.utf8"
LDFLAGS="-fuse-ld=mold -Wl,-O2 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/home/gabor/.cargo/bin/nu"
USE="X acl alsa amd64 bzip2 cli crypt dri elogind fortran gdbm git iconv ipv6 libglvnd libtirpc multilib ncurses nls nptl nvidia openmp pam pcre pulseaudio readline seccomp split-usr ssl unicode vdpau verify-sig xattr zlib" ABI_X86="64" ADA_TARGET="gnat_2020" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

=================================================================
                        Package Settings
=================================================================

sys-devel/gcc-11.3.0::gentoo was built with the following:
USE="(cxx) doc (multilib) nls nptl openmp (pie) sanitize ssp vtv zstd -ada (-cet) (-custom-cflags) -d -debug (-fixed-point) -fortran -go -graphite (-hardened) -jit (-libssp) -lto -objc -objc++ -objc-gc (-pch) -pgo -systemtap -test -valgrind -vanilla" ABI_X86="(64)"
CFLAGS="-pipe -march=native -O2"
CXXFLAGS="-pipe -march=native -O2"
FEATURES="ipc-sandbox network-sandbox unmerge-logs unknown-features-warn unmerge-orphans usersandbox binpkg-dostrip pid-sandbox binpkg-multi-instance strict binpkg-logs assume-digests ebuild-locks userpriv sandbox preserve-libs qa-unresolved-soname-deps multilib-strict binpkg-docompress config-protect-if-modified buildpkg-live news parallel-fetch ccache protect-owned sfperms userfetch distlocks xattr merge-sync fixlafiles usersync"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"


sys-devel/gcc-12.1.1_p20220625::gentoo was built with the following:
USE="(cxx) doc fortran graphite jit lto (multilib) nls nptl objc openmp pgo (pie) sanitize ssp zstd -ada (-cet) (-custom-cflags) -d -debug (-fixed-point) -go (-hardened) (-libssp) -objc++ -objc-gc (-pch) -systemtap -test -valgrind -vanilla -vtv" ABI_X86="(64)"
CFLAGS="-pipe -march=native -O2"
CXXFLAGS="-pipe -march=native -O2"
FEATURES="qa-unresolved-soname-deps binpkg-docompress binpkg-dostrip sfperms strict buildpkg-live parallel-fetch unmerge-logs sandbox preserve-libs network-sandbox assume-digests pid-sandbox protect-owned unmerge-orphans merge-sync usersandbox ccache ebuild-locks distlocks unknown-features-warn config-protect-if-modified binpkg-logs userpriv news ipc-sandbox binpkg-multi-instance xattr fixlafiles usersync userfetch multilib-strict"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
Comment 2 gaga.gero 2022-09-15 02:15:55 UTC
Created attachment 805213 [details]
Build logs produced by GCC
Comment 3 weathercold.scr 2022-09-15 14:12:25 UTC
Support for `fuse-ld=mold` was added in gcc 12.
https://wiki.gentoo.org/wiki/Mold#Usage
Comment 4 Mike Gilbert gentoo-dev 2022-09-15 14:59:24 UTC
Given that GCC rebuilds itself, and GCC 11 does not support -fuse-ld=mold, the only way to "fix" this would be to ignore your LDFLAGS.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-16 00:53:31 UTC
We could backport the patch mentioned on the wiki page, but at this point in the GCC release cycle, it feels a bit pointless and unnecessary risky.

There's already too many patches to rebase for 11.x (12.x is a bit better) so I'd prefer not to add more unless really need to.