Skip to content

Commit

Permalink
Add support for 64-bit SPARC as a separate architecture
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
glaubitz committed Nov 14, 2023
1 parent 1908f51 commit d7872cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Cabal-syntax/src/Distribution/System.hs
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,12 @@ buildOS = classifyOS Permissive System.Info.os
-- ------------------------------------------------------------

-- | These are the known Arches: I386, X86_64, PPC, PPC64, Sparc,
-- Arm, AArch64, Mips, SH, IA64, S390, S390X, Alpha, Hppa, Rs6000,
-- M68k, Vax, RISCV64, LoongArch64, JavaScript and Wasm32.
-- Sparc64, Arm, AArch64, Mips, SH, IA64, S390, S390X, Alpha, Hppa,
-- Rs6000, M68k, Vax, RISCV64, LoongArch64, JavaScript and Wasm32.
--
-- The following aliases can also be used:
-- * PPC alias: powerpc
-- * PPC64 alias : powerpc64, powerpc64le
-- * Sparc aliases: sparc64, sun4
-- * Mips aliases: mipsel, mipseb
-- * Arm aliases: armeb, armel
-- * AArch64 aliases: arm64
Expand All @@ -198,6 +197,7 @@ data Arch
| PPC
| PPC64
| Sparc
| Sparc64
| Arm
| AArch64
| Mips
Expand Down Expand Up @@ -228,6 +228,7 @@ knownArches =
, PPC
, PPC64
, Sparc
, Sparc64
, Arm
, AArch64
, Mips
Expand All @@ -251,7 +252,6 @@ archAliases Strict _ = []
archAliases Compat _ = []
archAliases _ PPC = ["powerpc"]
archAliases _ PPC64 = ["powerpc64", "powerpc64le"]
archAliases _ Sparc = ["sparc64", "sun4"]
archAliases _ Mips = ["mipsel", "mipseb"]
archAliases _ Arm = ["armeb", "armel"]
archAliases _ AArch64 = ["arm64"]
Expand Down
1 change: 1 addition & 0 deletions Cabal/src/Distribution/Simple/PreProcess.hs
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,7 @@ platformDefines lbi =
PPC -> ["powerpc"]
PPC64 -> ["powerpc64"]
Sparc -> ["sparc"]
Sparc64 -> ["sparc64"]
Arm -> ["arm"]
AArch64 -> ["aarch64"]
Mips -> ["mips"]
Expand Down

0 comments on commit d7872cb

Please sign in to comment.