On 03/12/2014 13:25, Joachim Breitner wrote:
Hi,


Am Mittwoch, den 03.12.2014, 13:22 +0000 schrieb Simon Marlow:
At a guess, you could try this:

--- a/testsuite/tests/rts/Makefile
+++ b/testsuite/tests/rts/Makefile
@@ -124,7 +124,7 @@ linker_unload:
          $(RM) Test.o Test.hi
          "$(TEST_HC)" $(TEST_HC_OPTS) -c Test.hs -v0
          # -rtsopts causes a warning
-       "$(TEST_HC)" $(filter-out -rtsopts, $(TEST_HC_OPTS))
linker_unload.c -o linker_unload -no-hs-main -optc-Werror -debug -optc-g
+       "$(TEST_HC)" $(filter-out -rtsopts, $(TEST_HC_OPTS))
linker_unload.c -o linker_unload -no-hs-main -optc-Werror -debug -optc-g
-lgmp
          ./linker_unload $(BASE) $(GHC_PRIM) $(INTEGER_GMP)

no, does not help, as -lgmp is already passed to gcc by ghc:


         /usr/bin/gcc -fno-stack-protector -DTABLES_NEXT_TO_CODE -o
         linker_unload linker_unload.o
         -L/data1/ghc-builder/ghc-master/libraries/base/dist-install/build 
-L/data1/ghc-builder/ghc-master/libraries/integer-gmp2/dist-install/build 
-L/data1/ghc-builder/ghc-master/libraries/ghc-prim/dist-install/build 
-L/data1/ghc-builder/ghc-master/rts/dist/build /tmp/ghc26637_1/ghc26637_4.o 
/tmp/ghc26637_1/ghc26637_6.o -Wl,-u,ghczmprim_GHCziTypes_Izh_static_info 
-Wl,-u,ghczmprim_GHCziTypes_Czh_static_info 
-Wl,-u,ghczmprim_GHCziTypes_Fzh_static_info 
-Wl,-u,ghczmprim_GHCziTypes_Dzh_static_info 
-Wl,-u,base_GHCziPtr_Ptr_static_info 
-Wl,-u,ghczmprim_GHCziTypes_Wzh_static_info 
-Wl,-u,base_GHCziInt_I8zh_static_info -Wl,-u,base_GHCziInt_I16zh_static_info 
-Wl,-u,base_GHCziInt_I32zh_static_info -Wl,-u,base_GHCziInt_I64zh_static_info 
-Wl,-u,base_GHCziWord_W8zh_static_info -Wl,-u,base_GHCziWord_W16zh_static_info 
-Wl,-u,base_GHCziWord_W32zh_static_info -Wl,-u,base_GHCziWord_W64zh_static_info 
-Wl,-u,base_GHCziStable_StablePtr_static_info 
-Wl,-u,ghczmprim_GHCziTypes_Izh_con_info -Wl,-u,ghczmp
rim_GHCziTypes_Czh_con_info -Wl,-u,ghczmprim_GHCziTypes_Fzh_con_info 
-Wl,-u,ghczmprim_GHCziTypes_Dzh_con_info -Wl,-u,base_GHCziPtr_Ptr_con_info 
-Wl,-u,base_GHCziPtr_FunPtr_con_info -Wl,-u,base_GHCziStable_StablePtr_con_info 
-Wl,-u,ghczmprim_GHCziTypes_False_closure 
-Wl,-u,ghczmprim_GHCziTypes_True_closure 
-Wl,-u,base_GHCziPack_unpackCString_closure 
-Wl,-u,base_GHCziIOziException_stackOverflow_closure 
-Wl,-u,base_GHCziIOziException_heapOverflow_closure 
-Wl,-u,base_ControlziExceptionziBase_nonTermination_closure 
-Wl,-u,base_GHCziIOziException_blockedIndefinitelyOnMVar_closure 
-Wl,-u,base_GHCziIOziException_blockedIndefinitelyOnSTM_closure 
-Wl,-u,base_GHCziIOziException_allocationLimitExceeded_closure 
-Wl,-u,base_ControlziExceptionziBase_nestedAtomically_closure 
-Wl,-u,base_GHCziEventziThread_blockedOnBadFD_closure 
-Wl,-u,base_GHCziWeak_runFinalizzerBatch_closure 
-Wl,-u,base_GHCziTopHandler_flushStdHandles_closure 
-Wl,-u,base_GHCziTopHandler_runIO_closure -Wl,-u,base_GHCziTopHandler_run
NonIO_closure -Wl,-u,base_GHCziConcziIO_ensureIOManagerIsRunning_closure 
-Wl,-u,base_GHCziConcziIO_ioManagerCapabilitiesChanged_closure 
-Wl,-u,base_GHCziConcziSync_runSparks_closure 
-Wl,-u,base_GHCziConcziSignal_runHandlers_closure 
-lHSbase_469rOtLAqwTGFEOGWxSUiQ -lHSinteg_21cuTlnn00eFNd4GMrxOMi 
-lHSghcpr_FgrV6cgh2JHBlbcx1OSlwt -lHSrts_debug -lCffi
          -lgmp -lm -lrt -ldl '-Wl,--hash-size=31'
         -Wl,--reduce-memory-overheads

but due to --no-needed, and linker_unload indeed not requiring any
symbols from gmp, the linker does not link it.

Ok, I was afraid of that. The test needs to be fixed to explicitly dlopen("libgmp"). I'll take a look at it today.

Cheers,
Simon
_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs

Reply via email to