Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 952923 - www-client/chromium-135.0.7049.41: pkg_pretend fails: x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option
Summary: www-client/chromium-135.0.7049.41: pkg_pretend fails: x86_64-pc-linux-gnu-gcc...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Chromium Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-30 05:52 UTC by Blacktea Hamburger
Modified: 2025-03-30 19:26 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,1.85 KB, text/x-log)
2025-03-30 05:52 UTC, Blacktea Hamburger
Details
emerge --info (emerge.info,21.37 KB, text/plain)
2025-03-30 05:53 UTC, Blacktea Hamburger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Blacktea Hamburger 2025-03-30 05:52:28 UTC
Created attachment 923278 [details]
build.log

I set the following flags:
CFLAGS="-march=native -O2 -mllvm=-polly -pipe"
CXXFLAGS="${CFLAGS}"
FCFLAGS="${CFLAGS}"
FFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"

This error occurs when there are options that gcc does not recognize in CFLAGS only. This is because tc-is-lto is called in pkg_pretend, which calls the compiler to compile to confirm whether tc is lto. But clang has not yet been forced, so it call the default compiler gcc, which results in not being able to specify clang-specific options in CFLAGS (reasonable if custom-cflags is set), unless to force clang manually:

CC="clang"
CXX="clang++"
CPP="clang-cpp"
AR="llvm-ar"
NM="llvm-nm"
RANLIB="llvm-ranlib"

This is annoying because forcing clang in the ebuild would have been enough.
Comment 1 Blacktea Hamburger 2025-03-30 05:53:12 UTC
Created attachment 923279 [details]
emerge --info