[Vm-dev] [commit][3612] Fix argument access on the iOS platform.

commits at squeakvm.org commits at squeakvm.org
Tue Feb 16 05:35:12 UTC 2016


Revision: 3612
Author:   eliot
Date:     2016-02-15 21:35:08 -0800 (Mon, 15 Feb 2016)
Log Message:
-----------
Fix argument access on the iOS platform.  Comment the Pharo makefiles correctly.
Use -DBUILDFOR_OSX=1 for convenience.

Modified Paths:
--------------
    branches/Cog/build.macos32x86/common/Makefile.flags
    branches/Cog/build.macos32x86/pharo.cog.spur/Makefile
    branches/Cog/build.macos64x64/common/Makefile.flags
    branches/Cog/build.macos64x64/pharo.cog.spur/Makefile
    branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication+attributes.m
    branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+attributes.m

Property Changed:
----------------
    branches/Cog/platforms/Cross/vm/sqSCCSVersion.h

Modified: branches/Cog/build.macos32x86/common/Makefile.flags
===================================================================
--- branches/Cog/build.macos32x86/common/Makefile.flags	2016-02-16 02:24:48 UTC (rev 3611)
+++ branches/Cog/build.macos32x86/common/Makefile.flags	2016-02-16 05:35:08 UTC (rev 3612)
@@ -11,7 +11,7 @@
 TARGET_ARCH:=i386
 TARGET_VERSION_MIN:=10.6
 
-CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX \
+CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX=1 \
 		-arch $(TARGET_ARCH) \
 		-mmacosx-version-min=$(TARGET_VERSION_MIN) -msse4.2 \
 			-fvisibility=hidden -fwrapv \

Modified: branches/Cog/build.macos32x86/pharo.cog.spur/Makefile
===================================================================
--- branches/Cog/build.macos32x86/pharo.cog.spur/Makefile	2016-02-16 02:24:48 UTC (rev 3611)
+++ branches/Cog/build.macos32x86/pharo.cog.spur/Makefile	2016-02-16 05:35:08 UTC (rev 3612)
@@ -1,5 +1,5 @@
 ##############################################################################
-# Makefile for Mac OS X Cog Spur Squeak Cocoa VM using clang and gnu make 3.81
+# Makefile for Mac OS X Cog Spur Pharo Cocoa VM using clang and gnu make 3.81
 # Do make init to allow make -n to function.
 #
 

Modified: branches/Cog/build.macos64x64/common/Makefile.flags
===================================================================
--- branches/Cog/build.macos64x64/common/Makefile.flags	2016-02-16 02:24:48 UTC (rev 3611)
+++ branches/Cog/build.macos64x64/common/Makefile.flags	2016-02-16 05:35:08 UTC (rev 3612)
@@ -11,7 +11,7 @@
 TARGET_ARCH:=x86_64
 TARGET_VERSION_MIN:=10.6
 
-CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX \
+CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX=1 \
 		-arch $(TARGET_ARCH) \
 		-mmacosx-version-min=$(TARGET_VERSION_MIN) -msse4.2 \
 			-fvisibility=hidden -fwrapv \

Modified: branches/Cog/build.macos64x64/pharo.cog.spur/Makefile
===================================================================
--- branches/Cog/build.macos64x64/pharo.cog.spur/Makefile	2016-02-16 02:24:48 UTC (rev 3611)
+++ branches/Cog/build.macos64x64/pharo.cog.spur/Makefile	2016-02-16 05:35:08 UTC (rev 3612)
@@ -1,5 +1,5 @@
 ##############################################################################
-# Makefile for Mac OS X Cog Spur Squeak Cocoa VM using clang and gnu make 3.81
+# Makefile for Mac OS X Cog Spur Pharo Cocoa VM using clang and gnu make 3.81
 # Do make init to allow make -n to function.
 #
 


Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
   - Mon Feb 15 16:17:25 PST 2016
   + Mon Feb 15 21:33:16 PST 2016

Modified: branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication+attributes.m
===================================================================
--- branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication+attributes.m	2016-02-16 02:24:48 UTC (rev 3611)
+++ branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication+attributes.m	2016-02-16 05:35:08 UTC (rev 3612)
@@ -85,7 +85,15 @@
 			return (char *) [[self.commandLineArguments objectAtIndex: -indexNumber] cStringUsingEncoding:[self currentVMEncoding]];
 		}
 #endif
-	} else {
+	}
+#if BUILD_FOR_OSX
+	else if (indexNumber >= 2 && indexNumber <= 1000) {
+        if (indexNumber < [self.commandLineArguments count]) {
+			return (char *) [[self.commandLineArguments objectAtIndex: indexNumber] cStringUsingEncoding:[self currentVMEncoding]];
+		}
+	}
+#endif
+	else {
 		switch (indexNumber) {
 			case 0: 
                 return [[[[NSBundle mainBundle] executablePath] precomposedStringWithCanonicalMapping] UTF8String];

Modified: branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+attributes.m
===================================================================
--- branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+attributes.m	2016-02-16 02:24:48 UTC (rev 3611)
+++ branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+attributes.m	2016-02-16 05:35:08 UTC (rev 3612)
@@ -68,7 +68,11 @@
 		if (myattr == gestaltPowerPC) 
 			return "powerpc";
 		if (myattr == gestaltIntel) 
+#if defined(x86_64) || defined(__amd64) || defined(__x86_64) || defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64)
+			return "x64";
+#else
 			return "intel";
+#endif
 
 		return "unknown";
 	}



More information about the Vm-dev mailing list