
#8829: GHC HEAD/7.8 fails to build on Solaris 10 ----------------------------+---------------------------------------- Reporter: kgardas | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.1-rc2 Keywords: | Operating System: Solaris Architecture: sparc | Type of failure: Building GHC failed Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ----------------------------+---------------------------------------- Just to record this issue for further reference. Solaris 10 provides GCC 3.4.3 as a free compiler. Unfortunately compilation of GHC with this compiler fails with: {{{ gmake -r --no-print-directory -f ghc.mk phase=final all "inplace/bin/ghc-stage1" -optc-Wall -optc-Wextra -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc- Waggregate-return -optc-Wpointer-arith -optc-Wmissing-noreturn -optc- Wnested-externs -optc-Wredundant-decls -optc-Iincludes -optc- Iincludes/dist -optc-Iincludes/dist-derivedconstants/header -optc- Iincludes/dist-ghcconstants/header -optc-Irts -optc-Irts/dist/build -optc- DCOMPILING_RTS -optc-DNOSMP -optc-DUSE_LIBFFI_FOR_ADJUSTORS -optc-fno- strict-aliasing -optc-fno-common -optc-O2 -optc-fomit-frame-pointer -optc- fno-omit-frame-pointer -optc-g -optc-O0 -optc-DRtsWay=\"rts_thr_debug\" -static -optc-DTHREADED_RTS -optc-DDEBUG -H32m -O -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist- ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -package-name rts -optc-DNOSMP -dcmm-lint -i -irts -irts/dist/build -irts/dist/build/autogen -Irts/dist/build -Irts/dist/build/autogen -O2 -O0 -c rts/sm/GC.c -o rts/dist/build/sm/GC.thr_debug_o /usr/ccs/bin/as: "/var/tmp//cclWYYHx.s", line 17827: error: statement syntax /usr/ccs/bin/as: "/var/tmp//cclWYYHx.s", line 17827: error: statement syntax /usr/ccs/bin/as: "/var/tmp//cclWYYHx.s", line 17827: error: statement syntax gmake[1]: *** [rts/dist/build/sm/GC.thr_debug_o] Error 1 gmake: *** [all] Error 2 }}} the problem analysis so far reveals that the problematic assembler code looks: {{{ 17826 .byte 0x3 17827 .word %r_tls_dtpoff32(gct) 17828 .byte 0xe0 }}} which seems to be kind of wrong. When I tested this with Solaris 11.1 GCC 4.5.2 I've not able to reproduce this error so I guess this is kind of miscompilation in GCC 3.4.3. Actually this is Solaris 10 update 11 distributed GCC: {{{ $ gcc -v Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs Configured with: /sfw10/builds/build/sfw10-patch/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/ccs/bin/as --without-gnu-as --with- ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++ --enable- shared Thread model: posix gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath) }}} so that may serve as kind of known issue on sparc/solaris 10. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8829 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler