This repository has been archived by the owner on Sep 20, 2023. It is now read-only.
Fix for "unknown symbol `___divmoddi4'" on 32-bit mingw builds #503
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.
Hi there,
I've ran into a trouble in my project while building it with 32-bit GHC 8.4.3 on Windows (MinGW).
I'm doing an upgrade from quite an ancient GHC 7.10.3, but this upgrade went OK on Linux but on Windows I got an error like this one:
After some googling I found this story https://ghc.haskell.org/trac/ghc/ticket/15094 which describes pretty much everything about this - it's GHC/toolchain bug, when a 32-bit compiler inserts an instrinsic instead of instruction but forgets to reference the libgcc. So it needs to be referenced explicitly.
Unfortunately this cannot be done in dependent project, only in the project where all that replacement is introduced. And I guess this is the C bit of the foundation library, namely the cbits/foundation_time.c.
With the proposed change to the foundation.cabal and rebuilding the foundation library with that change, - my project has built successfully as well.
So this is a workaround for still broken GCC but could you please accept this, - otherwise the whole bunch of libraries become unusable with those GHC who uses GCC 7 on 32-bit MinGW (that's modern 8.4). Thank you in advance.