Load Mac OS X x86 ABI support in -stage2

slava 2006-07-03 07:26:56 +00:00
parent 3bd5ddc494
commit 09031d8174
2 changed files with 25 additions and 19 deletions

View File

@ -317,7 +317,6 @@ sequences vectors words ;
{ "x86" "pentium4" } { { "x86" "pentium4" } {
"/library/compiler/x86/assembler.factor" "/library/compiler/x86/assembler.factor"
"/library/compiler/x86/architecture.factor" "/library/compiler/x86/architecture.factor"
"/library/compiler/x86/alien.factor"
"/library/compiler/x86/intrinsics.factor" "/library/compiler/x86/intrinsics.factor"
} if-arch } if-arch

View File

@ -10,30 +10,37 @@ parser sequences sequences-internals words ;
"Cross-referencing..." print flush "Cross-referencing..." print flush
H{ } clone crossref set-global xref-words H{ } clone crossref set-global xref-words
cpu "x86" = [
macosx?
"/library/compiler/x86/alien-macosx.factor"
"/library/compiler/x86/alien.factor"
?
] when
"compile" get [ "compile" get [
"native-io" get [ "native-io" get [
unix? [ unix? [
"/library/unix/load.factor" run-resource "/library/unix/load.factor" run-resource
] when ] when
] when ] when
windows? [ windows? [
"/library/windows/load.factor" run-resource "/library/windows/load.factor" run-resource
] when ] when
parse-command-line parse-command-line
"Compiling base..." print flush "Compiling base..." print flush
[ [
\ + compile \ + compile
\ = compile \ = compile
{ "kernel" "sequences" "assembler" } compile-vocabs { "kernel" "sequences" "assembler" } compile-vocabs
"Compiling system..." print flush "Compiling system..." print flush
compile-all compile-all
] with-class<cache ] with-class<cache
terpri terpri
"Unless you're working on the compiler, ignore the errors above." print "Unless you're working on the compiler, ignore the errors above." print
"Not every word compiles, by design." print "Not every word compiles, by design." print
@ -41,48 +48,48 @@ parser sequences sequences-internals words ;
"Initializing native I/O..." print flush "Initializing native I/O..." print flush
"native-io" get [ init-io ] when "native-io" get [ init-io ] when
"cocoa" get [ "cocoa" get [
"/library/ui/cocoa/load.factor" run-resource "/library/ui/cocoa/load.factor" run-resource
] when ] when
"x11" get [ "x11" get [
"/library/ui/x11/load.factor" run-resource "/library/ui/x11/load.factor" run-resource
] when ] when
windows? "native-io" get and [ windows? "native-io" get and [
"/library/windows/ui.factor" run-resource "/library/windows/ui.factor" run-resource
"/library/windows/clipboard.factor" run-resource "/library/windows/clipboard.factor" run-resource
compile-all compile-all
] when ] when
] when ] when
"Building online help search index..." print flush "Building online help search index..." print flush
H{ } clone parent-graph set-global xref-help H{ } clone parent-graph set-global xref-help
H{ } clone term-index set-global index-help H{ } clone term-index set-global index-help
[ [
boot boot
run-user-init run-user-init
"shell" get "shells" lookup execute "shell" get "shells" lookup execute
0 exit 0 exit
] set-boot ] set-boot
[ compiled? ] word-subset length [ compiled? ] word-subset length
number>string write " compiled words" print number>string write " compiled words" print
[ symbol? ] word-subset length [ symbol? ] word-subset length
number>string write " symbol words" print number>string write " symbol words" print
all-words length all-words length
number>string write " words total" print number>string write " words total" print
"Total bootstrap GC time: " write gc-time "Total bootstrap GC time: " write gc-time
number>string write " ms" print number>string write " ms" print
"Bootstrapping is complete." print "Bootstrapping is complete." print
"Now, you can run ./f factor.image" print flush "Now, you can run ./f factor.image" print flush
"factor.image" resource-path save-image "factor.image" resource-path save-image
] [ print-error listener ] recover ] [ print-error listener ] recover