On Tue, 10 Aug 2021, Sebastian Huber wrote: > Ok, I understood how I can add a compiler provided define for libgcov. What is > not clear to me is how I can add a target hook, set a default value, and > customize it for a target/system. Is this described here > > https://gcc.gnu.org/onlinedocs/gccint/Target-Structure.html
Yes. It's simplest when the hook definition depends only on the target architecture and not the target OS, but you can work around that when the OS affects the definition (have an architecture-specific function used as the hook definition, with a #if condition inside that function based on definitions from architecture-and-OS-specific headers, for example). -- Joseph S. Myers jos...@codesourcery.com