FreeBSD 10.3 toolchain is terribly broken
clang
, ld.bfd
with SplitSections=NO
Fails in the final bindist test with,
/usr/bin/install -c -m 755 libraries/gen_contents_index "/usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/test/inst/share/doc/ghc-8.2.1.20170929/html/libraries/"
[1 of 1] Compiling Main ( /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/test/hi.hs, /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/test/hi.o )
Linking /usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/test/hi ...
/usr/bin/ld: Base__199.o: access beyond end of merged section (-24)
/usr/bin/ld: Base__201.o: access beyond end of merged section (-24)
...
clang
, ld.bfd
with SplitSections=YES
fails with,
bindisttest/"install dir"/bin/ghc --make bindisttest/HelloWorld
[1 of 1] Compiling Main ( bindisttest/HelloWorld.lhs, bindisttest/HelloWorld.o )
Linking bindisttest/HelloWorld ...
/usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/ghc/bindisttest/install dir/lib/ghc-8.2.1.20170929/base-4.10.0.0/libHSbase-4.10.0.0.a(Base.o):base_ControlziExceptionziBase_absentError_info: warning: relocation refers to discarded section
/usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/ghc/bindisttest/install dir/lib/ghc-8.2.1.20170929/base-4.10.0.0/libHSbase-4.10.0.0.a(Base.o)(.text.r3zN_info+0x44): warning: relocation refers to discarded section
/usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/ghc/bindisttest/install dir/lib/ghc-8.2.1.20170929/base-4.10.0.0/libHSbase-4.10.0.0.a(Base.o)(.text.r3zP_info+0x44): warning: relocation refers to discarded section
/usr/home/ben/bin-dist-8.2.1.20170929-FreeBSD/ghc/bindisttest/install dir/lib/ghc-8.2.1.20170929/base-4.10.0.0/libHSbase-4.10.0.0.a(Base.o)(.text.r3zR_info+0x44): warning: relocation refers to discarded section
...
clang
, ld.gold
, SplitSections=NO
...
gcc
, ld.gold
, SplitSections=NO
/usr/local/bin/ld.gold: fatal error: cannot mix -r with dynamic object /usr/lib/libthr.so
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
gmake[1]: *** [iserv/ghc.mk:93: iserv/stage2_p/build/GHCi/Utils.p_o] Error 1
Edited by Ben Gamari