When I was rebuilding my system, after moving to the LLVM (split-usr) 23.0 profile from the 17.1 profile, it eventually got around to trying to rebuild grub and failed during the configure step with this message: checking for options to get soft-float... no configure: error: could not force soft-float !!! Please attach the following file when seeking support: !!! /var/tmp/portage/sys-boot/grub-2.12-r2/work/grub-2.12-pc/config.log Reproducible: Always Steps to Reproduce: 1. emerge -1 sys-boot/grub (in my case, I was doing emerge -e @world after moving to the new 23.0 LLVM profile) Actual Results: Grub fails to pass the configure step during emerging Expected Results: For grub to pass the configure step Portage 3.0.61 (python 3.11.8-final-0, default/linux/amd64/23.0/split-usr/llvm, gcc-13, glibc-2.38-r10, 6.7.1-tkg-pds-gentoo-llvm-zen2 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-6.7.1-tkg-pds-gentoo-llvm-zen2-x86_64-AMD_Ryzen_7_3700X_8-Core_Processor-with-glibc2.38 KiB Mem: 32776752 total, 1631328 free KiB Swap: 16777212 total, 14327036 free Timestamp of repository gentoo: Mon, 01 Apr 2024 21:49:21 +0000 Head commit of repository gentoo: 2e6e649af09f01f6caab88022594338842a77afd Timestamp of repository guru: Mon, 01 Apr 2024 22:18:41 +0000 Head commit of repository guru: 70b6a33cced6186495283af9bfa9e2ed411fd12e Timestamp of repository steam-overlay: Mon, 01 Apr 2024 09:52:34 +0000 Head commit of repository steam-overlay: df56c1f3b01bdddcaef056f2c7b1a7773e348234 Head commit of repository waffle-builds: c0bdd6ab8b58e334dc63841560b0dba88a9d301f Head commit of repository bobwya: a8496a14aee3c337b0e547b97b546b08607242a8 Head commit of repository farmboy0: da1550ac9ef77971aedf2fe23f1b3d31a3a931ca Head commit of repository librewolf: 8e73d83dd0962d61880d2a7afcadae8fd08a3456 Head commit of repository oxen-overlay: caa06ee33866f344b827f2bf7105839272cd7b3e Head commit of repository src_prepare-overlay: d7438e6637906a8f5be6b55f8236b5f2773b43dc Head commit of repository tatsh-overlay: 184c336b88a1cbf363a084124b6d0d95e19cd155 Head commit of repository tezeta: 693c3c49c3eb0d35c4cc9bde77b59374285d1c1b Head commit of repository thegreatmcpain: 75179b1d97f3818f585bc2e88496c849b4f42e7c Head commit of repository x0rzavi: e560dddb58c5baebc899623129a9db37f9a8da4b Timestamp of repository xwing: Mon, 01 Apr 2024 09:52:36 +0000 Head commit of repository xwing: d52a55aedc3e27c48af2fb227288367319c6dc7e sh lksh ld GNU ld (Gentoo 2.41 p5) 2.41.0 app-misc/pax-utils: 1.3.7::gentoo app-shells/bash: 5.1_p16-r6::gentoo dev-build/autoconf: 2.13-r8::gentoo, 2.71-r6::gentoo dev-build/automake: 1.16.5-r2::gentoo dev-build/cmake: 3.28.3::gentoo dev-build/libtool: 2.4.7-r4::gentoo dev-build/make: 4.4.1-r1::gentoo dev-build/meson: 1.4.0-r1::gentoo dev-java/java-config: 2.3.3-r1::gentoo dev-lang/perl: 5.38.2-r2::gentoo dev-lang/python: 3.11.8_p1::gentoo, 3.12.2_p1::gentoo dev-lang/rust: 1.75.0-r1::gentoo sys-apps/baselayout: 2.14-r2::gentoo sys-apps/openrc: 0.54::gentoo sys-apps/sandbox: 2.38::gentoo sys-devel/binutils: 2.41-r5::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/clang: 17.0.6::gentoo sys-devel/gcc: 13.2.1_p20240210::gentoo sys-devel/gcc-config: 2.11::gentoo sys-devel/lld: 17.0.6::gentoo sys-devel/llvm: 17.0.6::gentoo sys-kernel/linux-headers: 6.7-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.38-r10::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: git sync-uri: https://github.com/gentoo-mirror/gentoo.git priority: -1000 volatile: False guru location: /var/db/repos/guru sync-type: git sync-uri: https://github.com/gentoo-mirror/guru.git masters: gentoo volatile: False steam-overlay location: /var/db/repos/steam-overlay sync-type: git sync-uri: https://github.com/gentoo-mirror/steam-overlay.git masters: gentoo volatile: False waffle-builds location: /var/db/repos/waffle-builds sync-type: git sync-uri: https://github.com/FlyingWaffleDev/waffle-builds masters: gentoo volatile: False bobwya location: /var/db/repos/bobwya sync-type: git sync-uri: https://github.com/bobwya/bobwya masters: gentoo priority: 50 volatile: False farmboy0 location: /var/db/repos/farmboy0 sync-type: git sync-uri: https://github.com/farmboy0/portage-overlay.git masters: gentoo priority: 50 volatile: False librewolf location: /var/db/repos/librewolf sync-type: git sync-uri: https://codeberg.org/librewolf/gentoo.git masters: gentoo priority: 50 volatile: False oxen-overlay location: /var/db/repos/oxen-overlay sync-type: git sync-uri: https://github.com/XutaxKamay/oxen-overlay.git masters: gentoo priority: 50 volatile: False src_prepare-overlay location: /var/db/repos/src_prepare-overlay sync-type: git sync-uri: https://gitlab.com/src_prepare/src_prepare-overlay.git masters: gentoo priority: 50 volatile: False tatsh-overlay location: /var/db/repos/tatsh-overlay sync-type: git sync-uri: https://github.com/Tatsh/tatsh-overlay.git masters: gentoo priority: 50 volatile: False tezeta location: /var/db/repos/tezeta sync-type: git sync-uri: https://github.com/tezeta/tezeta-overlay.git masters: gentoo priority: 50 volatile: False thegreatmcpain location: /var/db/repos/thegreatmcpain sync-type: git sync-uri: https://gitlab.com/TheGreatMcPain/thegreatmcpain-overlay.git masters: gentoo priority: 50 volatile: False x0rzavi location: /var/db/repos/x0rzavi sync-type: git sync-uri: https://github.com/x0rzavi/x0rzavi-overlay.git masters: gentoo priority: 50 volatile: False xwing location: /var/db/repos/xwing sync-type: git sync-uri: https://github.com/gentoo-mirror/xwing.git masters: gentoo priority: 50 volatile: False ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" ADDR2LINE="llvm-addr2line" AR="llvm-ar" AS="llvm-as" CBUILD="x86_64-pc-linux-gnu" CC="clang" CFLAGS="-march=znver2 -pipe -minline-all-stringops -ftree-vectorize -O3 -fno-plt -ftrivial-auto-var-init=pattern -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fstack-protector-strong -fcf-protection -fPIC -ggdb3" 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/revdep-rebuild /etc/sandbox.d /etc/terminfo" CPP="clang-cpp" CXX="clang++" CXXFLAGS="-march=znver2 -pipe -minline-all-stringops -ftree-vectorize -O3 -fno-plt -ftrivial-auto-var-init=pattern -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fstack-protector-strong -fcf-protection -fPIC -ggdb3" DISTDIR="/var/cache/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="-march=znver2 -pipe -minline-all-stringops -ftree-vectorize -O3 -fno-plt -ftrivial-auto-var-init=pattern -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fstack-protector-strong -fcf-protection -fPIC -ggdb3" 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 nostrip 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="-march=znver2 -pipe -minline-all-stringops -ftree-vectorize -O3 -fno-plt -ftrivial-auto-var-init=pattern -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fstack-protector-strong -fcf-protection -fPIC -ggdb3" GENTOO_MIRRORS="https://gentoo.osuosl.org/" LANG="en_US.utf8" LD="ld.lld" LDFLAGS="-Wl,-O3,--sort-common,--as-needed,-z,relro,-z,now" LEX="flex" MAKEOPTS="-j7" NM="llvm-nm" OBJCOPY="llvm-objcopy" OBJDUMP="llvm-objdump" PKGDIR="/var/cache/binpkgs" PORTAGE_COMPRESS="gzip" PORTAGE_COMPRESS_FLAGS="-9 -R -p4" 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" RUSTFLAGS="-C opt-level=3 -C target-cpu=native -C codegen-units=1" SHELL="/bin/bash" STRINGS="llvm-strings" STRIP="llvm-strip" USE="7z X a52 aac acl acpi activities alsa amd64 autotype bash-completion bluetooth branding browser browser-integration bzip2 cairo cdda cdr cet clang cli colord crash-handler crypt cups dbus declarative default-compiler-rt default-libcxx default-lld desktop-portal dhclient discover dri dts dvd dvdr echo-cancel elogind encode exif ffmpeg firewall flac flatpak fluidsynth fortran gbm gdbm gif gles2 gles3 gpm gstreamer gtk gui hardened iconv icu ipv6 iwd jack jack-client jpeg kde kf6compat kwallet lcms legacy-systray libcxx libnotify libtirpc llvm-libunwind lm-sensors lzma mad mgba mng mp3 mp4 mpeg multilib ncurses networkmanager nls nptl ogg opengl openh264 openmp openssl opus pam pango pcre pdf pic pie pipewire pipewire-alsa plasma png policykit ppds pulseaudio qml qt5 raw readline resolvconf retroachievements rtc screencast sddm sdl seccomp sechash semantic-desktop share smart sound sound-server spell split-usr ssl startup-notification svg system-crontab system-man test-rust threads tiff timidity truetype udev udisks unicode upnp upower usb v4l vaapi vdpau vorbis vulkan wallpapers wav wayland widgets wired wxwidgets x264 xattr xcb xcsecurity xft xml xorg xscreensaver xv xvid zeroconf zlib zstd" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio 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 sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" 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-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby31" SANE_BACKENDS="hp" VIDEO_CARDS="fbdev vesa dummy v4l lavapipe amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account" YACC="byacc" Unset: ARFLAGS, ASFLAGS, CCLD, CONFIG_SHELL, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, SIZE, YFLAGS ================================================================= Package Settings ================================================================= sys-boot/grub-2.12-r2::gentoo was built with the following: USE="fonts nls sdl themes truetype -device-mapper -doc -efiemu -libzfs -mount (-test) -verify-sig" ABI_X86="(64)" GRUB_PLATFORMS="efi-64 pc -coreboot -efi-32 -emu -ieee1275 (-loongson) -multiboot -qemu (-qemu-mips) -uboot -xen -xen-32 -xen-pvh" CFLAGS="" CXXFLAGS="-march=znver2 -pipe -minline-all-stringops -ftree-vectorize -O2 -fno-plt -ftrivial-auto-var-init=pattern -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fstack-protector-strong -fcf-protection -fPIC -ggdb3" FEATURES="sfperms news preserve-libs userpriv ebuild-locks nostrip sandbox unknown-features-warn strict pkgdir-index-trusted buildpkg-live unmerge-orphans binpkg-logs binpkg-multi-instance assume-digests binpkg-docompress usersandbox distlocks xattr usersync merge-sync parallel-fetch pid-sandbox config-protect-if-modified unmerge-logs qa-unresolved-soname-deps network-sandbox multilib-strict protect-owned binpkg-dostrip fixlafiles userfetch ipc-sandbox" LDFLAGS=""
Created attachment 889287 [details] Build Log
Created attachment 889288 [details] Config Log
From config.log: configure:36855: checking for options to get soft-float configure:37004: clang -c -std=gnu99 -fno-common -Os -m32 -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -march=i386 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow -msoft-float -Xclang -msoft-float -Xclang -no-implicit-float -Werror -Wall -W -DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC conftest.c >&5 error: option 'cf-protection=return' cannot be specified on this target error: option 'cf-protection=branch' cannot be specified on this target 2 errors generated.
I'm guessing this is added via some clang config file.
I will need the llvm team to figure out how to handle this.
A simple test case: % cat conftest.c int main(void) { return 0; } % gcc -m32 -march=i386 -c conftest.c % clang -m32 -march=i386 -c conftest.c error: option 'cf-protection=return' cannot be specified on this target error: option 'cf-protection=branch' cannot be specified on this target 2 errors generated.
It looks like gcc -m32 automatically excludes -fcf-protection=full. I think clang-common should be adjusted to do the same in the i386 config files.
Is there a way I can work around this until it gets resolved, so I can finish the transition from 17.1 to the 23.0 profile? I found the config files I think you're referring to; for i386, it just gets redirected several times until it reaches gentoo-hardened.cfg
(In reply to Neko-san from comment #8) You could remove "-Xarch_host -fcf-protection=full" from /etc/clang/gentoo-hardened.cfg, or reinstall sys-devel/clang-common with the "cet" USE flag disabled.
Got it. Thanks
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cec5808b1344015de6492ef6728fde3c6040b35f commit cec5808b1344015de6492ef6728fde3c6040b35f Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2024-04-03 18:58:17 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2024-04-04 16:49:06 +0000 sys-devel/clang-common: apply cet config for x86_64 only Closes: https://bugs.gentoo.org/928460 Signed-off-by: Mike Gilbert <floppym@gentoo.org> ...-17.0.6-r4.ebuild => clang-common-17.0.6-r5.ebuild} | 18 +++++++++++++----- ...-18.1.2-r3.ebuild => clang-common-18.1.2-r4.ebuild} | 18 +++++++++++++----- sys-devel/clang-common/clang-common-19.0.0.9999.ebuild | 18 +++++++++++++----- ...build => clang-common-19.0.0_pre20240322-r2.ebuild} | 18 +++++++++++++----- ...build => clang-common-19.0.0_pre20240330-r1.ebuild} | 18 +++++++++++++----- 5 files changed, 65 insertions(+), 25 deletions(-)
*** Bug 928940 has been marked as a duplicate of this bug. ***
*** Bug 827856 has been marked as a duplicate of this bug. ***
Created attachment 892021 [details, diff] clang-common-18.1.4-r3.ebuild.patch
(In reply to nvinson234 from comment #14) > Created attachment 892021 [details, diff] [details, diff] > clang-common-18.1.4-r3.ebuild.patch Please disregard this attachment. I added it to the wrong bug.
Comment on attachment 892021 [details, diff] clang-common-18.1.4-r3.ebuild.patch >Backported patch from bug 928460 > >--- /home/nvinson/Repos/gentoo/sys-devel/clang-common/clang-common-18.1.4-r3.ebuild 2024-04-30 11:26:12.647284492 -0400 >+++ /home/nvinson/Repos/magpie/sys-devel/clang-common/clang-common-18.1.4-r3.ebuild 2024-04-30 11:29:40.427283500 -0400 >@@ -71,10 +71,15 @@ _doclang_cfg() { > newins - "${tool}.cfg" <<-EOF > # This configuration file is used by ${tool} driver. > @gentoo-common.cfg > @gentoo-common-ld.cfg > EOF >+ if [[ ${triple} == x86_64* ]]; then >+ cat >> "${ED}/etc/clang/${tool}.cfg" <<-EOF || die >+ @gentoo-cet.cfg >+ EOF >+ fi > done > > if use kernel_Darwin; then > cat >> "${ED}/etc/clang/${triple}-clang++.cfg" <<-EOF || die > -lc++abi >@@ -83,10 +88,15 @@ _doclang_cfg() { > > newins - "${triple}-clang-cpp.cfg" <<-EOF > # This configuration file is used by the ${triple}-clang-cpp driver. > @gentoo-common.cfg > EOF >+ if [[ ${triple} == x86_64* ]]; then >+ cat >> "${ED}/etc/clang/${triple}-clang-cpp.cfg" <<-EOF || die >+ @gentoo-cet.cfg >+ EOF >+ fi > > # Install symlinks for triples with other vendor strings since some > # programs insist on mangling the triple. > local vendor > for vendor in gentoo pc unknown; do >@@ -173,15 +183,13 @@ src_install() { > -Xarch_host -fstack-protector-strong > -fPIE > -include "${EPREFIX}/usr/include/gentoo/fortify.h" > EOF > >- if use amd64; then >- cat >> "${ED}/etc/clang/gentoo-hardened.cfg" <<-EOF || die >- -Xarch_host -fcf-protection=$(usex cet full none) >- EOF >- fi >+ newins - gentoo-cet.cfg <<-EOF >+ -Xarch_host -fcf-protection=$(usex cet full none) >+ EOF > > if use kernel_Darwin; then > newins - gentoo-hardened-ld.cfg <<-EOF > # There was -Wl,-z,relro here, but it's not supported on Mac > # TODO: investigate whether -bind_at_load or -read_only_stubs will do the job
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=419c393e7c673893092cf1784ea456b1227ef5db commit 419c393e7c673893092cf1784ea456b1227ef5db Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2024-04-30 17:53:59 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2024-04-30 17:53:59 +0000 sys-devel/clang-common: reapply cet config for x86_64 only This got dropped by accident. Bug: https://bugs.gentoo.org/928460 Fixes: f6674da9ede829fbb18e97530ca10b48d0f37e29 Signed-off-by: Mike Gilbert <floppym@gentoo.org> ...-18.1.4-r3.ebuild => clang-common-18.1.4-r4.ebuild} | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)
*** Bug 930983 has been marked as a duplicate of this bug. ***
Okay, there are still some kinks to iron out, and I'm not qualified to do that.