libHSrts_thr_debug linked against non-existing bfd library
It seems there is a bug in RTS somewhere which makes libHSrts_thr_debug in a way it's including some symbols from the bfd library. The bug shows itself as a lot of testsuite tests failing with undefined symbols which originates in the BFD library. Example:
=====> cg013(threaded1)
cd ./codeGen/should_run && '/buildbot/ghc/kgardas/build/compiler/stage2/ghc-inplace' -no-recomp -dcore-lint -dcmm-lint -Di386_unknown_solaris2 -o cg013 cg013.hs -threaded -debug >cg013.comp.stderr 2>&1
Compile failed (status 256) errors were:
Undefined first referenced
symbol in file
bfd_openr /buildbot/ghc/kgardas/build/rts/libHSrts_thr_debug.a(Printer.thr_debug_o)
bfd_init /buildbot/ghc/kgardas/build/rts/libHSrts_thr_debug.a(Printer.thr_debug_o)
bfd_check_format_matches /buildbot/ghc/kgardas/build/rts/libHSrts_thr_debug.a(Printer.thr_debug_o)
ld: fatal: Symbol referencing errors. No output written to cg013
collect2: ld returned 1 exit status