Is there a preprocessor macro, constant or something similar in C++ that can be used to tell if a translation unit is being compiled with segmented stacks (i.e. with -fsplit-stack
)?
Answers for any compiler would be good but I am looking for clang and gcc in particular
According to this gcc wiki page, the preprocessor gets TARGET_SUPPORTS_SPLIT_STACK
and the runtime gets bool supports_split_stack()
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With