-
Notifications
You must be signed in to change notification settings - Fork 696
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
Backport to 3.2 20201025 #7134
Merged
Merged
Backport to 3.2 20201025 #7134
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Many toolchain tools written for POSIX systems rely on the exec system call. Unfortunately, it is not possible to implement `exec` in a POSIX-compliant manner on Windows. In particular, the semantics of the `exec` implementation provided by the widely-used `msvcrt` C runtime will cause process's waiting on the `exec`'ing process to incorrectly conclude that the process has successfully terminated when in fact it is still running in another process. For this reason, the `process` library exposes the `use_process_jobs` flag to use a more strict (although still not POSIX-compliant) mechanism for tracking process completion. This is explained in this comment [2]. Unfortunately, job support in the `process` library is currently quite broken and was only recently fixed [1]. Consequently, we only enable job object support for process releases >= 1.6.8. [1] haskell/process#168 [2] https://github.com/haskell/process/blob/master/System/Process.hs#L399
This looks like an accident from a6e427a It causes cases like this to fail: $ cat foo.c int foo() { return 42; } $ cat Lib.hs module Lib where foreign import ccall "foo" foo :: Int bar = foo $ cat cabal-csrc-repl.cabal cabal-version: 2.4 name: cabal-csrc-repl version: 0.1.0.0 library exposed-modules: Lib build-depends: base ^>=4.14.0.0 C-sources: foo.c default-language: Haskell2010 $ cabal v2-repl Resolving dependencies... Build profile: -w ghc-8.10.1 -O1 In order, the following will be built (use -v for more details): - cabal-csrc-repl-0.1.0.0 (lib) (first run) Configuring library for cabal-csrc-repl-0.1.0.0.. Preprocessing library for cabal-csrc-repl-0.1.0.0.. GHCi, version 8.10.1: https://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Lib ( Lib.hs, interpreted ) Ok, one module loaded. *Lib> foo ghc: ^^ Could not load '_foo', dependency unresolved. See top entry above.
Google uses `armv7-none-linux-androideabi`, analogous to `armv7-unknown-linux-gnueabi` for e.g. a 32-bit regular linux. The existing alias it not a mistake, it is the right one for 64 bit. Google for that use `aarch64-linux-android`, analogous to `aarch64-unknown-linux-android` for a 64-bi regular linux. See https://developer.android.com/ndk/guides/standalone_toolchain for evidence/details.
Fixes haskell#6421 To summarize, Cabal passes all C and C++ flags through GHC to the underlying C or C++ compiler using -optc. This works for GHC < 8.10, but now GHC expects C++ flags to come through -optcxx. This means that anything through -optc is ignored, so we cannot pass any flags to the C++ compiler. This change simply detects the GHC version and uses the correct arguments. This PR has been tested manually and two PackageTests have been added to cabal-testsuite. They pass under GHC 8.8.4 and GHC 8.10.2.
E.g. `foo/../../../bar` is now forbidden. That cannot work.
phadej
force-pushed
the
backport-to-3.2-20201025
branch
2 times, most recently
from
October 25, 2020 14:50
f4791d6
to
5353990
Compare
phadej
force-pushed
the
backport-to-3.2-20201025
branch
from
October 25, 2020 15:06
5353990
to
3ccf5ba
Compare
This was referenced Oct 26, 2020
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backports