diff --git a/basis/alien/c-types/c-types.factor b/basis/alien/c-types/c-types.factor index 7bccc59ff5..4783be9ce1 100644 --- a/basis/alien/c-types/c-types.factor +++ b/basis/alien/c-types/c-types.factor @@ -192,7 +192,6 @@ CONSTANT: primitive-types : 8-byte-alignment ( c-type -- c-type ) { - { [ cpu ppc? os macosx? and ] [ 4 >>align 8 >>align-first ] } { [ cpu x86.32? os windows? not and ] [ 4 >>align 4 >>align-first ] } [ 8 >>align 8 >>align-first ] } cond ; @@ -437,7 +436,7 @@ M: pointer lookup-c-type \ uint lookup-c-type \ size_t typedef ] if - cpu ppc? os macosx? and \ uint \ uchar ? lookup-c-type clone + \ uchar lookup-c-type clone [ >c-bool ] >>unboxer-quot [ c-bool> ] >>boxer-quot object >>boxed-class diff --git a/basis/bootstrap/image/image-docs.factor b/basis/bootstrap/image/image-docs.factor index 78c3d58919..616496ae86 100644 --- a/basis/bootstrap/image/image-docs.factor +++ b/basis/bootstrap/image/image-docs.factor @@ -16,5 +16,5 @@ ABOUT: "bootstrap.image" HELP: make-image { $values { "arch" string } } { $description "Creates a bootstrap image from sources, where " { $snippet "architecture" } " is one of the following:" -{ $code "x86.32" "unix-x86.64" "windows-x86.64" "macosx-ppc" "linux-ppc" } +{ $code "x86.32" "unix-x86.64" "windows-x86.64" "linux-ppc" } "The new image file is written to the " { $link resource-path } " and is named " { $snippet "boot." { $emphasis "architecture" } ".image" } "." } ; diff --git a/basis/classes/struct/struct-tests.factor b/basis/classes/struct/struct-tests.factor index aad8c1759d..4989f24ee6 100644 --- a/basis/classes/struct/struct-tests.factor +++ b/basis/classes/struct/struct-tests.factor @@ -468,13 +468,8 @@ cpu ppc? [ { y int } { x longlong } ; - cpu ppc? 4 cell = and os macosx? and [ - [ 12 ] [ ppc-align-test-2 heap-size ] unit-test - [ 4 ] [ "x" ppc-align-test-2 offset-of ] unit-test - ] [ - [ 16 ] [ ppc-align-test-2 heap-size ] unit-test - [ 8 ] [ "x" ppc-align-test-2 offset-of ] unit-test - ] if + [ 16 ] [ ppc-align-test-2 heap-size ] unit-test + [ 8 ] [ "x" ppc-align-test-2 offset-of ] unit-test ] when STRUCT: struct-test-delegate diff --git a/basis/command-line/command-line-docs.factor b/basis/command-line/command-line-docs.factor index 09070d86fb..fc7a059466 100644 --- a/basis/command-line/command-line-docs.factor +++ b/basis/command-line/command-line-docs.factor @@ -79,9 +79,9 @@ ARTICLE: "bootstrap-cli-args" "Command line switches for bootstrap" "By default, all optional components are loaded. To load all optional components except for a given list, use the " { $snippet "-exclude=" } " switch; to only load specified optional components, use the " { $snippet "-include=" } "." $nl "For example, to build an image with the compiler but no other components, you could do:" -{ $code "./factor -i=boot.macosx-ppc.image -include=compiler" } +{ $code "./factor -i=boot.unix-x86.64.image -include=compiler" } "To build an image with everything except for the user interface and graphical tools," -{ $code "./factor -i=boot.macosx-ppc.image -exclude=\"ui ui.tools\"" } +{ $code "./factor -i=boot.unix-x86.64.image -exclude=\"ui ui.tools\"" } "To generate a bootstrap image in the first place, see " { $link "bootstrap.image" } "." ; ARTICLE: "standard-cli-args" "Command line switches for general usage" diff --git a/build-support/factor.sh b/build-support/factor.sh index 31da3ff9be..216da91645 100755 --- a/build-support/factor.sh +++ b/build-support/factor.sh @@ -85,13 +85,19 @@ set_md5sum() { set_gcc() { case $OS in macosx) - if xcodebuild -version | grep 'Xcode 4' >/dev/null; then + xcode_major=`xcodebuild -version | sed -E -ne 's/^Xcode ([0-9]+).*$/\1/p'` + if [[ $xcode_major -ge 4 ]]; then CC=clang + CPP=clang++ else CC=gcc + CPP=g++ fi ;; - *) CC=gcc;; + *) + CC=gcc + CPP=g++ + ;; esac } @@ -183,46 +189,6 @@ find_os() { *Darwin*) OS=macosx;; *linux*) OS=linux;; *Linux*) OS=linux;; - *BSD*) - echo "Here's a nickel, kid:" - echo " ..;;iiiittttjjttttii;;........ " - echo " ..ttLLGGGGffttjjjjttttttjjjjtt;;.... " - echo " ..iiLLLLjjffffiiiiffttLLjjiiiiiiiiffjjii.... " - echo " ;;LLttii;;iiiittttiiiittttffLLGGiiii;;iiLLLL;;.. " - echo " ..iiGGii..ii;;iiiittiittiiiiiittffffGGtt;;;;;;ffDDii.. " - echo " iiDD;;;;..;;ttttiittiittttiiiittttffDDEE;;,,;;;;ffKKtt.. " - echo " iiKKii..,,..iiii;;ii;;iittttttttttjjjjffGGLL::....;;LLWWtt.. " - echo " ..DDff..;;ii;;ii::,,;;;;iiiittttttjjffttjjLLDDtt..iiii;;KKWWii.. " - echo " LLLL;;;;ii;;;;;;,,;;;;;;ii;;ttttffffttttttLLGGKK..iiiiiiiiWWDD;; " - echo " ;;DD;;;;ii;;;;;;;;,,;;;;iiiiiiiijjffffffttttLLGGWWii..iiiiiiGG##jj.. " - echo " LLtt::ii;;....ii::;;,,;;;;iiiittttLLLLLLttttttGGKKGG;;;;iiiiii##KK;; " - echo " ..LL..iiii;;::::;;;;,,,,;;;;ii;;ttiiDDLLtttt;;iittLL##ii;;iiii;;WW##tt.. " - echo " ii;;;;iiff ..;;..ii..;;;;;;ii;;iiiiDDLLiiii;;ttLLEE##tt;;;;ii;;DD##GG.. " - echo " tt..iiGG::....ii..;;;;;;;;;;;;;;iiiiDDLLiiiiiiffGGWWKKiiii;;ii..tt##KK;; " - echo " ff;;GGtt..,, tt..;;;;,,;;iiii;;iittGGLLttffLLGGKKDDjjLLii;;;;,,ii##WWii " - echo " GGttii..;;.. ff::;;..;;iiiitt..iiiittGGffLLEEffEE;;;;EEtt;;::..;;WW##tt " - echo " GGjjii..ii..,,ff..::;;iiiiiitt..;;iiffttttffGGWWKKiiiiLLDD..;;....WW##tt " - echo " GGff,,..ii..iiii,,..::iiiiii;;..;;jjjjiiiiffGG##DDttiiffKK;;.. ..WW##jj " - echo " GGff..;;;;..LL..;;;;..;;iiii..;;ttLLiiiiiiffGGKKEE..jjLLKKjj.. ..WW##tt " - echo " LLff..ii..iiGG..::......;;;;;;;;LL;;iittttttLLKKLLffKKLLKKff.. ;;####ii " - echo " LLjj..;; LLii;;..;;......;;;;iitt;;ttLLttiiGGGGGGffDDKKii::.. tt##WW;; " - echo " jjtt....;;GGttjj ......;;ii;;iitt;;ttffttttLLDDGGttDDKK;;.. LL##KK.. " - echo " ;;ii;;..LLtt;;;; ....;;ii....iiGG;;iijjffLLGGKKjjGGKKGG.... KK##LL " - echo " ..ffiittttiiii;; ....;;ii,,;;ttLLttiittjjLLGGttjjGGKKtt iiWW##ii " - echo " ttLLii;;iiii;; ....,,;; ..;;ttDDiiiiffffffffGGGGGG.. GG##KK.. " - echo " ..LLjjii;;;;....::;;,,;;;;..;;ttDDttttjjttffLLLLDDff ;;WW##tt " - echo " iiGGii,,....,,iiiiii,,ii ::ttEEttffDDttLLttLLKKii GG##KK.. " - echo " LLtt......,,;;;;;;iiiiii;;;;KKffLLKK;;;;tttttt tt##WWii " - echo " ..ii;;;;..;;iiii;;tt,,jj iiGGffLLKK....;;.... ;;WW##ff.. " - echo " ..;;..::;;iiiiii;;..jj;;..GGttffEE........ iiKK##LL.. " - echo " ..,,..;;;;;;;;..;;iitt,,ttttjjLL iiKK##LL.. " - echo " ............ ,,;;;;..;;;;LLii ..ttKKKKtt.. " - echo " ..::........;;......;;;;;; ..iiDDWWLL,, " - echo " ....;;................iittGGDDff;; " - echo " ....;;;;;;;;;;iiiiii::.. " - echo "Get yourself a real OS." - echo "http://www.microsoft.com/" - exit_script 1 esac } @@ -334,10 +300,7 @@ check_os_arch_word() { set_build_info() { check_os_arch_word - if [[ $OS == macosx && $ARCH == ppc ]] ; then - MAKE_IMAGE_TARGET=macosx-ppc - MAKE_TARGET=macosx-ppc - elif [[ $OS == linux && $ARCH == ppc ]] ; then + if [[ $OS == linux && $ARCH == ppc ]] ; then MAKE_IMAGE_TARGET=linux-ppc.32 MAKE_TARGET=linux-ppc-32 elif [[ $OS == windows && $ARCH == x86 && $WORD == 64 ]] ; then diff --git a/vm/os-macosx-ppc.hpp b/vm/os-macosx-ppc.hpp deleted file mode 100644 index 8931d4c7db..0000000000 --- a/vm/os-macosx-ppc.hpp +++ /dev/null @@ -1,75 +0,0 @@ -#include - -namespace factor -{ - -/* Fault handler information. MacOSX version. -Copyright (C) 1993-1999, 2002-2003 Bruno Haible -Copyright (C) 2003 Paolo Bonzini - -Used under BSD license with permission from Paolo Bonzini and Bruno Haible, -2005-03-10: - -http://sourceforge.net/mailarchive/message.php?msg_name=200503102200.32002.bruno%40clisp.org - -Modified for Factor by Slava Pestov */ -#define FRAME_RETURN_ADDRESS(frame,vm) *((void **)(vm->frame_successor(frame) + 1) + 2) - -#define MACH_EXC_STATE_TYPE ppc_exception_state_t -#define MACH_EXC_STATE_FLAVOR PPC_EXCEPTION_STATE -#define MACH_EXC_STATE_COUNT PPC_EXCEPTION_STATE_COUNT - -#define MACH_EXC_INTEGER_DIV EXC_PPC_ZERO_DIVIDE - -#define MACH_THREAD_STATE_TYPE ppc_thread_state_t -#define MACH_THREAD_STATE_FLAVOR PPC_THREAD_STATE -#define MACH_THREAD_STATE_COUNT PPC_THREAD_STATE_COUNT - -#define MACH_FLOAT_STATE_TYPE ppc_float_state_t -#define MACH_FLOAT_STATE_FLAVOR PPC_FLOAT_STATE -#define MACH_FLOAT_STATE_COUNT PPC_FLOAT_STATE_COUNT - -#if __DARWIN_UNIX03 - #define MACH_EXC_STATE_FAULT(exc_state) (exc_state)->__dar - #define MACH_STACK_POINTER(thr_state) (thr_state)->__r1 - #define MACH_PROGRAM_COUNTER(thr_state) (thr_state)->__srr0 - - #define UAP_SS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->__ss) - #define UAP_FS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->__fs) - - #define FPSCR(float_state) (float_state)->__fpscr -#else - #define MACH_EXC_STATE_FAULT(exc_state) (exc_state)->dar - #define MACH_STACK_POINTER(thr_state) (thr_state)->r1 - #define MACH_PROGRAM_COUNTER(thr_state) (thr_state)->srr0 - - #define UAP_SS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->ss) - #define UAP_FS(ucontext) &(((ucontext_t *)(ucontext))->uc_mcontext->fs) - - #define FPSCR(float_state) (float_state)->fpscr -#endif - -#define UAP_PROGRAM_COUNTER(ucontext) \ - MACH_PROGRAM_COUNTER(UAP_SS(ucontext)) - -inline static unsigned int mach_fpu_status(ppc_float_state_t *float_state) -{ - return FPSCR(float_state); -} - -inline static unsigned int uap_fpu_status(void *uap) -{ - return mach_fpu_status(UAP_FS(uap)); -} - -inline static void mach_clear_fpu_status(ppc_float_state_t *float_state) -{ - FPSCR(float_state) &= 0x0007f8ff; -} - -inline static void uap_clear_fpu_status(void *uap) -{ - mach_clear_fpu_status(UAP_FS(uap)); -} - -} diff --git a/vm/platform.hpp b/vm/platform.hpp index 959e622a51..57e702f23f 100755 --- a/vm/platform.hpp +++ b/vm/platform.hpp @@ -21,8 +21,6 @@ #ifdef FACTOR_X86 #include "os-macosx-x86.32.hpp" - #elif defined(FACTOR_PPC) - #include "os-macosx-ppc.hpp" #elif defined(FACTOR_AMD64) #include "os-macosx-x86.64.hpp" #else