Figure out correct place for `-fstack-check`
N.B. During development in !9263 (merged) we came across multiple tasks and bugs regarding the configuration script. In preparation of merging it, we're opening tickets for the leftover tasks both regarding the new ghc-toolchain and the toolchain logic in configure. This is one of those tickets.
Currently m4/fptools_set_c_ld_flags.m4 adds -fstack-check in the linking cc flags on Windows. However, -fstack-check is almost certainly a code-generation flag. How this is currently having any effect is quite mysterious.
The mission is as follows:
- Confirm that
-fstack-checkis in fact a code generation flag - Work out why things aren't broken under the status quo
- Move
-fstack-checkto the compilationccflags if appropriate
Edited by Ben Gamari