Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 940762 - Allow LLVM/Clang to own /usr/bin/{cc,c++,cpp,as,objdump,…}
Summary: Allow LLVM/Clang to own /usr/bin/{cc,c++,cpp,as,objdump,…}
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-04 17:48 UTC by Marco Rebhan
Modified: 2024-10-07 03:54 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Rebhan 2024-10-04 17:48:26 UTC
Right now, the generic C/C++ compiler and binutils binaries are exclusively owned by the GNU toolchain (gcc, GNU binutils) as far as I can see looking at gcc-config and binutils-config. It would be great, especially for LLVM profile, to be able to have them owned by LLVM so they are used by default outside of Portage (e.g. CMake selects the compiler at /usr/bin/cc which is currently always gcc).

There's of course a workaround right now, that is to set the same environment variables (CC, CXX, ...) as output by emerge --info in your user environment. Caveat is that some build scripts might not respect them and it's also harder to update the environment for a whole running user session than swapping out the symlinks.
Comment 1 Arsen Arsenović gentoo-dev 2024-10-06 22:32:09 UTC
AFAIK the LLVM binutils aren't really binutils in that they're very underimplemented (especially AS).  If we want to make the profile vars consistent with /bin/ we should probably just remove the vars.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-10-07 03:54:03 UTC
That's what sys-devel/*-toolchain-symlinks[native-symlinks] do.