PF4Public / gentoo-overlay

Personal Gentoo overlay

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

www-client/ungoogled-chromium-124.0.6367.201_p1: AVX vector without evex512 enabled changes the ABI

crabbedhaloablution opened this issue · comments

Chromium fails to build with clang-18.1.5 using -march=native on non-avx512 host.

Example error message:
../../third_party/skia/modules/skcms/src/Transform_inl.h:862:9: error: AVX vector return of type 'float attribute((ext_vector_type(16)))' (vector of 16 'float' values) without 'evex512' enabled changes the ABI
862 | r = cast((abgr >> 12) & 0xf) * (1/15.0f);

See https://bugs.gentoo.org/931623 for details and discussion

Gentoo chromium ebuild implemented a workaround:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8cb01633a28dad0dd4f2bfb43262ae987429fa1f

	if tc-is-clang; then
		myconf_gn+=" is_clang=true clang_use_chrome_plugins=false"
		# Workaround for build failure with clang-18 and -march=native without
		# avx512. Does not affect e.g. -march=skylake, only native (bug #931623).
		use amd64 && is-flagq -march=native &&
			[[ $(clang-major-version) -ge 18 ]] &&
			tc-cpp-is-true "!defined(__AVX512F__)" ${CXXFLAGS} &&
			append-flags -mevex512
	else
		myconf_gn+=" is_clang=false"
	fi

Have you seen #336?

No I’d mentally filtered it out by just looking at the package name but it’s the same bug, different package obviously

I'll close your bug in favour of the other one.