Skip to content

Commit

Permalink
Add support for LoongArch 64-bit architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
lrzlin authored and Mikolaj committed Sep 8, 2023
1 parent 28e1c65 commit b13ba83
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Cabal-syntax/src/Distribution/System.hs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ 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, JavaScript and Wasm32.
-- M68k, Vax, RISCV64, LoongArch64, JavaScript and Wasm32.
--
-- The following aliases can also be used:
-- * PPC alias: powerpc
Expand Down Expand Up @@ -211,6 +211,7 @@ data Arch
| M68k
| Vax
| RISCV64
| LoongArch64
| JavaScript
| Wasm32
| OtherArch String
Expand Down Expand Up @@ -240,6 +241,7 @@ knownArches =
, M68k
, Vax
, RISCV64
, LoongArch64
, JavaScript
, Wasm32
]
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) 0xedd391339de1201511636bbb563fa5db
md5Check (Proxy :: Proxy GenericPackageDescription) 0x6ad1e12c6f88291e9b8c131d239eda70
, testCase "LocalBuildInfo" $
md5Check (Proxy :: Proxy LocalBuildInfo) 0x40253e3699453643336bdc7911717af0
md5Check (Proxy :: Proxy LocalBuildInfo) 0xbc7ac84a9bc43345c812af222c3e5ba0
#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 @@ -863,6 +863,7 @@ platformDefines lbi =
M68k -> ["m68k"]
Vax -> ["vax"]
RISCV64 -> ["riscv64"]
LoongArch64 -> ["loongarch64"]
JavaScript -> ["javascript"]
Wasm32 -> ["wasm32"]
OtherArch _ -> []
Expand Down
3 changes: 3 additions & 0 deletions changelog.d/pr-9215
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
synopsis: Add support for 64-bit LoongArch architecture
prs: #9215
packages: Cabal Cabal-syntax

0 comments on commit b13ba83

Please sign in to comment.