Skip to content

Add support for 64-bit SPARC as a separate architecture #9445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the "sun4" alias here still needed for the 32-bit arch?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not seen it being used anywhere. And even Solaris is defaulting to a 64-bit userland these days.

archAliases _ Mips = ["mipsel", "mipseb"]
archAliases _ Arm = ["armeb", "armel"]
archAliases _ AArch64 = ["arm64"]
Expand Down
4 changes: 2 additions & 2 deletions Cabal-tests/tests/UnitTests/Distribution/Utils/Structured.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ tests = testGroup "Distribution.Utils.Structured"
-- The difference is in encoding of newtypes
#if MIN_VERSION_base(4,7,0)
, testCase "GenericPackageDescription" $
md5Check (Proxy :: Proxy GenericPackageDescription) 0x6ad1e12c6f88291e9b8c131d239eda70
md5Check (Proxy :: Proxy GenericPackageDescription) 0xb287a6f04e34ef990cdd15bc6cb01c76
, testCase "LocalBuildInfo" $
md5Check (Proxy :: Proxy LocalBuildInfo) 0xbc7ac84a9bc43345c812af222c3e5ba0
md5Check (Proxy :: Proxy LocalBuildInfo) 0x26e91a71ebd19d4d6ce37f798ede249a
#endif
]

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
3 changes: 3 additions & 0 deletions changelog.d/pr-9445
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
synopsis: Add support for 64-bit SPARC as a separate architecture
prs: #9445
packages: Cabal Cabal-syntax