sys-devel/llvm-17.0.0_pre20230520 fails to compile with previous snapshot (llvm/clang 17.0.0_pre20230512) with -flto (lld and mold) Reproducible: Always Steps to Reproduce: 1. emerge =sys-devel/llvm-17.0.0_pre20230512 --deep --with-bdeps=y (lld and -flto=thin, clang/musl profile including llvm-libunwind / libomp / libcxx/-abi, compiler-rt/-sanitizers without binutils) 2. switch compiler to llvm-17.0.0_pre20230512 3. emerge =sys-devel/llvm-17.0.0_pre20230512 --deep --with-bdeps=y (-flto, mold or bfd or lld) Actual Results: segfault with backtrace during linking Expected Results: compilation works fine with thinlto Options that might be required for reproducing segfault libc version: musl-1.2.4 additional package from overlay: - sys-libs/libexecinfo-1.9 (linked during llvm compilation) COMMON_FLAGS="-O3 -pipe -march=skylake -mtune=skylake -D_FORTIFY_SOURCE=3 -gsplit-dwarf -flto -D_LARGEFILE64_SOURCE" LDFLAGS="${COMMON_FLAGS} -fuse-ld=bfd -rtlib=compiler-rt -unwindlib=libunwind -Wl,-O3 -Wl,--sort-common -Wl,--as-needed -Wl,--compress-debug-sections=zstd -Wl,-z,relro,-z,now -Wl,--plugin-opt=dwo_dir=" NINJA=samu emerge --info: Portage 3.0.47 (python 3.11.3-final-0, default/linux/amd64/23.0/musl/llvm, gcc-17.0.0, musl-1.2.4, 6.3.2-gentoo-dist x86_64) ================================================================= System Settings ================================================================= System uname: Linux-6.3.2-gentoo-dist-x86_64-with-libc KiB Mem: 7999608 total, 6142592 free KiB Swap: 41943036 total, 40330764 free Head commit of repository gentoo: ebfac6656eb4e45460a2adc9508c131b6ee37763 Head commit of repository 12101111-overlay: 81f5ceab265445dddb6a175d294dedd843bc8c36 Head commit of repository LinuxUserGD: 9f18525f579d51d2aa1a2599bc839b571ebf6b0a Timestamp of repository Miezhiko: Sat, 20 May 2023 06:32:33 +0000 Head commit of repository Miezhiko: c4593269ff7b06c461523a84a375d4ec1edeb31b Timestamp of repository booboo: Sat, 20 May 2023 06:32:15 +0000 Head commit of repository booboo: b3d06eb40f4679637fe2ba12dbfe250b85c4d486 Timestamp of repository cg: Sat, 20 May 2023 06:32:20 +0000 Head commit of repository cg: 0e1415f9feed6bc633f69565fc601a77e975b003 Head commit of repository clang-musl: 6cee22e305fef92169d12c6076e9bdd8dfd16f65 Timestamp of repository crossdev: Sun, 20 Jun 2021 21:41:33 +0000 Head commit of repository crossdev: 7c86f8ca262ff27fe4fb1965d8f8fef19f77a3bb Timestamp of repository electron: Wed, 10 May 2023 18:18:59 +0000 Head commit of repository electron: b3c91a68163f0ae4b768c6e05bb234a52c63ec9f Timestamp of repository flavour: Sat, 20 May 2023 06:32:15 +0000 Head commit of repository flavour: 8f80ad88aecb286e4c3d0defc4cb85098caca1c7 Timestamp of repository guru: Sun, 21 May 2023 07:33:50 +0000 Head commit of repository guru: afb7bb8e0817ecd5ce26b13d0dfdcceb8df2b144 Timestamp of repository kde: Sat, 20 May 2023 20:33:52 +0000 Head commit of repository kde: 6593e6f08df3c3d0fd46b6d3d5c150bbcf0b615e Timestamp of repository liftm: Sat, 20 May 2023 06:32:32 +0000 Head commit of repository liftm: e7b45bdf465ac3c551dbb2c4509532bd6498c028 Timestamp of repository musl: Fri, 19 May 2023 02:46:53 +0000 Head commit of repository musl: fc5faf1e94f0859e8f5764fc9f5a30e08afedb77 Timestamp of repository mv: Sat, 20 May 2023 06:32:18 +0000 Head commit of repository mv: 5594f5743d759a1fbdb3306cdc375223d4d59f87 Timestamp of repository mva: Sat, 20 May 2023 06:32:18 +0000 Head commit of repository mva: 56c3a78a1792a8de189a2ff914e385f6c419d2c6 Timestamp of repository pf4public: Sun, 21 May 2023 01:33:56 +0000 Head commit of repository pf4public: be8ef175c0b8ad3a34767ec9d9750ab99bd71a15 Timestamp of repository qt: Sun, 14 May 2023 15:46:49 +0000 Head commit of repository qt: cba463251c5ac623cbead4d28562beeb7db6c56d Timestamp of repository reagentoo: Sat, 25 Feb 2023 06:47:18 +0000 Head commit of repository reagentoo: 54e947ecc261d96225ff710da98a5a74a0cebdaa Timestamp of repository src_prepare-overlay: Sat, 20 May 2023 12:31:51 +0000 Head commit of repository src_prepare-overlay: 3badf183750adaff2731c7979870fac108b34dba Timestamp of repository stefantalpalaru: Fri, 19 May 2023 16:03:54 +0000 Head commit of repository stefantalpalaru: f95ff04101d5558de7613df90f8251810097bc47 Timestamp of repository tatsh-overlay: Sat, 20 May 2023 08:46:54 +0000 Head commit of repository tatsh-overlay: 7ae9810f05ebf86afd0812c91aedf34e6e5f6ace sh bash 5.2_p15-r2 ld LLD 17.0.0 (compatible with GNU linkers) ccache version 4.8 [enabled] app-misc/pax-utils: 1.3.5::gentoo, 1.3.7::gentoo app-shells/bash: 5.1_p16-r2::gentoo, 5.2_p15-r2::gentoo dev-lang/perl: 5.36.0-r2::gentoo, 5.36.1-r1::gentoo dev-lang/python: 3.11.3::gentoo, 3.12.0_alpha7::gentoo dev-lang/rust: 1.69.0-r1::12101111-overlay dev-util/ccache: 4.8-r2::gentoo dev-util/cmake: 3.26.4-r1::gentoo dev-util/meson: 1.1.0::gentoo sys-apps/baselayout: 2.13-r1::gentoo sys-apps/sandbox: 2.29::gentoo, 2.30-r1::gentoo sys-apps/systemd: 253.3-r1::12101111-overlay sys-devel/autoconf: 2.13-r8::gentoo, 2.71-r5::gentoo, 2.71-r6::gentoo sys-devel/automake: 1.16.5::gentoo, 1.16.5-r1::gentoo sys-devel/binutils: 2.40-r5::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/clang: 15.0.7-r3::gentoo, 16.0.4::gentoo, 17.0.0_pre20230512::gentoo sys-devel/gcc-config: 2.11::gentoo sys-devel/libtool: 2.4.7-r1::gentoo sys-devel/lld: 15.0.7::gentoo, 16.0.4::gentoo, 17.0.0_pre20230520::gentoo sys-devel/llvm: 15.0.7-r3::gentoo, 16.0.4::clang-musl, 17.0.0_pre20230512::clang-musl sys-devel/make: 4.4.1::gentoo sys-kernel/linux-headers: 6.1::gentoo (virtual/os-headers), 6.3::gentoo (virtual/os-headers) sys-libs/musl: 1.2.4::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: git sync-uri: https://github.com/gentoo/gentoo priority: -1000 volatile: False 12101111-overlay location: /var/db/repos/12101111-overlay sync-type: git sync-uri: https://github.com/12101111/overlay.git masters: gentoo volatile: False LinuxUserGD location: /var/db/repos/LinuxUserGD sync-type: git sync-uri: https://github.com/LinuxUserGD/llvm-overlay.git masters: gentoo volatile: False Miezhiko location: /var/db/repos/Miezhiko sync-type: git sync-uri: https://github.com/gentoo-mirror/Miezhiko.git masters: gentoo volatile: False booboo location: /var/db/repos/booboo sync-type: git sync-uri: https://github.com/gentoo-mirror/booboo.git masters: gentoo volatile: False cg location: /var/db/repos/cg sync-type: git sync-uri: https://github.com/gentoo-mirror/cg.git masters: gentoo volatile: False clang-musl location: /var/db/repos/clang-musl sync-type: git sync-uri: https://github.com/clang-musl-overlay/clang-musl-overlay.git masters: gentoo volatile: False crossdev location: /var/db/repos/crossdev sync-type: git sync-uri: https://github.com/gentoo-mirror/crossdev.git masters: gentoo volatile: False electron location: /var/db/repos/electron sync-type: git sync-uri: https://github.com/gentoo-mirror/electron.git masters: gentoo volatile: False flavour location: /var/db/repos/flavour sync-type: git sync-uri: https://github.com/gentoo-mirror/flavour.git masters: gentoo volatile: False guru location: /var/db/repos/guru sync-type: git sync-uri: https://github.com/gentoo-mirror/guru.git masters: gentoo volatile: False kde location: /var/db/repos/kde sync-type: git sync-uri: https://github.com/gentoo-mirror/kde.git masters: gentoo volatile: False liftm location: /var/db/repos/liftm sync-type: git sync-uri: https://github.com/gentoo-mirror/liftm.git masters: gentoo volatile: False musl location: /var/db/repos/musl sync-type: git sync-uri: https://github.com/gentoo-mirror/musl.git masters: gentoo volatile: False mv location: /var/db/repos/mv sync-type: git sync-uri: https://github.com/gentoo-mirror/mv.git masters: gentoo volatile: False mva location: /var/db/repos/mva sync-type: git sync-uri: https://github.com/gentoo-mirror/mva.git masters: gentoo volatile: False pf4public location: /var/db/repos/pf4public sync-type: git sync-uri: https://github.com/gentoo-mirror/pf4public.git masters: gentoo volatile: False qt location: /var/db/repos/qt sync-type: git sync-uri: https://github.com/gentoo-mirror/qt.git masters: gentoo volatile: False reagentoo location: /var/db/repos/reagentoo sync-type: git sync-uri: https://github.com/gentoo-mirror/reagentoo.git masters: gentoo volatile: False src_prepare-overlay location: /var/db/repos/src_prepare-overlay sync-type: git sync-uri: https://github.com/gentoo-mirror/src_prepare-overlay.git masters: gentoo volatile: False stefantalpalaru location: /var/db/repos/stefantalpalaru sync-type: git sync-uri: https://github.com/gentoo-mirror/stefantalpalaru.git masters: gentoo volatile: False tatsh-overlay location: /var/db/repos/tatsh-overlay sync-type: git sync-uri: https://github.com/gentoo-mirror/tatsh-overlay.git masters: gentoo volatile: False Installed sets: @kde-plasma ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="@FREE" ADDR2LINE="llvm-addr2line" AR="llvm-ar" AS="clang -c" CBUILD="x86_64-gentoo-linux-musl" CC="clang" CFLAGS="-O3 -pipe -march=skylake -mtune=skylake -D_FORTIFY_SOURCE=3 -gsplit-dwarf -flto -D_LARGEFILE64_SOURCE" CHOST="x86_64-gentoo-linux-musl" CONFIG_PROTECT="/etc /usr/lib/libreoffice/program/sofficerc /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-php8.2/ext-active/ /etc/php/cgi-php8.2/ext-active/ /etc/php/cli-php8.2/ext-active/ /etc/php/fpm-php8.2/ext-active/ /etc/php/phpdbg-php8.2/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" CPP="clang-cpp" CXX="clang++" CXXFLAGS="-O3 -pipe -march=skylake -mtune=skylake -D_FORTIFY_SOURCE=3 -gsplit-dwarf -flto -D_LARGEFILE64_SOURCE -stdlib=libc++" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS=" --buildpkg --usepkg" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE 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 XDG_STATE_HOME" FCFLAGS="-O3 -pipe -march=skylake -mtune=skylake -D_FORTIFY_SOURCE=3 -gsplit-dwarf -flto -D_LARGEFILE64_SOURCE" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live ccache compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync 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="-O3 -pipe -march=skylake -mtune=skylake -D_FORTIFY_SOURCE=3 -gsplit-dwarf -flto -D_LARGEFILE64_SOURCE" GENTOO_MIRRORS="http://mirror.leaseweb.com/gentoo/ http://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/ http://ftp.fau.de/gentoo" INSTALL_MASK="charset.alias /usr/share/locale/locale.alias" LANG="C.UTF8" LD="ld.bfd" LDFLAGS="-O3 -pipe -march=skylake -mtune=skylake -D_FORTIFY_SOURCE=3 -gsplit-dwarf -flto -D_LARGEFILE64_SOURCE -fuse-ld=bfd -rtlib=compiler-rt -unwindlib=libunwind -Wl,-O3 -Wl,--sort-common -Wl,--as-needed -Wl,--compress-debug-sections=zstd -Wl,-z,relro,-z,now -Wl,--plugin-opt=dwo_dir=" LEX="flex" LINGUAS="de" MAKEOPTS="-j4" NM="llvm-nm" OBJCOPY="llvm-objcopy" OBJDUMP="llvm-objdump" 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" RANLIB="llvm-ranlib" READELF="llvm-readelf" SHELL="/bin/bash" STRINGS="llvm-strings" STRIP="llvm-strip" USE="X acl alsa amd64 apparmor binutils-plugin brotli bzip2 cairo caps cet clang compiler-rt compress compress-xz crypt cups cxx dbus default-clang default-compiler-rt default-libcxx default-libunwind default-llvm eds egl eme-free geckodriver ghcbootstrap gles2 graphite gstreamer gtk gtk3 hardened harfbuzz hwaccel iconv icu initramfs ipv6 jemalloc jpeg jumbo-build libcxx libproxy libtirpc libunwind llvm llvm-libunwind lto lzip lzma mariadb minizip ncurses networkmanager nls nptl nss ogg opencl opengl openh264 openmp pam panel-plugin pcre pcre32 pic pipewire pipewire-alsa policykit polly portmidi portsmf pulseaudio qml qt5 qt6 readline rust sanitize screencast seccomp sound-server ssl svg system-av1 system-bootstrap system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-llvm system-png system-python-libs system-webp systemd test-rust threads tpm udev unicode upower vaapi verify-sig vulkan wasi wasm wayland wifi xattr xmalloc zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2021" 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="musl" 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" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de" 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_11" PYTHON_TARGETS="python3_11" QEMU_SOFTMMU_TARGETS="x86_64 aarch64 ppc" QEMU_USER_TARGETS="x86_64 aarch64 ppc" RUBY_TARGETS="ruby31" VIDEO_CARDS="intel i965" 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: ARFLAGS, ASFLAGS, CCLD, CONFIG_SHELL, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS, SIZE, YACC, YFLAGS
Please include the full build.log.
Created attachment 862145 [details] build.log
Upstream bug report: https://github.com/llvm/llvm-project/issues/63110
Can't reproduce anymore with LLVM 16.0.6 / 17.0.0 rc1 / 18.0.0_pre20230803 (https://github.com/llvm/llvm-project/issues/63110#issuecomment-1666653795)