ghc-toolchain differences reported when building on Linux sparc64
When configuring GHC on Debian unstable running on sparc64, ghc-toolchain
reports the following difference:
configure: WARNING:
There are some differences between the toolchain configured by "configure" (hadrian/cfg/default.target) and the toolchain configured by the "ghc-toolchain" program (hadrian/cfg/default.target.ghc-toolchain).
1,39d0
< Target
< { tgtArchOs = ArchOS {archOS_arch = ArchUnknown, archOS_OS = OSLinux}
< , tgtVendor = Just "unknown"
< , tgtLocallyExecutable = True
< , tgtSupportsGnuNonexecStack = True
< , tgtSupportsSubsectionsViaSymbols = False
< , tgtSupportsIdentDirective = True
< , tgtWordSize = WS8
< , tgtEndianness = BigEndian
< , tgtSymbolsHaveLeadingUnderscore = False
< , tgtLlvmTarget = "sparc64-unknown-linux"
< , tgtUnregisterised = True
< , tgtTablesNextToCode = False
< , tgtUseLibffiForAdjustors = True
< , tgtCCompiler = Cc {ccProgram = Program { prgPath = "/usr/bin/gcc" , prgFlags = [] }}
< , tgtCxxCompiler = Cxx {cxxProgram = Program { prgPath = "/usr/bin/g++" , prgFlags = [] }}
< , tgtCPreprocessor = Cpp {cppProgram = Program { prgPath = "/usr/bin/gcc" , prgFlags = ["-E"] }}
< , tgtHsCPreprocessor = HsCpp {hsCppProgram = Program { prgPath = "/usr/bin/gcc" , prgFlags = ["-E","-undef","-traditional"] }}
< , tgtCCompilerLink = CcLink
< { ccLinkProgram = Program { prgPath = "/usr/bin/gcc" , prgFlags = ["-fuse-ld=gold","-Wl,--no-as-needed"] }
< , ccLinkSupportsNoPie = True
< , ccLinkSupportsCompactUnwind = False
< , ccLinkSupportsFilelist = False
< , ccLinkIsGnu = True
< }
<
< , tgtAr = Ar
< { arMkArchive = Program { prgPath = "/usr/bin/ar" , prgFlags = ["q"] }
< , arIsGnu = True
< , arSupportsAtFile = True
< , arSupportsDashL = False
< , arNeedsRanlib = False
< }
<
< , tgtRanlib = Just (Ranlib {ranlibProgram = Program { prgPath = "/usr/bin/ranlib" , prgFlags = [] }})
< , tgtNm = Nm {nmProgram = Program { prgPath = "/usr/bin/nm" , prgFlags = [] }}
< , tgtMergeObjs = Just (MergeObjs {mergeObjsProgram = Program { prgPath = "/usr/bin/ld.gold" , prgFlags = ["-r"] }, mergeObjsSupportsResponseFiles = True})
< , tgtWindres = Nothing
< }
Don't worry! This won't affect your ghc in any way.
However, in a near future, we will move to configuring toolchains with "ghc-toolchain" by default, so you might have discovered a future bug.
In light of it, if you've spotted this difference, please report a GHC bug at https://www.haskell.org/ghc/reportabug
NB: There is currently an issue with the GHC build failing on sparc64 since the switch to Hadrian in Debian without any obvious errors, maybe it's related to the above difference reported [1]:
/usr/bin/sparc64-linux-gnu-ar: creating _build/stage0/libraries/ghc-boot-th/build/libHSghc-boot-th-9.4.7.a
/----------------------------------------------------------------------------------------\
| Successfully built library 'ghc-boot-th' (Stage0 InTreeLibs, way v). |
| Library: _build/stage0/libraries/ghc-boot-th/build/libHSghc-boot-th-9.4.7.a |
| Library synopsis: Shared functionality between GHC and the @template-haskell@
library. |
\----------------------------------------------------------------------------------------/
| Configure package 'template-haskell'
| Copy package 'ghc-boot-th'
# cabal-copy (for _build/stage0/lib/package.conf.d/ghc-boot-th-9.4.7.conf)
| Register package 'ghc-boot-th'
# cabal-register (for _build/stage0/lib/package.conf.d/ghc-boot-th-9.4.7.conf)
Error when running Shake build system:
at want, called at src/Main.hs:124:44 in main:Main
* Depends on: binary-dist-dir
at need, called at src/Rules/BinaryDist.hs:130:9 in main:Rules.BinaryDist
* Depends on: _build/stage1/lib/package.conf.d/rts-1.0.2.conf
at apply1, called at src/Development/Shake/Internal/Rules/Oracle.hs:159:32 in shake-0.19.7-KzRqWrpI1PTHohkCLdJJjn:Development.Shake.Internal.Rules.Oracle
* Depends on: OracleQ (ContextDataKey (Context {stage = Stage1, package = Package {pkgType = Library, pkgName = "rts", pkgPath = "rts"}, way = v}))
at need, called at src/Hadrian/Oracles/Cabal/Rules.hs:54:9 in main:Hadrian.Oracles.Cabal.Rules
* Depends on: _build/stage1/rts/setup-config
at need, called at src/Hadrian/Builder.hs:80:9 in main:Hadrian.Builder
* Depends on: _build/stage0/bin/ghc
at need, called at src/Rules/Register.hs:80:5 in main:Rules.Register
* Depends on: _build/stage0/lib/sparc64-linux-ghc-9.4.6/ghc-boot-th-9.4.7/libHSghc-boot-th-9.4.7.a
at error, called at src/Development/Shake/Internal/Rules/File.hs:179:58 in shake-0.19.7-KzRqWrpI1PTHohkCLdJJjn:Development.Shake.Internal.Rules.File
* Raised the exception:
Error, rule finished running but did not produce file:
_build/stage0/lib/sparc64-linux-ghc-9.4.6/ghc-boot-th-9.4.7/libHSghc-boot-th-9.4.7.a
Build failed.
[1] https://buildd.debian.org/status/fetch.php?pkg=ghc&arch=sparc64&ver=9.4.7-1&stamp=1699776000&raw=0