From 76b02f5459043af34ea59e9101acf31051cf41a2 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Fri, 21 Jun 2024 17:01:55 +0800 Subject: [PATCH] idris2.ss: support powerpc --- bootstrap/idris2_app/idris2.ss | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git bootstrap/idris2_app/idris2.ss bootstrap/idris2_app/idris2.ss index 9ff05c91e..6f7c90ac4 100755 --- bootstrap/idris2_app/idris2.ss +++ bootstrap/idris2_app/idris2.ss @@ -5,7 +5,7 @@ (case (machine-type) [(i3fb ti3fb a6fb ta6fb) #f] [(i3le ti3le a6le ta6le tarm64le) (load-shared-object "libc.so.6")] - [(i3osx ti3osx a6osx ta6osx tarm64osx) (load-shared-object "libc.dylib")] + [(i3osx ti3osx a6osx ta6osx tarm64osx tppc32osx tppc64osx) (load-shared-object "libc.dylib")] [(i3nt ti3nt a6nt ta6nt) (load-shared-object "msvcrt.dll")] [else (load-shared-object "libc.so")]) @@ -18,7 +18,7 @@ [(i3ob ti3ob a6ob ta6ob tarm64ob) "unix"] ; OpenBSD [(i3fb ti3fb a6fb ta6fb tarm64fb) "unix"] ; FreeBSD [(i3nb ti3nb a6nb ta6nb tarm64nb) "unix"] ; NetBSD - [(i3osx ti3osx a6osx ta6osx tarm64osx) "darwin"] + [(i3osx ti3osx a6osx ta6osx tarm64osx tppc32osx tppc64osx) "darwin"] [(i3nt ti3nt a6nt ta6nt tarm64nt) "windows"] [else "unknown"])) @@ -5121,7 +5121,7 @@ (define LibrariesC-45UtilsC-45String-escapeGeneric (lambda (arg-0 arg-1 ext-0) (PreludeC-45Types-fastPack (PreludeC-45Types-u--foldr_Foldable_List (lambda (eta-0) (lambda (eta-1) (LibrariesC-45UtilsC-45String-n--2718-891-u--escape arg-1 arg-0 eta-0 eta-1))) '() (PreludeC-45Types-fastUnpack ext-0))))) (define LibrariesC-45UtilsC-45String-escapeStringChez (lambda (ext-0) (LibrariesC-45UtilsC-45String-escapeGeneric #\\ (cons #\' (cons #\\ '())) ext-0))) (define CompilerC-45Generated-generatedString (lambda (arg-0) (string-append "@" (string-append "generated by Idris " (string-append (LibrariesC-45DataC-45Version-u--show_Show_Version IdrisC-45Version-version) (string-append ", " (string-append arg-0 " backend"))))))) -(define CompilerC-45SchemeC-45Chez-schHeader (lambda (arg-0 arg-1 arg-2 ext-0) (cons (string-append (let ((sc0 (PreludeC-45EqOrd-u--C-47C-61_Eq_String SystemC-45Info-os "windows"))) (cond ((equal? sc0 1) (string-append "#!" (string-append arg-0 (cond ((equal? arg-2 1) " --program\xa;\xa;") (else " --script\xa;\xa;"))))) (else ""))) (PreludeC-45Types-u--foldMap_Foldable_List csegen-59 (lambda (eta-0) eta-0) (cons ";; " (cons (CompilerC-45Generated-generatedString "Chez") (cons "\xa;(import (chezscheme))\xa;(case (machine-type)\xa; [(i3fb ti3fb a6fb ta6fb) #f]\xa; [(i3le ti3le a6le ta6le tarm64le) (load-shared-object \"libc.so.6\")]\xa; [(i3osx ti3osx a6osx ta6osx tarm64osx) (load-shared-object \"libc.dylib\")]\xa; [(i3nt ti3nt a6nt ta6nt) (load-shared-object \"msvcrt.dll\")]\xa; [else (load-shared-object \"libc.so\")])\xa;\xa;" (cons (CoreC-45NameC-45Namespace-showSep "\xa;" (PreludeC-45TypesC-45List-mapAppend '() (lambda (u--x) (string-append "(load-shared-object \"" (string-append (LibrariesC-45UtilsC-45String-escapeStringChez u--x) "\")"))) arg-1)) (cons "\xa;\xa;" (cons (cond ((equal? arg-2 1) "(let ()") (else "(source-directories (cons (getenv \"IDRIS2_INC_SRC\") (source-directories)))")) (cons "\xa;" '()))))))))) ext-0))) +(define CompilerC-45SchemeC-45Chez-schHeader (lambda (arg-0 arg-1 arg-2 ext-0) (cons (string-append (let ((sc0 (PreludeC-45EqOrd-u--C-47C-61_Eq_String SystemC-45Info-os "windows"))) (cond ((equal? sc0 1) (string-append "#!" (string-append arg-0 (cond ((equal? arg-2 1) " --program\xa;\xa;") (else " --script\xa;\xa;"))))) (else ""))) (PreludeC-45Types-u--foldMap_Foldable_List csegen-59 (lambda (eta-0) eta-0) (cons ";; " (cons (CompilerC-45Generated-generatedString "Chez") (cons "\xa;(import (chezscheme))\xa;(case (machine-type)\xa; [(i3fb ti3fb a6fb ta6fb) #f]\xa; [(i3le ti3le a6le ta6le tarm64le) (load-shared-object \"libc.so.6\")]\xa; [(i3osx ti3osx a6osx ta6osx tarm64osx tppc32osx tppc64osx) (load-shared-object \"libc.dylib\")]\xa; [(i3nt ti3nt a6nt ta6nt) (load-shared-object \"msvcrt.dll\")]\xa; [else (load-shared-object \"libc.so\")])\xa;\xa;" (cons (CoreC-45NameC-45Namespace-showSep "\xa;" (PreludeC-45TypesC-45List-mapAppend '() (lambda (u--x) (string-append "(load-shared-object \"" (string-append (LibrariesC-45UtilsC-45String-escapeStringChez u--x) "\")"))) arg-1)) (cons "\xa;\xa;" (cons (cond ((equal? arg-2 1) "(let ()") (else "(source-directories (cons (getenv \"IDRIS2_INC_SRC\") (source-directories)))")) (cons "\xa;" '()))))))))) ext-0))) (define CompilerC-45OptsC-45ToplevelConstants-calls (lambda (arg-0) (case (vector-ref arg-0 0) ((0) csegen-862) ((1) (let ((e-3 (vector-ref arg-0 2))) (LibrariesC-45DataC-45SortedSet-singleton csegen-861 e-3))) ((2) (let ((e-6 (vector-ref arg-0 3))) (CompilerC-45OptsC-45ToplevelConstants-calls e-6))) ((3) (let ((e-9 (vector-ref arg-0 3))) (let ((e-10 (vector-ref arg-0 4))) (LibrariesC-45DataC-45SortedSet-u--C-60C-43C-62_Semigroup_C-40SortedSetC-32C-36kC-41 csegen-861 (CompilerC-45OptsC-45ToplevelConstants-calls e-10) (CompilerC-45OptsC-45ToplevelConstants-calls e-9))))) ((4) (let ((e-12 (vector-ref arg-0 2))) (let ((e-13 (vector-ref arg-0 3))) (LibrariesC-45DataC-45SortedSet-u--C-60C-43C-62_Semigroup_C-40SortedSetC-32C-36kC-41 csegen-861 (CompilerC-45OptsC-45ToplevelConstants-calls e-12) (PreludeC-45Types-u--foldMap_Foldable_List csegen-2558 (lambda (eta-0) (CompilerC-45OptsC-45ToplevelConstants-calls eta-0)) e-13))))) ((5) (let ((e-18 (vector-ref arg-0 5))) (PreludeC-45Types-u--foldMap_Foldable_List csegen-2558 (lambda (eta-0) (CompilerC-45OptsC-45ToplevelConstants-calls eta-0)) e-18))) ((6) (let ((e-22 (vector-ref arg-0 4))) (DataC-45Vect-u--foldMap_Foldable_C-40VectC-32C-36nC-41 csegen-2558 (lambda (eta-0) (CompilerC-45OptsC-45ToplevelConstants-calls eta-0)) e-22))) ((7) (let ((e-25 (vector-ref arg-0 3))) (PreludeC-45Types-u--foldMap_Foldable_List csegen-2558 (lambda (eta-0) (CompilerC-45OptsC-45ToplevelConstants-calls eta-0)) e-25))) ((8) (let ((e-28 (vector-ref arg-0 3))) (CompilerC-45OptsC-45ToplevelConstants-calls e-28))) ((9) (let ((e-31 (vector-ref arg-0 3))) (CompilerC-45OptsC-45ToplevelConstants-calls e-31))) ((10) (let ((e-33 (vector-ref arg-0 2))) (let ((e-34 (vector-ref arg-0 3))) (let ((e-35 (vector-ref arg-0 4))) (LibrariesC-45DataC-45SortedSet-u--C-60C-43C-62_Semigroup_C-40SortedSetC-32C-36kC-41 csegen-861 (LibrariesC-45DataC-45SortedSet-u--C-60C-43C-62_Semigroup_C-40SortedSetC-32C-36kC-41 csegen-861 (CompilerC-45OptsC-45ToplevelConstants-calls e-33) (PreludeC-45Types-u--foldMap_Foldable_List csegen-2558 (lambda (lamc-0) (let ((e-4 (vector-ref lamc-0 4))) (CompilerC-45OptsC-45ToplevelConstants-calls e-4))) e-34)) (PreludeC-45Types-u--foldMap_Foldable_Maybe csegen-2558 (lambda (eta-0) (CompilerC-45OptsC-45ToplevelConstants-calls eta-0)) e-35)))))) ((11) (let ((e-37 (vector-ref arg-0 2))) (let ((e-38 (vector-ref arg-0 3))) (let ((e-39 (vector-ref arg-0 4))) (LibrariesC-45DataC-45SortedSet-u--C-60C-43C-62_Semigroup_C-40SortedSetC-32C-36kC-41 csegen-861 (LibrariesC-45DataC-45SortedSet-u--C-60C-43C-62_Semigroup_C-40SortedSetC-32C-36kC-41 csegen-861 (CompilerC-45OptsC-45ToplevelConstants-calls e-37) (PreludeC-45Types-u--foldMap_Foldable_List csegen-2558 (lambda (lamc-0) (let ((e-1 (cdr lamc-0))) (CompilerC-45OptsC-45ToplevelConstants-calls e-1))) e-38)) (PreludeC-45Types-u--foldMap_Foldable_Maybe csegen-2558 (lambda (eta-0) (CompilerC-45OptsC-45ToplevelConstants-calls eta-0)) e-39)))))) ((12) csegen-862) ((13) csegen-862) (else csegen-862)))) (define CompilerC-45OptsC-45ToplevelConstants-defCalls (lambda (arg-0) (case (vector-ref arg-0 0) ((0) (let ((e-1 (vector-ref arg-0 2))) (CompilerC-45OptsC-45ToplevelConstants-calls e-1))) ((1) csegen-862) ((2) csegen-862) (else (let ((e-8 (vector-ref arg-0 1))) (CompilerC-45OptsC-45ToplevelConstants-calls e-8)))))) (define CompilerC-45OptsC-45ToplevelConstants-callGraph (lambda (ext-0) (LibrariesC-45DataC-45SortedMap-fromList csegen-861 (PreludeC-45TypesC-45List-mapAppend '() (lambda (lamc-0) (let ((e-2 (car lamc-0))) (let ((e-3 (cdr lamc-0))) (let ((e-7 (cdr e-3))) (cons e-2 (CompilerC-45OptsC-45ToplevelConstants-defCalls e-7)))))) ext-0)))) @@ -5207,7 +5207,7 @@ (define CompilerC-45Separate-n--9226-6184-u--withCUID (lambda (arg-1 arg-2 arg-4) (PreludeC-45Types-listBind (DataC-45List-u--zip_Zippable_List (PreludeC-45Types-u--rangeFromTo_Range_Nat 0 (PreludeC-45TypesC-45List-lengthTR arg-4)) arg-4) (lambda (_-0) (let ((e-2 (car _-0))) (let ((e-3 (cdr _-0))) (PreludeC-45Types-u--pure_Applicative_List (cons (blodwen-toSignedInt e-2 63) e-3)))))))) (define CompilerC-45Separate-getCompilationUnits (lambda (arg-1 arg-2) (let ((u--defsByNS (LibrariesC-45DataC-45SortedMap-fromList csegen-4099 (CompilerC-45Separate-splitByNS arg-2)))) (let ((u--nsDeps (PreludeC-45Types-u--foldl_Foldable_List (lambda (eta-0) (lambda (eta-1) (LibrariesC-45DataC-45SortedMap-mergeWith csegen-3785 eta-0 eta-1))) csegen-5081 (PreludeC-45Types-listBind arg-2 (lambda (_-0) (let ((e-2 (car _-0))) (let ((e-3 (cdr _-0))) (PreludeC-45Types-u--pure_Applicative_List (LibrariesC-45DataC-45SortedMap-singleton csegen-4099 (CompilerC-45Separate-getNS e-2) (LibrariesC-45DataC-45SortedSet-delete (CompilerC-45Separate-getNS e-2) (arg-1 e-3))))))))))) (let ((u--components (PreludeC-45TypesC-45List-reverse (LibrariesC-45DataC-45Graph-tarjan csegen-4099 u--nsDeps)))) (let ((u--nsMap (LibrariesC-45DataC-45SortedMap-fromList csegen-4099 (PreludeC-45Types-listBind (CompilerC-45Separate-n--9226-6184-u--withCUID arg-1 arg-2 u--components) (lambda (_-0) (let ((e-2 (car _-0))) (let ((e-3 (cdr _-0))) (PreludeC-45Types-listBind (DataC-45List1-forget e-3) (lambda (u--ns) (PreludeC-45Types-u--pure_Applicative_List (cons u--ns e-2))))))))))) (let ((u--units (PreludeC-45Types-listBind (CompilerC-45Separate-n--9226-6184-u--withCUID arg-1 arg-2 u--components) (lambda (_-0) (let ((e-2 (car _-0))) (let ((e-3 (cdr _-0))) (PreludeC-45Types-u--pure_Applicative_List (CompilerC-45Separate-n--9226-6183-u--mkUnit arg-1 arg-2 u--nsDeps u--nsMap u--defsByNS e-2 e-3)))))))) (vector u--units (LibrariesC-45DataC-45SortedMap-fromList csegen-5070 (PreludeC-45Types-listBind u--units (lambda (u--unit) (PreludeC-45Types-u--pure_Applicative_List (cons (let ((e-1 (vector-ref u--unit 0))) e-1) u--unit))))) u--nsMap)))))))) (define CompilerC-45SchemeC-45ChezSep-schFooter (lambda (ext-0) (cons (PreludeC-45Types-u--foldMap_Foldable_List csegen-59 (lambda (eta-0) eta-0) (cons "\xa;(collect 4)\xa;(blodwen-run-finalisers)" '())) ext-0))) -(define CompilerC-45SchemeC-45ChezSep-schHeader (lambda (arg-0 arg-1 ext-0) (cons (PreludeC-45Types-u--foldMap_Foldable_List csegen-59 (lambda (eta-0) eta-0) (cons "(import (chezscheme) (support)\xa; " (cons (DataC-45String-unwords (PreludeC-45Types-listBind arg-1 (lambda (u--cu) (PreludeC-45Types-u--pure_Applicative_List (string-append "(" (string-append u--cu ")")))))) (cons ")\xa;(case (machine-type)\xa; [(i3le ti3le a6le ta6le tarm64le) (load-shared-object \"libc.so.6\")]\xa; [(i3osx ti3osx a6osx ta6osx tarm64osx) (load-shared-object \"libc.dylib\")]\xa; [(i3nt ti3nt a6nt ta6nt) (load-shared-object \"msvcrt.dll\")]\xa; [else (load-shared-object \"libc.so\")]\xa;" (cons (DataC-45String-fastUnlines (PreludeC-45Types-listBind arg-0 (lambda (u--lib) (PreludeC-45Types-u--pure_Applicative_List (string-append " (load-shared-object \"" (string-append (LibrariesC-45UtilsC-45String-escapeStringChez u--lib) "\")")))))) (cons ")\xa;" '())))))) ext-0))) +(define CompilerC-45SchemeC-45ChezSep-schHeader (lambda (arg-0 arg-1 ext-0) (cons (PreludeC-45Types-u--foldMap_Foldable_List csegen-59 (lambda (eta-0) eta-0) (cons "(import (chezscheme) (support)\xa; " (cons (DataC-45String-unwords (PreludeC-45Types-listBind arg-1 (lambda (u--cu) (PreludeC-45Types-u--pure_Applicative_List (string-append "(" (string-append u--cu ")")))))) (cons ")\xa;(case (machine-type)\xa; [(i3le ti3le a6le ta6le tarm64le) (load-shared-object \"libc.so.6\")]\xa; [(i3osx ti3osx a6osx ta6osx tarm64osx tppc32osx tppc64osx) (load-shared-object \"libc.dylib\")]\xa; [(i3nt ti3nt a6nt ta6nt) (load-shared-object \"msvcrt.dll\")]\xa; [else (load-shared-object \"libc.so\")]\xa;" (cons (DataC-45String-fastUnlines (PreludeC-45Types-listBind arg-0 (lambda (u--lib) (PreludeC-45Types-u--pure_Applicative_List (string-append " (load-shared-object \"" (string-append (LibrariesC-45UtilsC-45String-escapeStringChez u--lib) "\")")))))) (cons ")\xa;" '())))))) ext-0))) (define CoreC-45Core-writeFile (lambda (arg-0 arg-1) (let ((eff-0 (lambda (world-0) (let ((act-1 ((SystemC-45FileC-45ReadWrite-writeFile csegen-82 arg-0 arg-1) world-0))) (vector 1 act-1))))) (lambda (world-0) (let ((act-1 (eff-0 world-0))) (case (vector-ref act-1 0) ((0) (let ((e-2 (vector-ref act-1 1))) (vector 0 e-2))) (else (let ((e-5 (vector-ref act-1 1))) ((let ((eff-1 (lambda (clam-0) (case (vector-ref e-5 0) ((1) (vector 1 (vector 0 ))) (else (let ((e-6 (vector-ref e-5 1))) (CoreC-45Core-u--throw_Catchable_Core_Error (vector 51 arg-0 e-6) clam-0))))))) eff-1) world-0))))))))) (define CompilerC-45Separate-u--hashWithSalt_Hashable_C-40C-124C-40C-40BuiltinC-46PairC-32FCC-41C-32C-36defC-41C-44C-40C-40BuiltinC-46MkPairC-32FCC-41C-32C-36defC-41C-124C-41 (lambda (arg-1 arg-2 arg-3) (let ((e-3 (cdr arg-3))) (let ((e-4 (cdr arg-1))) ((e-4 arg-2) e-3))))) (define CompilerC-45Separate-u--hashWithSalt_Hashable_CompilationUnitId (lambda (arg-0 arg-1) (CoreC-45Hash-u--hashWithSalt_Hashable_Int arg-0 arg-1)))