Skip to content

Commit 5196fed

Browse files
committed
Add support for 64-bit SPARC as a separate architecture
Previously, sparc64 was defined as an alias for the 32-bit SPARC architecture which was true while SPARC mainland was mostly 32 bits. More recently, 64-bit SPARC has become a port of its own, so it needs to be treated as a separate architecture.
1 parent 21b858f commit 5196fed

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

Cabal-syntax/src/Distribution/System.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,12 @@ buildOS = classifyOS Permissive System.Info.os
182182
-- ------------------------------------------------------------
183183

184184
-- | These are the known Arches: I386, X86_64, PPC, PPC64, Sparc,
185-
-- Arm, AArch64, Mips, SH, IA64, S390, S390X, Alpha, Hppa, Rs6000,
186-
-- M68k, Vax, RISCV64, LoongArch64, JavaScript and Wasm32.
185+
-- Sparc64, Arm, AArch64, Mips, SH, IA64, S390, S390X, Alpha, Hppa,
186+
-- Rs6000, M68k, Vax, RISCV64, LoongArch64, JavaScript and Wasm32.
187187
--
188188
-- The following aliases can also be used:
189189
-- * PPC alias: powerpc
190190
-- * PPC64 alias : powerpc64, powerpc64le
191-
-- * Sparc aliases: sparc64, sun4
192191
-- * Mips aliases: mipsel, mipseb
193192
-- * Arm aliases: armeb, armel
194193
-- * AArch64 aliases: arm64
@@ -198,6 +197,7 @@ data Arch
198197
| PPC
199198
| PPC64
200199
| Sparc
200+
| Sparc64
201201
| Arm
202202
| AArch64
203203
| Mips
@@ -228,6 +228,7 @@ knownArches =
228228
, PPC
229229
, PPC64
230230
, Sparc
231+
, Sparc64
231232
, Arm
232233
, AArch64
233234
, Mips
@@ -251,7 +252,6 @@ archAliases Strict _ = []
251252
archAliases Compat _ = []
252253
archAliases _ PPC = ["powerpc"]
253254
archAliases _ PPC64 = ["powerpc64", "powerpc64le"]
254-
archAliases _ Sparc = ["sparc64", "sun4"]
255255
archAliases _ Mips = ["mipsel", "mipseb"]
256256
archAliases _ Arm = ["armeb", "armel"]
257257
archAliases _ AArch64 = ["arm64"]

Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ tests = testGroup "Distribution.Utils.Structured"
2727
-- The difference is in encoding of newtypes
2828
#if MIN_VERSION_base(4,7,0)
2929
, testCase "GenericPackageDescription" $
30-
md5Check (Proxy :: Proxy GenericPackageDescription) 0x6ad1e12c6f88291e9b8c131d239eda70
30+
md5Check (Proxy :: Proxy GenericPackageDescription) 0xb287a6f04e34ef990cdd15bc6cb01c76
3131
, testCase "LocalBuildInfo" $
32-
md5Check (Proxy :: Proxy LocalBuildInfo) 0xbc7ac84a9bc43345c812af222c3e5ba0
32+
md5Check (Proxy :: Proxy LocalBuildInfo) 0x26e91a71ebd19d4d6ce37f798ede249a
3333
#endif
3434
]
3535

Cabal/src/Distribution/Simple/PreProcess.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,7 @@ platformDefines lbi =
850850
PPC -> ["powerpc"]
851851
PPC64 -> ["powerpc64"]
852852
Sparc -> ["sparc"]
853+
Sparc64 -> ["sparc64"]
853854
Arm -> ["arm"]
854855
AArch64 -> ["aarch64"]
855856
Mips -> ["mips"]

changelog.d/pr-9445

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
synopsis: Add support for 64-bit SPARC as a separate architecture
2+
prs: #9445
3+
packages: Cabal Cabal-syntax

0 commit comments

Comments
 (0)