Skip to content

Use Base.o_* instead of raw {#const O_*} #339

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GulinSS
Copy link
Contributor

@GulinSS GulinSS commented Apr 25, 2025

stage1 cross compilers can use different values instead of system-defined. GHC JS Backend overrides these constants to be compatible with Node.js environment.

Details of investigation.

Interface stability tests have the following overridden constants:

  o_APPEND :: GHC.Internal.Foreign.C.Types.CInt
  o_BINARY :: GHC.Internal.Foreign.C.Types.CInt
  o_CREAT :: GHC.Internal.Foreign.C.Types.CInt
  o_EXCL :: GHC.Internal.Foreign.C.Types.CInt
  o_NOCTTY :: GHC.Internal.Foreign.C.Types.CInt
  o_NONBLOCK :: GHC.Internal.Foreign.C.Types.CInt
  o_RDONLY :: GHC.Internal.Foreign.C.Types.CInt
  o_RDWR :: GHC.Internal.Foreign.C.Types.CInt
  o_TRUNC :: GHC.Internal.Foreign.C.Types.CInt
  o_WRONLY :: GHC.Internal.Foreign.C.Types.CInt

@GulinSS GulinSS marked this pull request as draft April 25, 2025 16:38
@GulinSS
Copy link
Contributor Author

GulinSS commented Apr 25, 2025

Set to draft while https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13856 is in progress

`stage1` cross compilers could use different values instead of
system-defined. GHC JS Backend change these constants to be compatible
with Node.js environment.
@GulinSS
Copy link
Contributor Author

GulinSS commented Apr 25, 2025

It became actual after

https://gitlab.haskell.org/ghc/ghc/-/issues/25190
https://gitlab.haskell.org/ghc/ghc/-/issues/23697

Which were raised after

haskell/cabal#10366

These changes are for restoring consistency across cross compile targets with packages which have custom Setup.hs build rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant