When using specific CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer -funroll-loops" stable (amd64) virtualbox-7.0.22 fails to build tripping over bin2c size verification for PXE NetBiosBinary However when I remove "-funroll-loops" from it build succeeds with probably binary made smaller and check succeeds. The same happens if I leave "-funroll-loops" and change src/VBox/Devices/PC/ipxe/Makefile.kmk with bigger size limit (bin2c -min 32 -max 59...) Reproducible: Always Steps to Reproduce: 1. # emerge -vaB =app-emulation/virtualbox-7.0* 2. fails to build with specific CFLAGS 3. Actual Results: Error output with usage of internal bin2c: portage-tmp/app-emulation/virtualbox-7.0.22/work/VirtualBox-7.0.22/out/linux.amd64/release/obj/bin2c/bin2c: size=57372 - Not 32768-57344b in size! Expected Results: build with no problem an smaller binary or omit size verification check? tail of build log: https://nopaste.net/VBoxCFLAGSWithFunrollLoops The problem can be overcome with /etc/portage/env/specificCFLGS.conf with no funrollloops present. # emerge --info Portage 3.0.66.1 (python 3.12.8-final-0, default/linux/amd64/23.0/split-usr, gcc-14, glibc-2.40-r5, 6.6.62-gentoo x86_64) ================================================================= System uname: Linux-6.6.62-gentoo-x86_64-Intel-R-_Core-TM-_i7-8700K_CPU_@_3.70GHz-with-glibc2.40 KiB Mem: 32739904 total, 10378148 free KiB Swap: 6291452 total, 5561852 free Timestamp of repository gentoo: Fri, 03 Jan 2025 07:45:00 +0000 Head commit of repository gentoo: b339a4b9471eb2b0ece05acf7cb2d0a1210b6545 Timestamp of repository anders-larsson: Thu, 02 Jan 2025 16:48:18 +0000 Head commit of repository anders-larsson: 5345034fc7633fabd61f91426e0ed2778932b25e Timestamp of repository dm9pZCAq: Sun, 22 Dec 2024 19:48:26 +0000 Head commit of repository dm9pZCAq: 41720091fc498302d5af5444044fde6684e44c52 Timestamp of repository zugaina: Tue, 08 Oct 2024 15:33:19 +0000 Head commit of repository zugaina: 0a96f40b51439ce8957786333ec6c52d3201cf3d sh bash 5.2_p37 ld GNU ld (Gentoo 2.43 p3) 2.43.1 app-misc/pax-utils: 1.3.8::gentoo app-shells/bash: 5.2_p37::gentoo dev-build/autoconf: 2.13-r8::gentoo, 2.72-r1::gentoo dev-build/automake: 1.16.5-r2::gentoo dev-build/cmake: 3.30.6::gentoo dev-build/libtool: 2.4.7-r4::gentoo dev-build/make: 4.4.1-r100::gentoo dev-build/meson: 1.5.2::gentoo dev-java/java-config: 2.3.4::gentoo dev-lang/perl: 5.40.0::gentoo dev-lang/python: 3.12.8::gentoo dev-lang/rust: 1.82.0-r101::gentoo llvm-core/clang: 18.1.8-r6::gentoo, 19.1.4::gentoo llvm-core/lld: 19.1.4::gentoo llvm-core/llvm: 18.1.8-r6::gentoo, 19.1.4::gentoo sys-apps/baselayout: 2.17::gentoo sys-apps/openrc: 0.55.1::gentoo sys-apps/sandbox: 2.39::gentoo sys-devel/binutils: 2.43-r2::gentoo sys-devel/binutils-config: 5.5.2::gentoo sys-devel/gcc: 14.2.1_p20241221::gentoo sys-devel/gcc-config: 2.11::gentoo sys-kernel/linux-headers: 6.6-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.40-r5::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage priority: -1000 volatile: True sync-rsync-verify-metamanifest: yes sync-rsync-verify-max-age: 3 sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 ChaosEngine location: /usr/local/portage masters: gentoo priority: 0 volatile: True anders-larsson location: /var/db/repos/anders-larsson sync-type: git sync-uri: https://github.com/gentoo-mirror/anders-larsson.git masters: gentoo volatile: False dm9pZCAq location: /var/db/repos/dm9pZCAq sync-type: git sync-uri: https://github.com/gentoo-mirror/dm9pZCAq.git masters: gentoo volatile: False zugaina location: /var/db/repos/zugaina sync-type: git sync-uri: https://github.com/gentoo-mirror/zugaina.git masters: gentoo volatile: False ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer -funroll-loops" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind" 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" CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer -funroll-loops" DISTDIR="/var/tmp/distfiles/" 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="-O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news noinfo parallel-fetch pid-sandbox pkgdir-index-trusted 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" GENTOO_MIRRORS="http://ftp.romnet.org/gentoo/" LANG="pl_PL.UTF-8" LC_ALL="pl_PL.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs" LEX="flex" LINGUAS="pl en" MAKEOPTS="-j13" PKGDIR="/var/tmp/portage-pkg" 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="/bin/bash" USE="X acl alsa amd64 apm atm avi avx bash bzip2 bzlib cet crypt dga directfb divx4linux dri dvd elogind gdbm gtk gtk2 iconv ipv6 jabber jpeg kde kf6compat libtirpc lto mikmod mmx mmxext mpeg mpx multilib ncurses nls nptl nptlonly oggvorbis opengl openmp oss pam pcre qt6 readline samba sdk seccomp sockets split-usr sse sse2 sse3 sse4_1 ssl ssse3 test-rust truetype unicode usb utf8 vaapi xattr xv zlib" ABI_X86="64" ADA_TARGET="gcc_13" ALSA_CARDS="hda-intel" APACHE2_MODULES="alias auth_basic auth_digest authn_anon authn_file authz_host authn_core authz_core socache_shmcb authz_owner authz_user autoindex brotli deflate dir env expires ext_filter filter headers http2 include mime mime_magic negotiation proxy proxy_connect proxy_http rewrite setenvif status unique_id userdir usertrack vhost_alias log_config proxy_wstunnel" CALLIGRA_FEATURES="karbon sheets words" CAMERAS="adc65 agfa_cl20 aox barbie canon casio_qv clicksmart310 digigr8 digita dimagev dimera3500 directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 jl2005a kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica konica_qm150 largan lg_gsm mars mustek panasonic_coolshot panasonic_dc1000 panasonic_dc1580 panasonic_l859 pccam300 pccam600 polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ptp2 ricoh ricoh_g3 samsung sierra sipix_blink sipix_blink2 sipix_web2 smal sonix sony_dscf1 sony_dscf55 soundvision spca50x sq905 stv0674 stv0680 sx330z template topfield toshiba_pdrm11" 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 navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="evdev" KERNEL="linux" L10N="pl en en-US" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby31" SANE_BACKENDS="xerox_mfp" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto 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, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
I could create a patch (for portage or against https://gitweb.gentoo.org/proj/virtualbox-patches.git/diff/patches/024_virtualbox-7.0.8-mtune-keep-size.patch?h=branch-7.0&id=1a528fb606a0a5eb772fe615688a4986ff4d5a44) if needed and put here.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=844a772008e033941014b8134b8ba03fda01dead commit 844a772008e033941014b8134b8ba03fda01dead Author: Viorel Munteanu <ceamac@gentoo.org> AuthorDate: 2025-01-06 17:03:10 +0000 Commit: Viorel Munteanu <ceamac@gentoo.org> CommitDate: 2025-01-06 17:35:13 +0000 app-emulation/virtualbox: fix too big PXE Disable -funroll-loops when building ipxe. Closes: https://bugs.gentoo.org/947372 Signed-off-by: Viorel Munteanu <ceamac@gentoo.org> app-emulation/virtualbox/Manifest | 6 +++--- app-emulation/virtualbox/virtualbox-7.0.22.ebuild | 6 +++--- app-emulation/virtualbox/virtualbox-7.1.4.ebuild | 6 +++--- app-emulation/virtualbox/virtualbox-9999.ebuild | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-)
Thanks. I disabled -funroll-loops only for ipxe: https://gitweb.gentoo.org/proj/virtualbox-patches.git/commit/?h=branch-7.0&id=5b6756b57b45d5d7d9553e0475038625def026e5
Works ok, thank You.