diff --git a/Cabal-syntax/src/Distribution/System.hs b/Cabal-syntax/src/Distribution/System.hs index b15d8e388e76589f6b5c3d6d2d213bff944e98e7..e1e75aa2315da22e5f610ba047995800e52b65bf 100644 --- a/Cabal-syntax/src/Distribution/System.hs +++ b/Cabal-syntax/src/Distribution/System.hs @@ -181,13 +181,14 @@ buildOS = classifyOS Permissive System.Info.os -- ------------------------------------------------------------ --- | These are the known Arches: I386, X86_64, PPC, PPC64, Sparc, +-- | These are the known Arches: I386, X86_64, PPC, PPC64, PPC64LE, Sparc, -- 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 +-- * PPC64 alias : powerpc64 +-- * PPC64LE alias : powerpc64le -- * Mips aliases: mipsel, mipseb -- * Arm aliases: armeb, armel -- * AArch64 aliases: arm64 @@ -196,6 +197,7 @@ data Arch | X86_64 | PPC | PPC64 + | PPC64LE | Sparc | Sparc64 | Arm @@ -227,6 +229,7 @@ knownArches = , X86_64 , PPC , PPC64 + , PPC64LE , Sparc , Sparc64 , Arm @@ -251,7 +254,8 @@ archAliases :: ClassificationStrictness -> Arch -> [String] archAliases Strict _ = [] archAliases Compat _ = [] archAliases _ PPC = ["powerpc"] -archAliases _ PPC64 = ["powerpc64", "powerpc64le"] +archAliases _ PPC64 = ["powerpc64"] +archAliases _ PPC64LE = ["powerpc64le"] archAliases _ Mips = ["mipsel", "mipseb"] archAliases _ Arm = ["armeb", "armel"] archAliases _ AArch64 = ["arm64"] diff --git a/Cabal/src/Distribution/Simple/GHC/Internal.hs b/Cabal/src/Distribution/Simple/GHC/Internal.hs index 3ab3c85be355f9fc946a617c1b00d2f2f8b8d5e0..0574a868ba77142455e885e09731196a3d14c5dd 100644 --- a/Cabal/src/Distribution/Simple/GHC/Internal.hs +++ b/Cabal/src/Distribution/Simple/GHC/Internal.hs @@ -774,6 +774,7 @@ profDetailLevelFlag forLib mpl = ghcArchString :: Arch -> String ghcArchString PPC = "powerpc" ghcArchString PPC64 = "powerpc64" +ghcArchString PPC64LE = "powerpc64le" ghcArchString other = prettyShow other -- | GHC's rendering of its host or target 'OS' as used in its platform diff --git a/Cabal/src/Distribution/Simple/PreProcess.hs b/Cabal/src/Distribution/Simple/PreProcess.hs index 91c8074ca3e977e298060217fb79b651b654811a..4f69ce6fc05554018a1ea72d67ea06e37af7d8b3 100644 --- a/Cabal/src/Distribution/Simple/PreProcess.hs +++ b/Cabal/src/Distribution/Simple/PreProcess.hs @@ -788,6 +788,7 @@ platformDefines lbi = X86_64 -> ["x86_64"] PPC -> ["powerpc"] PPC64 -> ["powerpc64"] + PPC64LE -> ["powerpc64le"] Sparc -> ["sparc"] Sparc64 -> ["sparc64"] Arm -> ["arm"] diff --git a/changelog.d/issue-9534 b/changelog.d/issue-9534 new file mode 100644 index 0000000000000000000000000000000000000000..61d6d70e6e3cfdd032d91ac68c55b98d4c8eaa88 --- /dev/null +++ b/changelog.d/issue-9534 @@ -0,0 +1,11 @@ +synopsis: Distinguish `powerpc64le`, by adding `PPC64LE` constructor to type `Arch` +packages: Cabal Cabal-syntax +issues: #9534 + +description: { + +Adds constructor `PPC64LE` to type `Arch` to distinguish architecture +powerpc64le from powerpc64. Existing constructor `PPC64` now exclusively +represents powerpc64. + +}