-
Notifications
You must be signed in to change notification settings - Fork 691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression over 3.6 concerning ghc-options
-pgmP
-optP
#8058
Comments
I cannot reproduce this on Ubuntu, I think this is Which is weird, as there is no I don't know what EDIT: I see, the whole snippet from
|
You could try whether touch foo.c
ghc -optP -traditional -v3 -c -o foo.o foo.c
# or/and
ghc -pgmP cpp-11 -optP -traditional -v3 -c -o foo.o foo.c works on your machine. |
I'm tempted to close this as " Why they need to change c preprocessor and specify it to traditional? When compiling Haskell CPP is run in |
Thinking a bit more: GHC ought should have different flags for Haskell CPP and C CPP. Now they are the same So I don't see how this can be fixed so " |
I figured the problem. It's indeed GHC-8.8.4 (and later, 8.10, 9.0, 9.2) issue.
i.e. it passes I'd suggest @andreasabel to open GHC issue about this. |
Great analysis, @phadej!
I can confirm that this works up to GHC 8.6, e.g.
But it breaks from GHC 8.8 upward, e.g.:
I can also confirm that
works even with So the summary about
|
I found an upstream issue that looks related enough: https://gitlab.haskell.org/ghc/ghc/-/issues/17185 Here is a relevant comment from the discussion there (by @bgamari):
|
If that's mostly likely an upstream issue, let me remove the alarming label. |
Fine with me. I think I put
|
Phenomenon: The following incantation works on macOS with
cabal-install
3.6, but not with the version frommaster
:With
master
this gives an error about a rejected option-traditional
to the C compiler.fugets.cabal
contains the following configuration line:This option might be propagated to the wrong place.
It should be investigated if this regression was caused by:
(PRs: Rebase #5440: Respect ghc-options and with-gcc when compiling C sources #7874 Update #7874: Add test, fix changelog #7900)
The text was updated successfully, but these errors were encountered: