On 9/5/19 11:25 PM, Tim Rice wrote:
I have a use case where I would like gcc to accept -Kthread
and act as if it was passed -pthread. So -Kthread would
be a synonym for -pthread.
I am having trouble figuring out how the option processing is handled.
Possibly in gcc/gcc.c but I am stumped here.
Any pointers would be welcome.
Thanks.
The first thing is why don't you just create a alias in your shell for
this. If not
you also have to understand -lpthread is a linker to link in the
library. If you
really require to do then you will need to rewrite parts of the C++/C
frontends.
Here is a link to what you will need to read:
https://gcc.gnu.org/onlinedocs/gccint/Front-End.html#Front-End
Mostly it's adding the option so the first link should help it seems for
understanding
a frontend directory,
Nick