Opened 8 years ago

Closed 8 years ago

#5732 closed bug (fixed)

Faliure building unregistered GHC: pprGlobalReg: Unsupported register: CCCS

Reported by: nomeata Owned by: simonmar
Priority: highest Milestone: 7.4.1
Component: Compiler Version: 7.3
Keywords: Cc: pho@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Building GHC failed Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:



the 7.4.1 release candidate failed to build on arm; previous versions built fine. It would be great if arm support would not be dropped, if it can be helped:

"inplace/bin/ghc-stage1"   -H32m -O -lffi -optl-pthread -optc-mlong-calls    -package-name ghc-prim- -hide-all-packages -i -ilibraries/ghc-prim/. -ilibraries/ghc-prim/dist-install/build -ilibraries/ghc-prim/dist-install/build/autogen -Ilibraries/ghc-prim/dist-install/build -Ilibraries/ghc-prim/dist-install/build/autogen -Ilibraries/ghc-prim/.    -optP-include -optPlibraries/ghc-prim/dist-install/build/autogen/cabal_macros.h -package rts-1.0  -package-name ghc-prim -XHaskell98 -XCPP -XMagicHash -XForeignFunctionInterface -XUnliftedFFITypes -XUnboxedTuples -XEmptyDataDecls -XNoImplicitPrelude -O2  -no-user-package-conf -rtsopts     -odir libraries/ghc-prim/dist-install/build -hidir libraries/ghc-prim/dist-install/build -stubdir libraries/ghc-prim/dist-install/build -hisuf hi -osuf  o -hcsuf hc -c libraries/ghc-prim/dist-install/build/GHC/PrimopWrappers.hs -o libraries/ghc-prim/dist-install/build/GHC/PrimopWrappers.o
ghc-stage1: panic! (the 'impossible' happened)
  (GHC version for arm-unknown-linux):
	pprGlobalReg: Unsupported register: CCCS

Please report this as a GHC bug:

make[2]: *** [libraries/ghc-prim/dist-install/build/GHC/PrimopWrappers.o] Error 1

(Full log at

Thanks, Joachim on behalf of the Debian Haskell Team

Change History (8)

comment:1 Changed 8 years ago by nomeata

Architecture: armUnknown/Multiple
Summary: Build failure on arm: pprGlobalReg: Unsupported register: CCCSFaliure building unregistered GHC: pprGlobalReg: Unsupported register: CCCS

This bug, after fixing more trivial bugs, now appears on mips, s390(x), sparc, armel, but not on powerpc, i386 and amd64 – precisely the unregistered arches. So this does not seem to be arch-specific, but rather a general breakage of unregistered building.

comment:2 Changed 8 years ago by nomeata

Judging from the logs, this might have been caused by this patch by Simon Marlow: [50de6034343abc93a7b01daccff34121042c0e7c]

comment:3 Changed 8 years ago by nomeata

Yes, this is reproducible even on i386, e.g. with this mk/

GhcLibWays = v

GhcUnregisterised    = YES
GhcWithNativeCodeGen = NO

SRC_HC_OPTS          = -O -H64m
GhcStage1HcOpts      = -O
GhcStage2HcOpts      = -O2
GhcHcOpts            = -Rghc-timing
GhcLibHcOpts         = -O2
SplitObjs            = NO
GhcLibWays     += p

# NoFib settings
NoFibWays =

It would be helpful for us if you could include such a build in your automatic build tests.

comment:4 Changed 8 years ago by igloo

difficulty: Unknown
Milestone: 7.4.1
Priority: normalhighest

comment:5 Changed 8 years ago by simonmar

Owner: set to simonmar

Thanks, I'll fix.

comment:6 Changed 8 years ago by PHO

Cc: pho@… added

comment:7 Changed 8 years ago by simonmar

Status: newmerge


commit d7d56f5852b975c865535495b45a8aba9a397c86

Author: Simon Marlow <>
Date:   Tue Jan 3 16:21:41 2012 +0000

    Fix the C backend after making CCCS an STG register

comment:8 Changed 8 years ago by igloo

Resolution: fixed
Status: mergeclosed
Note: See TracTickets for help on using tickets.