Compiling ghc with -fPIC support

前端 未结 2 753
情话喂你
情话喂你 2021-01-03 22:29

I\'m trying to install GHC with -fPIC support in Fedora. I\'ve grabbed a source tarball since it seems no binary one has this.

In Build.mk i\'ve changed the quick bu

2条回答
  •  無奈伤痛
    2021-01-03 23:15

    After you see this error, do the following:

    cd /tmp/Hs2lib924498/
    ghc -fglasgow-exts --make -shared -oHs2lib.a /tmp/Hs2lib924498/Hs2lib.hs dllmain.o -static -fno-warn-deprecated-flags -fPIC -O2 -package ghc -package Hs2lib -i/home/phyx/Documents/Haskell/Hs2lib -optl-Wl,-s -funfolding-use-threshold=16 -optc-O3 -optc-ffast-math
    

    Note I added -fPIC to the failed ghc command.

    Once the command succeeds, continue the compilation from within the tmp directory without cleaning already compiled files. It should skip them and continue where it ended.

提交回复
热议问题