haskell - Why is GHC distributed with gcc and g++? -


on windows, ghc distributed gcc , g++, e.g. under ghc-7.6.3\mingw\bin. download page, noted under windows binary download build windows "also includes support compiling c++ files."

i imagine distributing these compilers convenience, since windows doesn't come any. imagine necessary using ffi, i'm not 100% sure. instance, although ghc compile .c , .cpp files using it's own gcc/g++ compilers, ghc provides options choose whichever compiler , linker want. , indeed, can specify own gcc/g++ , seems work. can cut ghc out of loop little further compiling .c/.cpp files in advance, , invoking ghc compile haskell code , link using -pgml (although overall effect same using -pgmc , -pgml).

now seems work, rely on pure luck specify -pgml , -pgmc version of gcc compatible ghc has in mind? in other words, when use ffi, supposed compile , link ghc invocations?

ghc compatible many/several versions of gcc (the incompatibilities appear when using evil mangler).

if try using other c compilers, you'll have few low level issues contend (flags, asm formats).

note more recent ghcs deprecate c backend in favor of llvm backend, making moot day-to-day haskell development.


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -