]> gitweb.factorcode.org Git - factor.git/commitdiff
remove lingering mentions of macosx-ppc
authorJoe Groff <arcata@gmail.com>
Thu, 3 Nov 2011 01:40:27 +0000 (18:40 -0700)
committerJoe Groff <arcata@gmail.com>
Thu, 3 Nov 2011 01:40:27 +0000 (18:40 -0700)
basis/alien/c-types/c-types.factor
basis/bootstrap/image/image-docs.factor
basis/classes/struct/struct-tests.factor
basis/command-line/command-line-docs.factor
build-support/factor.sh
vm/os-macosx-ppc.hpp [deleted file]
vm/platform.hpp

index 7bccc59ff559d4da771a9aebf93e41565f5e5010..4783be9ce1e95d116eae5b3c0fdadc8e9c8f2110 100644 (file)
@@ -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
index 78c3d58919676b1378e7a68ebf1c774054829c13..616496ae86ffc3dd207e53be64525c8b7fb52bcd 100644 (file)
@@ -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" } "." } ;
index aad8c1759d4dcfd6f2472b0306aae4acde3fc908..4989f24ee6f082f1379ff298c94a373d07d86900 100644 (file)
@@ -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
index 09070d86fbed155a264ca82c1e3a94241ff599be..fc7a05946610457899689623561d76b1bf4a3708 100644 (file)
@@ -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"
index 31da3ff9beae092b14fe306ff66aa4c2ac01de71..216da9164577fd100acaea501c4009255f8c96b0 100755 (executable)
@@ -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 (file)
index 8931d4c..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-#include <sys/ucontext.h>
-
-namespace factor
-{
-
-/* Fault handler information.  MacOSX version.
-Copyright (C) 1993-1999, 2002-2003  Bruno Haible <clisp.org at bruno>
-Copyright (C) 2003  Paolo Bonzini <gnu.org at 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));
-}
-
-}
index 959e622a51f0750fbfda51dcfeb9103458fd5552..57e702f23f04c28f2c45560beaf7b5fb19f5dd2a 100755 (executable)
@@ -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