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

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -