Include path for preprocessed assembly sources (`.S`)
Summary
The include path for preprocessed assembly sources (.S
) should be aligned with C sources (.c
) and Cmm sources (.cmm
) and Haskell sources with CPP (.hs
).
In particular, the LEADING_UNDERSCORE
macro defined in rts (ghcautoconf.h
or ghcconfig.h
) would be useful in assembly source.
Steps to reproduce
$ cat foo.c
#include "ghcconfig.h"
$ cat foo.cmm
#include "ghcconfig.h"
$ cat foo.S
#include "ghcconfig.h"
$ ghc -c foo.cmm # OK
$ ghc -c foo.c # OK
$ ghc -c foo.S
foo.S:1:10: error: fatal error: 'ghcconfig.h' file not found
|
1 | #include "ghcconfig.h"
| ^
#include "ghcconfig.h"
^~~~~~~~~~~~~
1 error generated.
`gcc' failed in phase `Assembler'. (Exit code: 1)
Expected behavior
ghc -c foo.S
should assemble.
Environment
- GHC version used: 9.11.20240518 (bb40244e)
- Operating System: macOS
- System Architecture: AArch64