Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 926160 - sys-devel/gcc: gcc does not honor installed gcc-plugins in short notation
Summary: sys-devel/gcc: gcc does not honor installed gcc-plugins in short notation
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-04 13:44 UTC by Christian Tramnitz
Modified: 2024-03-05 08:48 UTC (History)
1 user (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 Christian Tramnitz 2024-03-04 13:44:45 UTC
gcc (afaict all available versions) emerge breaks with gcc-plugins in short-notation in CFLAG. The plugin is not available, i.e. during libgcc stage1 build, I assume due to changed root/plugin-include directories during staging.
It seems to work when including the plugin with the full path though.

Reproducible: Always

Steps to Reproduce:
1. Install an arbitrary gcc-plugin
2. Include it in CFLAGS using short plugin name
3. Rebuild gcc
4. gcc build breaks due to inaccessible plugin
Actual Results:  
cc1: fatal error: inaccessible plugin file plugin/<plugin-name>.so expanded from short plugin name <plugin-name>: No such file or directory


I'm not sure what the expected behavior is, probably either one of
1) strip gcc-plugins plugins entirely during gcc rebuild (current flag-o-matic strip-flags has -fplugin in its ALLOW_LIST though)
2) Use pre-existing gcc-plugins during gcc rebuild (this would require honoring the existing plugin-dir in all but may also break on gcc plugin ABI changes)
3) rebuild plugins as part of the gcc staging (https://gcc.gnu.org/onlinedocs/gccint/plugins/building-gcc-plugins.html seems to indicate that gcc would have access to necessary headers to rebuild a plugin [if needed?])

But in any case, some sort of gcc-plugin handling seems to be required.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-05 01:13:41 UTC
I've only ever used a manual GCC plugin once. Otherwise, just the stuff in the kernel.

Could you give a full example which I can use (inc. actual *FLAGS)? Ideally including some dummy GCC plugin too (or show me where to find one).