Compiling with "-Os" set in /etc/portage/make.conf: CFLAGS="-march=native -mtune=native -Os -fomit-frame-pointer -pipe -fstack-protector-strong" CXXFLAGS="${CFLAGS}" gives the following fail during emerge: /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.1/../../../../x86_64-pc-linux-gnu/bin/ld: lib/../Source/WebCore/CMakeFiles/WebCore.dir/__/__/WebCore/DerivedSources/unified-sources/UnifiedSource-68aea4ac-6.cpp.o: in function `WebCore::getBackingMap(JSC::JSGlobalObject&, JSC::J SObject&)': UnifiedSource-68aea4ac-6.cpp:(.text+0x6143): undefined reference to `JSC::HashMapImpl<JSC::HashMapBucket<JSC::HashMapBucketDataKeyValue> >::finishCreation(JSC::JSGlobalObject*, JSC::VM&)' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. * ERROR: net-libs/webkit-gtk-2.36.1::gentoo failed (compile phase): * ninja -v -j7 -l0 failed * * Call stack: * ebuild.sh, line 127: Called src_compile * environment, line 4029: Called cmake_src_compile * environment, line 1755: Called cmake_build * environment, line 1724: Called eninja * environment, line 2250: Called die * The specific snippet of code: * "$@" || die "${nonfatal_args[@]}" "${*} failed" The ld fail occurs for each of: net-libs/webkit-gtk-2.36.1 net-libs/webkit-gtk-2.36.2 net-libs/webkit-gtk-2.36.3 Workaround: Compiling using instead "-O3" completes fine. (Use of -O3 specifically for net-libs/webkit-gtk can be set using /etc/portage/package.env) FYI: $ ninja --version 1.11.0 $ gcc --version gcc (Gentoo 11.3.0 p4) 11.3.0 $ ld --version ls (GNU coreutils) 8.32 Packaged by Gentoo (8.32-r1 (p0))
Please include the full build.log and emerge --info.
Created attachment 786347 [details] var_tmp_portage_net-libs_webkit-gtk-2.36.3_temp_with-Os-build.log
Created attachment 786350 [details] var_tmp_portage_net-libs_webkit-gtk-2.36.3_temp_with-Os-environment
Created attachment 786353 [details] emerge--info_with-Os-build.txt
Created attachment 786356 [details] emerge-1v-webkit-gtk-2.36.3_with-O3_build.log
(In reply to Sam James from comment #1) > Please include the full build.log and emerge --info. Attached as listed above for the failed case for building with -Os (gcc-11.3.0). There is also a successful build log attached for the example for using -O3 set in /etc/portage/make.conf (For some reason, bugs.gentoo.org gives a server error for attempting to upload any further attachments...) Aside: Using -Os with gcc-10.3.1 gives the same ld fail. And /etc/portage/package.env appears to be ignored for attempting to set -O3 in there for webkit. Another bug to note? Regards, Martin
Also note the current similar bug for https://bugs.gentoo.org/840861 ?
(In reply to Martin from comment #6) > (In reply to Sam James from comment #1) > > Please include the full build.log and emerge --info. > > Attached as listed above for the failed case for building with -Os > (gcc-11.3.0). > > > There is also a successful build log attached for the example for using -O3 > set in /etc/portage/make.conf > > (For some reason, bugs.gentoo.org gives a server error for attempting to > upload any further attachments...) This usually happens when trying to attach a file your user can't access. It's a bad error message. > > > Aside: > > Using -Os with gcc-10.3.1 gives the same ld fail. > > And /etc/portage/package.env appears to be ignored for attempting to set -O3 > in there for webkit. Another bug to note? > Not sure why that'd be. It should work fine. But I'd use -O2. > > Regards, > Martin