Skip to content

defined but not used errors on Solaris/SPARC

I recently tried building GHC on Solaris and I got a ton of these files when compiling the bootstrapping copy of Cabal:

"/afs/sipb/user/ezyang/ghc-7.8.2/usr/bin//ghc" -H32m -O -Werror -Wall -H64m -O0 \
               -optc-Werror -optc-Wall -optc-fno-stack-protector \
                \
               --make utils/ghc-cabal/Main.hs -o utils/ghc-cabal/dist/build/tmp/ghc-cabal \
               -no-user-package-db \
               -Wall -fno-warn-unused-imports -fno-warn-warnings-deprecations \
               -DCABAL_VERSION=1,21,1,0 \
               -DBOOTSTRAPPING \
               -odir  bootstrapping \
               -hidir bootstrapping \
               -ilibraries/Cabal/Cabal \
               -ilibraries/binary/src -DGENERICS \
               -ilibraries/filepath \
               -ilibraries/hpc \
               -w
"rm" -f compiler/stage1/build/Config.hs  
Creating compiler/stage1/build/Config.hs ... 
"rm" -f utils/ghc-pkg/dist/build/Version.hs  
echo "module Version where"                    >> utils/ghc-pkg/dist/build/Version.hs
echo "version, targetOS, targetARCH :: String" >> utils/ghc-pkg/dist/build/Version.hs
echo "version    = \"7.9.20141204\""      >> utils/ghc-pkg/dist/build/Version.hs
echo "targetOS   = \"solaris2\""        >> utils/ghc-pkg/dist/build/Version.hs
echo "targetARCH = \"sparc\""      >> utils/ghc-pkg/dist/build/Version.hs
done.
[ 1 of 86] Compiling Distribution.Compat.CreatePipe ( libraries/Cabal/Cabal/Distribution/Compat/CreatePipe.hs, bootstrapping/Distribution/Compat/CreatePipe.o )
cc1: warnings being treated as errors
/tmp/ghc322370_0/ghc322370_21.hc: In function ‘s1xM_entry’:

/tmp/ghc322370_0/ghc322370_21.hc:21:0:
     error: label ‘_c312’ defined but not used
/tmp/ghc322370_0/ghc322370_21.hc: In function ‘s1xK_entry’:

/tmp/ghc322370_0/ghc322370_21.hc:63:0:
     error: label ‘_c31b’ defined but not used

Maybe the 7.8.2 codegen which I bootstrapped from is buggy in some way? It makes it mildly difficult to actually validate.

Trac metadata
Trac field Value
Version 7.8.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (NCG)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC simonmar
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information