Created attachment 667565 [details] Build log When i tried to build the new version of spidermonkey(78.4.0), there is a segmentation fault with the lto compile flag. The output of the emerge --info '=dev-lang/spidermonkey-78.4.0::gentoo' is on the attachments.
Created attachment 667568 [details] Full Build log Full build log from '/var/tmp/portage/dev-lang/spidermonkey-78.4.0/temp/build.log'.
1) Please follow https://wiki.gentoo.org/wiki/Gcc-ICE-reporting-guide 2) Please reproduce with vanilla CFLAGS, you currently have: >CFLAGS="-march=native -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=auto -fuse-linker-plugin -falign-functions=32 -pipe"
Created attachment 667577 [details] Build Log with default CFLAGS Emerge --info, same error with default CFLAGS Portage 3.0.8 (python 3.7.9-final-0, default/linux/amd64/17.1/hardened, gcc-10.2.0, glibc-2.32-r2, 5.9.1-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-5.9.1-gentoo-x86_64-Intel-R-_Core-TM-_i7-8750H_CPU_@_2.20GHz-with-gentoo-2.7 KiB Mem: 16233000 total, 7560256 free KiB Swap: 16777212 total, 16775932 free Head commit of repository gentoo: b8aa0a434c49458a4d42af73a30278649b008f36 Timestamp of repository lto-overlay: Tue, 06 Oct 2020 13:35:21 +0000 Head commit of repository lto-overlay: 3e7a867b0a18b943dd7a84995aa3b5c96513305d Timestamp of repository mv: Sat, 17 Oct 2020 16:35:17 +0000 Head commit of repository mv: 044ce90a3f382b433d106fcebdd1437358dabe36 Head commit of repository steam-overlay: 32f27e07e540110458c069965e8e027d7350fbd8 sh bash 5.0_p18 ld GNU ld (Gentoo 2.35.1 p1) 2.35.1 ccache version 4.0 [disabled] app-shells/bash: 5.0_p18::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.30.3-r1::gentoo dev-lang/python: 3.7.9-r1::lto-overlay, 3.8.6-r1::lto-overlay, 3.9.0-r1::lto-overlay dev-util/ccache: 4.0::gentoo dev-util/cmake: 3.18.4::gentoo sys-apps/baselayout: 2.7::gentoo sys-apps/openrc: 0.42.1::gentoo sys-apps/sandbox: 2.20::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r5::gentoo sys-devel/automake: 1.16.2::gentoo sys-devel/binutils: 2.35.1::gentoo sys-devel/gcc: 10.2.0-r2::gentoo sys-devel/gcc-config: 2.3.2::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.9::gentoo (virtual/os-headers) sys-libs/glibc: 2.32-r2::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: git sync-uri: https://github.com/gentoo/gentoo.git priority: -1000 lto-overlay location: /var/db/repos/lto-overlay sync-type: git sync-uri: https://github.com/gentoo-mirror/lto-overlay.git masters: gentoo mv mv location: /var/db/repos/mv sync-type: git sync-uri: https://github.com/gentoo-mirror/mv.git masters: gentoo steam-overlay location: /usr/local/portage/steam-overlay sync-type: git sync-uri: https://github.com/anyc/steam-overlay.git masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -02 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /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/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=native -02 -pipe" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS="--jobs 6 --load-average 10.8 --with-bdeps y --complete-graph y" 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="-march=native -02 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install 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="-march=native -02 -pipe" GENTOO_MIRRORS="https://ftp.rnl.tecnico.ulisboa.pt/pub/gentoo/gentoo-distfiles/ http://ftp.rnl.tecnico.ulisboa.pt/pub/gentoo/gentoo-distfiles/ ftp://ftp.rnl.tecnico.ulisboa.pt/pub/gentoo/gentoo-distfiles/ rsync://ftp.rnl.tecnico.ulisboa.pt/pub/gentoo/gentoo-distfiles/ ftp://ftp.dei.uc.pt/pub/linux/gentoo/ http://ftp.dei.uc.pt/pub/linux/gentoo/" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j12 -l10.8" 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" USE="X acl amd64 bluetooth bzip2 crypt dbus elogind graphite gtk hardened iconv ipv6 libglvnd libnotify libtirpc lto multilib ncurses nls nptl openmp pam pcre pgo pie pulseaudio readline seccomp split-usr ssl ssp unicode vulkan xattr xtpax zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 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" GRUB_PLATFORMS="efi-64" 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-2 php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python3_7" QEMU_SOFTMMU_TARGETS="arm X86_64 sparc" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby25 ruby26" USERLAND="GNU" VIDEO_CARDS="intel i965 iris nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
(In reply to skidrow.jc from comment #3) > Created attachment 667577 [details] > Build Log with default CFLAGS > > Emerge --info, same error with default CFLAGS > It's not the same error, it's dying because of -02 instead of -O2 (note: zero vs the letter 'O').
Could you also follow the rest of the guide and produce a command line which is failing possibly, and expanded -march=native? Thanks!
Compiled with the the following flags COMMON_FLAGS="-march=native -O2 -pipe" Worked fine.
(In reply to skidrow.jc from comment #6) > Compiled with the the following flags > > COMMON_FLAGS="-march=native -O2 -pipe" > > Worked fine. The goal is usually not to find a set of flags that happens to work, but a minimal set of flags deviating from default '-O2 -pipe" that happens to break the build. I reproduced gcc crash locally on "-flto -fipa-pta -O1". As a workaround you can either unset USE=lto or drop -fipa-pta to see if it's enough to get around the build failure. I'll extract smaller example and file an upstream gcc bug.
Filed upstream bug as https://gcc.gnu.org/PR97565. Another workaround might be for force smaller set of LTO partitions, like -flto-partition=one.
Should be fixed in 10.3.1_p20211126 & 11.2.1_p20211127.