[commit][3697] Turn ARC On for 64bit compiles, don't make MIDI, fix various issues with bridge and windowIndex for ARC, fix parseArgument data type warning

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[commit][3697] Turn ARC On for 64bit compiles, don't make MIDI, fix various issues with bridge and windowIndex for ARC, fix parseArgument data type warning

commits-3
 
Revision: 3697
Author:   johnmci
Date:     2016-05-05 10:57:28 -0700 (Thu, 05 May 2016)
Log Message:
-----------
Turn ARC On for 64bit compiles, don't make MIDI, fix various issues with bridge and windowIndex for ARC, fix parseArgument data type warning

Modified Paths:
--------------
    branches/Cog/build.macos32x86/common/Makefile.flags
    branches/Cog/build.macos32x86/common/Makefile.vm
    branches/Cog/build.macos64x64/common/Makefile.flags
    branches/Cog/build.macos64x64/common/Makefile.vm
    branches/Cog/build.macos64x64/squeak.cog.spur/plugins.ext
    branches/Cog/platforms/iOS/plugins/HostWindowPlugin/sqMacHostWindow.m
    branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakAppDelegate.m
    branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakScreenAPI.m
    branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m
    branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication.h
    branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXDropAPI.m

Modified: branches/Cog/build.macos32x86/common/Makefile.flags
===================================================================
--- branches/Cog/build.macos32x86/common/Makefile.flags 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/build.macos32x86/common/Makefile.flags 2016-05-05 17:57:28 UTC (rev 3697)
@@ -9,7 +9,7 @@
 SDKs:=MacOSX10.12.sdk MacOSX10.11.sdk MacOSX10.10.sdk MacOSX10.9.sdk
 SDK:=$(firstword $(realpath $(addprefix $(SDKsDIR)/, $(SDKs))))
 TARGET_ARCH:=i386
-TARGET_VERSION_MIN:=10.6
+TARGET_VERSION_MIN:=10.7
 
 CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX=1 \
  -arch $(TARGET_ARCH) \
@@ -17,6 +17,7 @@
  -fvisibility=default -fwrapv \
  -fmacro-backtrace-limit=0 -fdiagnostics-show-note-include-stack \
  -fmessage-length=0 -fpascal-strings -fasm-blocks -fstrict-aliasing \
+ -fobjc-weak \
  -isysroot $(SDK) \
  -include $(PLATDIR)/iOS/vm/SqueakPureObjc_Prefix.pch
 

Modified: branches/Cog/build.macos32x86/common/Makefile.vm
===================================================================
--- branches/Cog/build.macos32x86/common/Makefile.vm 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/build.macos32x86/common/Makefile.vm 2016-05-05 17:57:28 UTC (rev 3697)
@@ -54,7 +54,7 @@
 CROSSSRC:= $(wildcard $(CROSSDIR)/*.c)
 #XEX:= ... %/sqMacV2Browser.m ...
 XEX:=%/sqSqueakMainApplication+screen.m %/sqMacV2Window.m \
- %/SqViewBitmapConversion.m %/SqViewClut.m
+ %/SqViewBitmapConversion.m
 OSXSRC=$(wildcard $(OSXDIR)/*.c) $(wildcard $(OSXDIR)/*.m) \
  $(wildcard $(OSXCOMMONDIR)/*.c) $(wildcard $(OSXCOMMONDIR)/*.m) \
  $(wildcard $(OSXCLASSESDIR)/*.c) $(wildcard $(OSXCLASSESDIR)/*.m)

Modified: branches/Cog/build.macos64x64/common/Makefile.flags
===================================================================
--- branches/Cog/build.macos64x64/common/Makefile.flags 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/build.macos64x64/common/Makefile.flags 2016-05-05 17:57:28 UTC (rev 3697)
@@ -9,7 +9,7 @@
 SDKs:=MacOSX10.12.sdk MacOSX10.11.sdk MacOSX10.10.sdk MacOSX10.9.sdk
 SDK:=$(firstword $(realpath $(addprefix $(SDKsDIR)/, $(SDKs))))
 TARGET_ARCH:=x86_64
-TARGET_VERSION_MIN:=10.6
+TARGET_VERSION_MIN:=10.7
 
 CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX=1 \
  -arch $(TARGET_ARCH) \
@@ -17,6 +17,7 @@
  -fvisibility=default -fwrapv \
  -fmacro-backtrace-limit=0 -fdiagnostics-show-note-include-stack \
  -fmessage-length=0 -fpascal-strings -fasm-blocks -fstrict-aliasing \
+ -fobjc-arc \
  -isysroot $(SDK) \
  -include $(PLATDIR)/iOS/vm/SqueakPureObjc_Prefix.pch
 

Modified: branches/Cog/build.macos64x64/common/Makefile.vm
===================================================================
--- branches/Cog/build.macos64x64/common/Makefile.vm 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/build.macos64x64/common/Makefile.vm 2016-05-05 17:57:28 UTC (rev 3697)
@@ -54,7 +54,7 @@
 CROSSSRC:= $(wildcard $(CROSSDIR)/*.c)
 #XEX:= ... %/sqMacV2Browser.m ...
 XEX:=%/sqSqueakMainApplication+screen.m %/sqMacV2Window.m \
- %/SqViewBitmapConversion.m %/SqViewClut.m
+ %/SqViewBitmapConversion.m
 OSXSRC=$(wildcard $(OSXDIR)/*.c) $(wildcard $(OSXDIR)/*.m) \
  $(wildcard $(OSXCOMMONDIR)/*.c) $(wildcard $(OSXCOMMONDIR)/*.m) \
  $(wildcard $(OSXCLASSESDIR)/*.c) $(wildcard $(OSXCLASSESDIR)/*.m)

Modified: branches/Cog/build.macos64x64/squeak.cog.spur/plugins.ext
===================================================================
--- branches/Cog/build.macos64x64/squeak.cog.spur/plugins.ext 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/build.macos64x64/squeak.cog.spur/plugins.ext 2016-05-05 17:57:28 UTC (rev 3697)
@@ -5,7 +5,6 @@
 BochsX64Plugin \
 GdbARMPlugin \
 CroquetPlugin \
-MIDIPlugin \
 Mpeg3Plugin \
 SqueakFFIPrims \
 SqueakSSL \

Modified: branches/Cog/platforms/iOS/plugins/HostWindowPlugin/sqMacHostWindow.m
===================================================================
--- branches/Cog/platforms/iOS/plugins/HostWindowPlugin/sqMacHostWindow.m 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/platforms/iOS/plugins/HostWindowPlugin/sqMacHostWindow.m 2016-05-05 17:57:28 UTC (rev 3697)
@@ -57,7 +57,7 @@
 
 sqInt closeWindow(sqInt windowIndex) {
  NSWindow *windowHandle;
- windowHandle = windowHandleFromIndex(windowIndex);
+ windowHandle = (__bridge NSWindow*) windowHandleFromIndex(windowIndex);
  if(windowHandle == NULL)
  return 0;
  windowBlockFromIndex(windowIndex)->context = NULL;
@@ -104,7 +104,7 @@
 sqInt ioSetTitleOfWindow(sqInt windowIndex, char * newTitle, sqInt sizeOfTitle) {
     NSString *title = [[NSString alloc] initWithBytes:newTitle length:sizeOfTitle encoding:NSUTF8StringEncoding];
     [[[NSApplication sharedApplication] mainWindow] setTitle:title];
-    [title release];
+    RELEASEOBJ(title);
 
  return 1;
 }

Modified: branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakAppDelegate.m
===================================================================
--- branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakAppDelegate.m 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakAppDelegate.m 2016-05-05 17:57:28 UTC (rev 3697)
@@ -56,7 +56,7 @@
  sqInt width,height;
  windowDescriptorBlock *windowBlock;
 
- id createdWindow = [self createPossibleWindow];
+ NSObject * createdWindow = [self createPossibleWindow];
 
  extern sqInt getSavedWindowSize(void); //This is VM Callback
  extern sqInt setSavedWindowSize(sqInt value); //This is VM Callback
@@ -65,7 +65,7 @@
  width  = ((unsigned) getSavedWindowSize()) >> 16;
  height = getSavedWindowSize() & 0xFFFF;
  windowBlock = AddWindowBlock();
- windowBlock->handle = createdWindow;
+ windowBlock->handle =   (__bridge void*) createdWindow;
  windowBlock->context = nil;
  windowBlock->updateArea = CGRectZero;
  width  = (usqInt) ioScreenSize() >> 16;

Modified: branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakScreenAPI.m
===================================================================
--- branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakScreenAPI.m 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakScreenAPI.m 2016-05-05 17:57:28 UTC (rev 3697)
@@ -53,7 +53,7 @@
 
 sqSqueakScreenAndWindow *getMainWindowDelegate() {
 #ifdef BUILD_FOR_OSX
- return ((NSWindow *) windowHandleFromIndex(1)).delegate;
+ return ((__bridge NSWindow *) windowHandleFromIndex(1)).delegate;
 #else
  return [gDelegateApp screenAndWindow];
 #endif

Modified: branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m
===================================================================
--- branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m 2016-05-05 17:57:28 UTC (rev 3697)
@@ -425,7 +425,7 @@
  evt.value2 =  0;
  evt.value3 =  0;
  evt.value4 =  0;
- evt.windowIndex = windowIndexFromHandle((wHandleType)window);
+ evt.windowIndex = windowIndexFromHandle((__bridge wHandleType)window);
  [self pushEventToQueue: (sqInputEvent *) &evt];
 
  interpreterProxy->signalSemaphoreWithIndex(gDelegateApp.squeakApplication.inputSemaphoreIndex);

Modified: branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication.h
===================================================================
--- branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication.h 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication.h 2016-05-05 17:57:28 UTC (rev 3697)
@@ -45,7 +45,7 @@
 }
 @property (nonatomic,strong) NSCursor *squeakCursor;
 
-- (NSInteger) parseArgument: (NSString *) argData peek: (char *) peek;
+- (int) parseArgument: (NSString *) argData peek: (char *) peek;
 - (void) parseArgs: (NSArray *) args;
 - (void) parseEnv: (NSDictionary *) env;
 - (long long) strtobkm: (const char *) chr;

Modified: branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXDropAPI.m
===================================================================
--- branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXDropAPI.m 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXDropAPI.m 2016-05-05 17:57:28 UTC (rev 3697)
@@ -53,7 +53,7 @@
 
 char* dropRequestFileName(sqInt dropIndex) {
  /* return name of file or NULL if error */
- sqSqueakOSXOpenGLView *view = ((sqSqueakOSXScreenAndWindow*)((NSWindow *)windowHandleFromIndex(1)).delegate).mainViewOnWindow;
+ sqSqueakOSXOpenGLView *view = ((sqSqueakOSXScreenAndWindow*)((__bridge NSWindow *)windowHandleFromIndex(1)).delegate).mainViewOnWindow;
  NSString *fileNameString = [view dragFileNameStringAtIndex: dropIndex];
  return (char *) [fileNameString UTF8String];
 }

Reply | Threaded
Open this post in threaded view
|

Re: [commit][3697] Turn ARC On for 64bit compiles, don't make MIDI, fix various issues with bridge and windowIndex for ARC, fix parseArgument data type warning

Eliot Miranda-2
 
Hi John,

On Thu, May 5, 2016 at 10:57 AM, <[hidden email]> wrote:

Revision: 3697
Author:   johnmci
Date:     2016-05-05 10:57:28 -0700 (Thu, 05 May 2016)
Log Message:
-----------
Turn ARC On for 64bit compiles, don't make MIDI, fix various issues with bridge and windowIndex for ARC, fix parseArgument data type warning

Curious (ok, ignorant).  Why use ARC for 64-bits but weak for 32-bits?  WOup;don't it be better to go with one approach for both?  If ARC is the future why not change the 32-bit compile to ARC too?
 
 [snip]
Modified: branches/Cog/build.macos32x86/common/Makefile.flags
===================================================================
--- branches/Cog/build.macos32x86/common/Makefile.flags 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/build.macos32x86/common/Makefile.flags 2016-05-05 17:57:28 UTC (rev 3697)
@@ -9,7 +9,7 @@
 SDKs:=MacOSX10.12.sdk MacOSX10.11.sdk MacOSX10.10.sdk MacOSX10.9.sdk
 SDK:=$(firstword $(realpath $(addprefix $(SDKsDIR)/, $(SDKs))))
 TARGET_ARCH:=i386
-TARGET_VERSION_MIN:=10.6
+TARGET_VERSION_MIN:=10.7

 CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX=1 \
                -arch $(TARGET_ARCH) \
@@ -17,6 +17,7 @@
                        -fvisibility=default -fwrapv \
                        -fmacro-backtrace-limit=0 -fdiagnostics-show-note-include-stack \
                        -fmessage-length=0 -fpascal-strings -fasm-blocks -fstrict-aliasing \
+                       -fobjc-weak \
                -isysroot $(SDK) \
                -include $(PLATDIR)/iOS/vm/SqueakPureObjc_Prefix.pch
[snip]
Modified: branches/Cog/build.macos64x64/common/Makefile.flags
===================================================================
--- branches/Cog/build.macos64x64/common/Makefile.flags 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/build.macos64x64/common/Makefile.flags 2016-05-05 17:57:28 UTC (rev 3697)
@@ -9,7 +9,7 @@
 SDKs:=MacOSX10.12.sdk MacOSX10.11.sdk MacOSX10.10.sdk MacOSX10.9.sdk
 SDK:=$(firstword $(realpath $(addprefix $(SDKsDIR)/, $(SDKs))))
 TARGET_ARCH:=x86_64
-TARGET_VERSION_MIN:=10.6
+TARGET_VERSION_MIN:=10.7

 CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX=1 \
                -arch $(TARGET_ARCH) \
@@ -17,6 +17,7 @@
                        -fvisibility=default -fwrapv \
                        -fmacro-backtrace-limit=0 -fdiagnostics-show-note-include-stack \
                        -fmessage-length=0 -fpascal-strings -fasm-blocks -fstrict-aliasing \
+                       -fobjc-arc \
                -isysroot $(SDK) \
                -include $(PLATDIR)/iOS/vm/SqueakPureObjc_Prefix.pch
[snip] 

_,,,^..^,,,_
best, Eliot
Reply | Threaded
Open this post in threaded view
|

Re: [commit][3697] Turn ARC On for 64bit compiles, don't make MIDI, fix various issues with bridge and windowIndex for ARC, fix parseArgument data type warning

johnmci
 
ARC is not supported by the os-x 32bit legacy objective-C runtime kernel. 

On Thu, May 5, 2016 at 12:23 PM, Eliot Miranda <[hidden email]> wrote:
 
Hi John,

On Thu, May 5, 2016 at 10:57 AM, <[hidden email]> wrote:

Revision: 3697
Author:   johnmci
Date:     2016-05-05 10:57:28 -0700 (Thu, 05 May 2016)
Log Message:
-----------
Turn ARC On for 64bit compiles, don't make MIDI, fix various issues with bridge and windowIndex for ARC, fix parseArgument data type warning

Curious (ok, ignorant).  Why use ARC for 64-bits but weak for 32-bits?  WOup;don't it be better to go with one approach for both?  If ARC is the future why not change the 32-bit compile to ARC too?
 
 [snip]
Modified: branches/Cog/build.macos32x86/common/Makefile.flags
===================================================================
--- branches/Cog/build.macos32x86/common/Makefile.flags 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/build.macos32x86/common/Makefile.flags 2016-05-05 17:57:28 UTC (rev 3697)
@@ -9,7 +9,7 @@
 SDKs:=MacOSX10.12.sdk MacOSX10.11.sdk MacOSX10.10.sdk MacOSX10.9.sdk
 SDK:=$(firstword $(realpath $(addprefix $(SDKsDIR)/, $(SDKs))))
 TARGET_ARCH:=i386
-TARGET_VERSION_MIN:=10.6
+TARGET_VERSION_MIN:=10.7

 CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX=1 \
                -arch $(TARGET_ARCH) \
@@ -17,6 +17,7 @@
                        -fvisibility=default -fwrapv \
                        -fmacro-backtrace-limit=0 -fdiagnostics-show-note-include-stack \
                        -fmessage-length=0 -fpascal-strings -fasm-blocks -fstrict-aliasing \
+                       -fobjc-weak \
                -isysroot $(SDK) \
                -include $(PLATDIR)/iOS/vm/SqueakPureObjc_Prefix.pch
[snip]
Modified: branches/Cog/build.macos64x64/common/Makefile.flags
===================================================================
--- branches/Cog/build.macos64x64/common/Makefile.flags 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/build.macos64x64/common/Makefile.flags 2016-05-05 17:57:28 UTC (rev 3697)
@@ -9,7 +9,7 @@
 SDKs:=MacOSX10.12.sdk MacOSX10.11.sdk MacOSX10.10.sdk MacOSX10.9.sdk
 SDK:=$(firstword $(realpath $(addprefix $(SDKsDIR)/, $(SDKs))))
 TARGET_ARCH:=x86_64
-TARGET_VERSION_MIN:=10.6
+TARGET_VERSION_MIN:=10.7

 CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX=1 \
                -arch $(TARGET_ARCH) \
@@ -17,6 +17,7 @@
                        -fvisibility=default -fwrapv \
                        -fmacro-backtrace-limit=0 -fdiagnostics-show-note-include-stack \
                        -fmessage-length=0 -fpascal-strings -fasm-blocks -fstrict-aliasing \
+                       -fobjc-arc \
                -isysroot $(SDK) \
                -include $(PLATDIR)/iOS/vm/SqueakPureObjc_Prefix.pch
[snip] 

_,,,^..^,,,_
best, Eliot




--
===========================================================================
John M. McIntosh. Corporate Smalltalk Consulting Ltd https://www.linkedin.com/in/smalltalk
===========================================================================
Reply | Threaded
Open this post in threaded view
|

Re: [commit][3697] Turn ARC On for 64bit compiles, don't make MIDI, fix various issues with bridge and windowIndex for ARC, fix parseArgument data type warning

Nicolas Cellier
 
Strange...
I've set the -fobjc-arc in build.macos32x86/common/Makefile.flags for months
(along with same .m corrections as John)
and it looks like working...
(at least clang does not bark).

Nicolas

2016-05-05 21:54 GMT+02:00 John McIntosh <[hidden email]>:
 
ARC is not supported by the os-x 32bit legacy objective-C runtime kernel. 

On Thu, May 5, 2016 at 12:23 PM, Eliot Miranda <[hidden email]> wrote:
 
Hi John,

On Thu, May 5, 2016 at 10:57 AM, <[hidden email]> wrote:

Revision: 3697
Author:   johnmci
Date:     2016-05-05 10:57:28 -0700 (Thu, 05 May 2016)
Log Message:
-----------
Turn ARC On for 64bit compiles, don't make MIDI, fix various issues with bridge and windowIndex for ARC, fix parseArgument data type warning

Curious (ok, ignorant).  Why use ARC for 64-bits but weak for 32-bits?  WOup;don't it be better to go with one approach for both?  If ARC is the future why not change the 32-bit compile to ARC too?
 
 [snip]
Modified: branches/Cog/build.macos32x86/common/Makefile.flags
===================================================================
--- branches/Cog/build.macos32x86/common/Makefile.flags 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/build.macos32x86/common/Makefile.flags 2016-05-05 17:57:28 UTC (rev 3697)
@@ -9,7 +9,7 @@
 SDKs:=MacOSX10.12.sdk MacOSX10.11.sdk MacOSX10.10.sdk MacOSX10.9.sdk
 SDK:=$(firstword $(realpath $(addprefix $(SDKsDIR)/, $(SDKs))))
 TARGET_ARCH:=i386
-TARGET_VERSION_MIN:=10.6
+TARGET_VERSION_MIN:=10.7

 CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX=1 \
                -arch $(TARGET_ARCH) \
@@ -17,6 +17,7 @@
                        -fvisibility=default -fwrapv \
                        -fmacro-backtrace-limit=0 -fdiagnostics-show-note-include-stack \
                        -fmessage-length=0 -fpascal-strings -fasm-blocks -fstrict-aliasing \
+                       -fobjc-weak \
                -isysroot $(SDK) \
                -include $(PLATDIR)/iOS/vm/SqueakPureObjc_Prefix.pch
[snip]
Modified: branches/Cog/build.macos64x64/common/Makefile.flags
===================================================================
--- branches/Cog/build.macos64x64/common/Makefile.flags 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/build.macos64x64/common/Makefile.flags 2016-05-05 17:57:28 UTC (rev 3697)
@@ -9,7 +9,7 @@
 SDKs:=MacOSX10.12.sdk MacOSX10.11.sdk MacOSX10.10.sdk MacOSX10.9.sdk
 SDK:=$(firstword $(realpath $(addprefix $(SDKsDIR)/, $(SDKs))))
 TARGET_ARCH:=x86_64
-TARGET_VERSION_MIN:=10.6
+TARGET_VERSION_MIN:=10.7

 CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX=1 \
                -arch $(TARGET_ARCH) \
@@ -17,6 +17,7 @@
                        -fvisibility=default -fwrapv \
                        -fmacro-backtrace-limit=0 -fdiagnostics-show-note-include-stack \
                        -fmessage-length=0 -fpascal-strings -fasm-blocks -fstrict-aliasing \
+                       -fobjc-arc \
                -isysroot $(SDK) \
                -include $(PLATDIR)/iOS/vm/SqueakPureObjc_Prefix.pch
[snip] 

_,,,^..^,,,_
best, Eliot




--
===========================================================================
John M. McIntosh. Corporate Smalltalk Consulting Ltd https://www.linkedin.com/in/smalltalk
===========================================================================


Reply | Threaded
Open this post in threaded view
|

Re: [commit][3697] Turn ARC On for 64bit compiles, don't make MIDI, fix various issues with bridge and windowIndex for ARC, fix parseArgument data type warning

Nicolas Cellier
 
BTW, I have also this change:

vn diff platforms/iOS/vm/OSX/sqMacV2Window.m
Index: platforms/iOS/vm/OSX/sqMacV2Window.m
===================================================================
--- platforms/iOS/vm/OSX/sqMacV2Window.m    (revision 3702)
+++ platforms/iOS/vm/OSX/sqMacV2Window.m    (working copy)
@@ -53,7 +53,7 @@
     width  = (unsigned) getSavedWindowSize() >> 16;
     height = getSavedWindowSize() & 0xFFFF;
     windowBlock = AddWindowBlock();
-    windowBlock-> handle = gDelegateApp.window;
+    windowBlock-> handle = (__bridge void *)gDelegateApp.window;
     windowBlock->context = nil;
     windowBlock->updateArea = CGRectZero;
     width  = (usqInt) ioScreenSize() >> 16;

John, do you think it's correct?

2016-05-06 21:42 GMT+02:00 Nicolas Cellier <[hidden email]>:
Strange...
I've set the -fobjc-arc in build.macos32x86/common/Makefile.flags for months
(along with same .m corrections as John)
and it looks like working...
(at least clang does not bark).

Nicolas

2016-05-05 21:54 GMT+02:00 John McIntosh <[hidden email]>:
 
ARC is not supported by the os-x 32bit legacy objective-C runtime kernel. 

On Thu, May 5, 2016 at 12:23 PM, Eliot Miranda <[hidden email]> wrote:
 
Hi John,

On Thu, May 5, 2016 at 10:57 AM, <[hidden email]> wrote:

Revision: 3697
Author:   johnmci
Date:     2016-05-05 10:57:28 -0700 (Thu, 05 May 2016)
Log Message:
-----------
Turn ARC On for 64bit compiles, don't make MIDI, fix various issues with bridge and windowIndex for ARC, fix parseArgument data type warning

Curious (ok, ignorant).  Why use ARC for 64-bits but weak for 32-bits?  WOup;don't it be better to go with one approach for both?  If ARC is the future why not change the 32-bit compile to ARC too?
 
 [snip]
Modified: branches/Cog/build.macos32x86/common/Makefile.flags
===================================================================
--- branches/Cog/build.macos32x86/common/Makefile.flags 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/build.macos32x86/common/Makefile.flags 2016-05-05 17:57:28 UTC (rev 3697)
@@ -9,7 +9,7 @@
 SDKs:=MacOSX10.12.sdk MacOSX10.11.sdk MacOSX10.10.sdk MacOSX10.9.sdk
 SDK:=$(firstword $(realpath $(addprefix $(SDKsDIR)/, $(SDKs))))
 TARGET_ARCH:=i386
-TARGET_VERSION_MIN:=10.6
+TARGET_VERSION_MIN:=10.7

 CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX=1 \
                -arch $(TARGET_ARCH) \
@@ -17,6 +17,7 @@
                        -fvisibility=default -fwrapv \
                        -fmacro-backtrace-limit=0 -fdiagnostics-show-note-include-stack \
                        -fmessage-length=0 -fpascal-strings -fasm-blocks -fstrict-aliasing \
+                       -fobjc-weak \
                -isysroot $(SDK) \
                -include $(PLATDIR)/iOS/vm/SqueakPureObjc_Prefix.pch
[snip]
Modified: branches/Cog/build.macos64x64/common/Makefile.flags
===================================================================
--- branches/Cog/build.macos64x64/common/Makefile.flags 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/build.macos64x64/common/Makefile.flags 2016-05-05 17:57:28 UTC (rev 3697)
@@ -9,7 +9,7 @@
 SDKs:=MacOSX10.12.sdk MacOSX10.11.sdk MacOSX10.10.sdk MacOSX10.9.sdk
 SDK:=$(firstword $(realpath $(addprefix $(SDKsDIR)/, $(SDKs))))
 TARGET_ARCH:=x86_64
-TARGET_VERSION_MIN:=10.6
+TARGET_VERSION_MIN:=10.7

 CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX=1 \
                -arch $(TARGET_ARCH) \
@@ -17,6 +17,7 @@
                        -fvisibility=default -fwrapv \
                        -fmacro-backtrace-limit=0 -fdiagnostics-show-note-include-stack \
                        -fmessage-length=0 -fpascal-strings -fasm-blocks -fstrict-aliasing \
+                       -fobjc-arc \
                -isysroot $(SDK) \
                -include $(PLATDIR)/iOS/vm/SqueakPureObjc_Prefix.pch
[snip] 

_,,,^..^,,,_
best, Eliot




--
===========================================================================
John M. McIntosh. Corporate Smalltalk Consulting Ltd https://www.linkedin.com/in/smalltalk
===========================================================================



Reply | Threaded
Open this post in threaded view
|

Re: [commit][3697] Turn ARC On for 64bit compiles, don't make MIDI, fix various issues with bridge and windowIndex for ARC, fix parseArgument data type warning

Eliot Miranda-2
In reply to this post by Nicolas Cellier
 
Hi Nicolas,


On May 6, 2016, at 12:42 PM, Nicolas Cellier <[hidden email]> wrote:

Strange...
I've set the -fobjc-arc in build.macos32x86/common/Makefile.flags for months
(along with same .m corrections as John)
and it looks like working...
(at least clang does not bark).

Two questions, a) what version of clang do you have installed?  b) why didn't you try and push back the changes?

Note that -fobjc-arc appeared (so John tells me) in 7.3.  I'm still using 6.0 and 7.0.


Nicolas

2016-05-05 21:54 GMT+02:00 John McIntosh <[hidden email]>:
 
ARC is not supported by the os-x 32bit legacy objective-C runtime kernel. 

On Thu, May 5, 2016 at 12:23 PM, Eliot Miranda <[hidden email]> wrote:
 
Hi John,

On Thu, May 5, 2016 at 10:57 AM, <[hidden email]> wrote:

Revision: 3697
Author:   johnmci
Date:     2016-05-05 10:57:28 -0700 (Thu, 05 May 2016)
Log Message:
-----------
Turn ARC On for 64bit compiles, don't make MIDI, fix various issues with bridge and windowIndex for ARC, fix parseArgument data type warning

Curious (ok, ignorant).  Why use ARC for 64-bits but weak for 32-bits?  WOup;don't it be better to go with one approach for both?  If ARC is the future why not change the 32-bit compile to ARC too?
 
 [snip]
Modified: branches/Cog/build.macos32x86/common/Makefile.flags
===================================================================
--- branches/Cog/build.macos32x86/common/Makefile.flags 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/build.macos32x86/common/Makefile.flags 2016-05-05 17:57:28 UTC (rev 3697)
@@ -9,7 +9,7 @@
 SDKs:=MacOSX10.12.sdk MacOSX10.11.sdk MacOSX10.10.sdk MacOSX10.9.sdk
 SDK:=$(firstword $(realpath $(addprefix $(SDKsDIR)/, $(SDKs))))
 TARGET_ARCH:=i386
-TARGET_VERSION_MIN:=10.6
+TARGET_VERSION_MIN:=10.7

 CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX=1 \
                -arch $(TARGET_ARCH) \
@@ -17,6 +17,7 @@
                        -fvisibility=default -fwrapv \
                        -fmacro-backtrace-limit=0 -fdiagnostics-show-note-include-stack \
                        -fmessage-length=0 -fpascal-strings -fasm-blocks -fstrict-aliasing \
+                       -fobjc-weak \
                -isysroot $(SDK) \
                -include $(PLATDIR)/iOS/vm/SqueakPureObjc_Prefix.pch
[snip]
Modified: branches/Cog/build.macos64x64/common/Makefile.flags
===================================================================
--- branches/Cog/build.macos64x64/common/Makefile.flags 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/build.macos64x64/common/Makefile.flags 2016-05-05 17:57:28 UTC (rev 3697)
@@ -9,7 +9,7 @@
 SDKs:=MacOSX10.12.sdk MacOSX10.11.sdk MacOSX10.10.sdk MacOSX10.9.sdk
 SDK:=$(firstword $(realpath $(addprefix $(SDKsDIR)/, $(SDKs))))
 TARGET_ARCH:=x86_64
-TARGET_VERSION_MIN:=10.6
+TARGET_VERSION_MIN:=10.7

 CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX=1 \
                -arch $(TARGET_ARCH) \
@@ -17,6 +17,7 @@
                        -fvisibility=default -fwrapv \
                        -fmacro-backtrace-limit=0 -fdiagnostics-show-note-include-stack \
                        -fmessage-length=0 -fpascal-strings -fasm-blocks -fstrict-aliasing \
+                       -fobjc-arc \
                -isysroot $(SDK) \
                -include $(PLATDIR)/iOS/vm/SqueakPureObjc_Prefix.pch
[snip] 

_,,,^..^,,,_
best, Eliot




--
===========================================================================
John M. McIntosh. Corporate Smalltalk Consulting Ltd https://www.linkedin.com/in/smalltalk
===========================================================================


Reply | Threaded
Open this post in threaded view
|

Re: [commit][3697] Turn ARC On for 64bit compiles, don't make MIDI, fix various issues with bridge and windowIndex for ARC, fix parseArgument data type warning

Nicolas Cellier
 


2016-05-06 22:43 GMT+02:00 Eliot Miranda <[hidden email]>:
 
Hi Nicolas,


On May 6, 2016, at 12:42 PM, Nicolas Cellier <[hidden email]> wrote:

Strange...
I've set the -fobjc-arc in build.macos32x86/common/Makefile.flags for months
(along with same .m corrections as John)
and it looks like working...
(at least clang does not bark).

Two questions, a) what version of clang do you have installed?  b) why didn't you try and push back the changes?

Hi Eliot,

a) I update Xcode regularly but allways apply xcodelegacy immediately after each upgrade
    (https://github.com/devernay/xcodelegacy)

clang --version
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

b) Nostalghia?
  Precisely because it breaks compatibility with OSX 10.6.
 ( I think I reported this in a vm-dev thread )
  From time to time, I use an old MacMini with snow leopard that I won't upgrade.

  a Better reason:
  The problems appeared after an upgrade of Xcode.
  I'm enough an expert to understand C compiler errors, and search for a quick fix on the internet.
  I'm not enough an expert of Mac to analyze the full impact of these changes...

 
Note that -fobjc-arc appeared (so John tells me) in 7.3.  I'm still using 6.0 and 7.0.

 Yes, fixing for one, breaking for another is not very fair.
 


Nicolas

2016-05-05 21:54 GMT+02:00 John McIntosh <[hidden email]>:
 
ARC is not supported by the os-x 32bit legacy objective-C runtime kernel. 

On Thu, May 5, 2016 at 12:23 PM, Eliot Miranda <[hidden email]> wrote:
 
Hi John,

On Thu, May 5, 2016 at 10:57 AM, <[hidden email]> wrote:

Revision: 3697
Author:   johnmci
Date:     2016-05-05 10:57:28 -0700 (Thu, 05 May 2016)
Log Message:
-----------
Turn ARC On for 64bit compiles, don't make MIDI, fix various issues with bridge and windowIndex for ARC, fix parseArgument data type warning

Curious (ok, ignorant).  Why use ARC for 64-bits but weak for 32-bits?  WOup;don't it be better to go with one approach for both?  If ARC is the future why not change the 32-bit compile to ARC too?
 
 [snip]
Modified: branches/Cog/build.macos32x86/common/Makefile.flags
===================================================================
--- branches/Cog/build.macos32x86/common/Makefile.flags 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/build.macos32x86/common/Makefile.flags 2016-05-05 17:57:28 UTC (rev 3697)
@@ -9,7 +9,7 @@
 SDKs:=MacOSX10.12.sdk MacOSX10.11.sdk MacOSX10.10.sdk MacOSX10.9.sdk
 SDK:=$(firstword $(realpath $(addprefix $(SDKsDIR)/, $(SDKs))))
 TARGET_ARCH:=i386
-TARGET_VERSION_MIN:=10.6
+TARGET_VERSION_MIN:=10.7

 CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX=1 \
                -arch $(TARGET_ARCH) \
@@ -17,6 +17,7 @@
                        -fvisibility=default -fwrapv \
                        -fmacro-backtrace-limit=0 -fdiagnostics-show-note-include-stack \
                        -fmessage-length=0 -fpascal-strings -fasm-blocks -fstrict-aliasing \
+                       -fobjc-weak \
                -isysroot $(SDK) \
                -include $(PLATDIR)/iOS/vm/SqueakPureObjc_Prefix.pch
[snip]
Modified: branches/Cog/build.macos64x64/common/Makefile.flags
===================================================================
--- branches/Cog/build.macos64x64/common/Makefile.flags 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/build.macos64x64/common/Makefile.flags 2016-05-05 17:57:28 UTC (rev 3697)
@@ -9,7 +9,7 @@
 SDKs:=MacOSX10.12.sdk MacOSX10.11.sdk MacOSX10.10.sdk MacOSX10.9.sdk
 SDK:=$(firstword $(realpath $(addprefix $(SDKsDIR)/, $(SDKs))))
 TARGET_ARCH:=x86_64
-TARGET_VERSION_MIN:=10.6
+TARGET_VERSION_MIN:=10.7

 CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX=1 \
                -arch $(TARGET_ARCH) \
@@ -17,6 +17,7 @@
                        -fvisibility=default -fwrapv \
                        -fmacro-backtrace-limit=0 -fdiagnostics-show-note-include-stack \
                        -fmessage-length=0 -fpascal-strings -fasm-blocks -fstrict-aliasing \
+                       -fobjc-arc \
                -isysroot $(SDK) \
                -include $(PLATDIR)/iOS/vm/SqueakPureObjc_Prefix.pch
[snip] 

_,,,^..^,,,_
best, Eliot




--
===========================================================================
John M. McIntosh. Corporate Smalltalk Consulting Ltd https://www.linkedin.com/in/smalltalk
===========================================================================




Reply | Threaded
Open this post in threaded view
|

Re: [commit][3697] Turn ARC On for 64bit compiles, don't make MIDI, fix various issues with bridge and windowIndex for ARC, fix parseArgument data type warning

Nicolas Cellier
 


2016-05-06 23:18 GMT+02:00 Nicolas Cellier <[hidden email]>:


2016-05-06 22:43 GMT+02:00 Eliot Miranda <[hidden email]>:
 
Hi Nicolas,


On May 6, 2016, at 12:42 PM, Nicolas Cellier <[hidden email]> wrote:

Strange...
I've set the -fobjc-arc in build.macos32x86/common/Makefile.flags for months
(along with same .m corrections as John)
and it looks like working...
(at least clang does not bark).

Two questions, a) what version of clang do you have installed?  b) why didn't you try and push back the changes?

Hi Eliot,

a) I update Xcode regularly but allways apply xcodelegacy immediately after each upgrade
    (https://github.com/devernay/xcodelegacy)

clang --version
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

b) Nostalghia?
  Precisely because it breaks compatibility with OSX 10.6.
 ( I think I reported this in a vm-dev thread )
  From time to time, I use an old MacMini with snow leopard that I won't upgrade.

  a Better reason:
  The problems appeared after an upgrade of Xcode.
  I'm enough an expert to understand C compiler errors, and search for a quick fix on the internet.
  I'm not enough an expert of Mac to analyze the full impact of these changes...

Note that it would be much easier to publish my code on github without fear of breaking the head revision.
It would give a chance for experts to examine the diff and avoid complete redo...
 
 
Note that -fobjc-arc appeared (so John tells me) in 7.3.  I'm still using 6.0 and 7.0.

 Yes, fixing for one, breaking for another is not very fair.
 


Nicolas

2016-05-05 21:54 GMT+02:00 John McIntosh <[hidden email]>:
 
ARC is not supported by the os-x 32bit legacy objective-C runtime kernel. 

On Thu, May 5, 2016 at 12:23 PM, Eliot Miranda <[hidden email]> wrote:
 
Hi John,

On Thu, May 5, 2016 at 10:57 AM, <[hidden email]> wrote:

Revision: 3697
Author:   johnmci
Date:     2016-05-05 10:57:28 -0700 (Thu, 05 May 2016)
Log Message:
-----------
Turn ARC On for 64bit compiles, don't make MIDI, fix various issues with bridge and windowIndex for ARC, fix parseArgument data type warning

Curious (ok, ignorant).  Why use ARC for 64-bits but weak for 32-bits?  WOup;don't it be better to go with one approach for both?  If ARC is the future why not change the 32-bit compile to ARC too?
 
 [snip]
Modified: branches/Cog/build.macos32x86/common/Makefile.flags
===================================================================
--- branches/Cog/build.macos32x86/common/Makefile.flags 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/build.macos32x86/common/Makefile.flags 2016-05-05 17:57:28 UTC (rev 3697)
@@ -9,7 +9,7 @@
 SDKs:=MacOSX10.12.sdk MacOSX10.11.sdk MacOSX10.10.sdk MacOSX10.9.sdk
 SDK:=$(firstword $(realpath $(addprefix $(SDKsDIR)/, $(SDKs))))
 TARGET_ARCH:=i386
-TARGET_VERSION_MIN:=10.6
+TARGET_VERSION_MIN:=10.7

 CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX=1 \
                -arch $(TARGET_ARCH) \
@@ -17,6 +17,7 @@
                        -fvisibility=default -fwrapv \
                        -fmacro-backtrace-limit=0 -fdiagnostics-show-note-include-stack \
                        -fmessage-length=0 -fpascal-strings -fasm-blocks -fstrict-aliasing \
+                       -fobjc-weak \
                -isysroot $(SDK) \
                -include $(PLATDIR)/iOS/vm/SqueakPureObjc_Prefix.pch
[snip]
Modified: branches/Cog/build.macos64x64/common/Makefile.flags
===================================================================
--- branches/Cog/build.macos64x64/common/Makefile.flags 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/build.macos64x64/common/Makefile.flags 2016-05-05 17:57:28 UTC (rev 3697)
@@ -9,7 +9,7 @@
 SDKs:=MacOSX10.12.sdk MacOSX10.11.sdk MacOSX10.10.sdk MacOSX10.9.sdk
 SDK:=$(firstword $(realpath $(addprefix $(SDKsDIR)/, $(SDKs))))
 TARGET_ARCH:=x86_64
-TARGET_VERSION_MIN:=10.6
+TARGET_VERSION_MIN:=10.7

 CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX=1 \
                -arch $(TARGET_ARCH) \
@@ -17,6 +17,7 @@
                        -fvisibility=default -fwrapv \
                        -fmacro-backtrace-limit=0 -fdiagnostics-show-note-include-stack \
                        -fmessage-length=0 -fpascal-strings -fasm-blocks -fstrict-aliasing \
+                       -fobjc-arc \
                -isysroot $(SDK) \
                -include $(PLATDIR)/iOS/vm/SqueakPureObjc_Prefix.pch
[snip] 

_,,,^..^,,,_
best, Eliot




--
===========================================================================
John M. McIntosh. Corporate Smalltalk Consulting Ltd https://www.linkedin.com/in/smalltalk
===========================================================================





Reply | Threaded
Open this post in threaded view
|

Re: [commit][3697] Turn ARC On for 64bit compiles, don't make MIDI, fix various issues with bridge and windowIndex for ARC, fix parseArgument data type warning

Eliot Miranda-2
In reply to this post by Nicolas Cellier
 
Hi All, but mainly for John,

On May 6, 2016, at 2:18 PM, Nicolas Cellier <[hidden email]> wrote:



2016-05-06 22:43 GMT+02:00 Eliot Miranda <[hidden email]>:
 
Hi Nicolas,


On May 6, 2016, at 12:42 PM, Nicolas Cellier <[hidden email]> wrote:

Strange...
I've set the -fobjc-arc in build.macos32x86/common/Makefile.flags for months
(along with same .m corrections as John)
and it looks like working...
(at least clang does not bark).

Two questions, a) what version of clang do you have installed?  b) why didn't you try and push back the changes?

Hi Eliot,

a) I update Xcode regularly but allways apply xcodelegacy immediately after each upgrade
    (https://github.com/devernay/xcodelegacy)

clang --version
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

b) Nostalghia?
  Precisely because it breaks compatibility with OSX 10.6.
 ( I think I reported this in a vm-dev thread )
  From time to time, I use an old MacMini with snow leopard that I won't upgrade.

That makes sense.  Thanks.  It was, um, tedious to fix the makefiles to differentiate between clang 7.3 (which wants -fobjc-weak) and earlier.  And personally I like to support as old an is version as possible, and 10.6 was ok for 32-bits so far.  Have you tried a 10.6 SDK 64-bit build on your 10.6.x MacMini?  

  a Better reason:
  The problems appeared after an upgrade of Xcode.
  I'm enough an expert to understand C compiler errors, and search for a quick fix on the internet.
  I'm not enough an expert of Mac to analyze the full impact of these changes...

 
Note that -fobjc-arc appeared (so John tells me) in 7.3.  I'm still using 6.0 and 7.0.

 Yes, fixing for one, breaking for another is not very fair.

John, I understand that we have to upgrade 64-but Mac OS X to the 10.7 SDK to get ARC.  But is there a good reason for upgrading the 32-bit compile to the 10.7 SDK, or would it be ok to keep using the 10.6 SDK for the 32-bit compile?


Nicolas

2016-05-05 21:54 GMT+02:00 John McIntosh <[hidden email]>:
 
ARC is not supported by the os-x 32bit legacy objective-C runtime kernel. 

On Thu, May 5, 2016 at 12:23 PM, Eliot Miranda <[hidden email]> wrote:
 
Hi John,

On Thu, May 5, 2016 at 10:57 AM, <[hidden email]> wrote:

Revision: 3697
Author:   johnmci
Date:     2016-05-05 10:57:28 -0700 (Thu, 05 May 2016)
Log Message:
-----------
Turn ARC On for 64bit compiles, don't make MIDI, fix various issues with bridge and windowIndex for ARC, fix parseArgument data type warning

Curious (ok, ignorant).  Why use ARC for 64-bits but weak for 32-bits?  WOup;don't it be better to go with one approach for both?  If ARC is the future why not change the 32-bit compile to ARC too?
 
 [snip]
Modified: branches/Cog/build.macos32x86/common/Makefile.flags
===================================================================
--- branches/Cog/build.macos32x86/common/Makefile.flags 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/build.macos32x86/common/Makefile.flags 2016-05-05 17:57:28 UTC (rev 3697)
@@ -9,7 +9,7 @@
 SDKs:=MacOSX10.12.sdk MacOSX10.11.sdk MacOSX10.10.sdk MacOSX10.9.sdk
 SDK:=$(firstword $(realpath $(addprefix $(SDKsDIR)/, $(SDKs))))
 TARGET_ARCH:=i386
-TARGET_VERSION_MIN:=10.6
+TARGET_VERSION_MIN:=10.7

 CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX=1 \
                -arch $(TARGET_ARCH) \
@@ -17,6 +17,7 @@
                        -fvisibility=default -fwrapv \
                        -fmacro-backtrace-limit=0 -fdiagnostics-show-note-include-stack \
                        -fmessage-length=0 -fpascal-strings -fasm-blocks -fstrict-aliasing \
+                       -fobjc-weak \
                -isysroot $(SDK) \
                -include $(PLATDIR)/iOS/vm/SqueakPureObjc_Prefix.pch
[snip]
Modified: branches/Cog/build.macos64x64/common/Makefile.flags
===================================================================
--- branches/Cog/build.macos64x64/common/Makefile.flags 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/build.macos64x64/common/Makefile.flags 2016-05-05 17:57:28 UTC (rev 3697)
@@ -9,7 +9,7 @@
 SDKs:=MacOSX10.12.sdk MacOSX10.11.sdk MacOSX10.10.sdk MacOSX10.9.sdk
 SDK:=$(firstword $(realpath $(addprefix $(SDKsDIR)/, $(SDKs))))
 TARGET_ARCH:=x86_64
-TARGET_VERSION_MIN:=10.6
+TARGET_VERSION_MIN:=10.7

 CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX=1 \
                -arch $(TARGET_ARCH) \
@@ -17,6 +17,7 @@
                        -fvisibility=default -fwrapv \
                        -fmacro-backtrace-limit=0 -fdiagnostics-show-note-include-stack \
                        -fmessage-length=0 -fpascal-strings -fasm-blocks -fstrict-aliasing \
+                       -fobjc-arc \
                -isysroot $(SDK) \
                -include $(PLATDIR)/iOS/vm/SqueakPureObjc_Prefix.pch
[snip] 

_,,,^..^,,,_
best, Eliot


--
===========================================================================
John M. McIntosh. Corporate Smalltalk Consulting Ltd https://www.linkedin.com/in/smalltalk
===========================================================================
Reply | Threaded
Open this post in threaded view
|

Re: [commit][3697] Turn ARC On for 64bit compiles, don't make MIDI, fix various issues with bridge and windowIndex for ARC, fix parseArgument data type warning

Eliot Miranda-2
In reply to this post by Nicolas Cellier
 
Hi Nicolas,

On May 6, 2016, at 2:30 PM, Nicolas Cellier <[hidden email]> wrote:



2016-05-06 23:18 GMT+02:00 Nicolas Cellier <[hidden email]>:


2016-05-06 22:43 GMT+02:00 Eliot Miranda <[hidden email]>:
 
Hi Nicolas,


On May 6, 2016, at 12:42 PM, Nicolas Cellier <[hidden email]> wrote:

Strange...
I've set the -fobjc-arc in build.macos32x86/common/Makefile.flags for months
(along with same .m corrections as John)
and it looks like working...
(at least clang does not bark).

Two questions, a) what version of clang do you have installed?  b) why didn't you try and push back the changes?

Hi Eliot,

a) I update Xcode regularly but allways apply xcodelegacy immediately after each upgrade
    (https://github.com/devernay/xcodelegacy)

clang --version
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

b) Nostalghia?
  Precisely because it breaks compatibility with OSX 10.6.
 ( I think I reported this in a vm-dev thread )
  From time to time, I use an old MacMini with snow leopard that I won't upgrade.

  a Better reason:
  The problems appeared after an upgrade of Xcode.
  I'm enough an expert to understand C compiler errors, and search for a quick fix on the internet.
  I'm not enough an expert of Mac to analyze the full impact of these changes...

Note that it would be much easier to publish my code on github without fear of breaking the head revision.
It would give a chance for experts to examine the diff and avoid complete redo...

I hear you.  We're likely weeks, not months, away from having the move done.  We're meeting next week in the squeak bird venue to discuss and hopefully finalize.  Esteban Lorenzano will be present from Pharo.  Let me know if you, and you, John, would like to attend.

Note that -fobjc-arc appeared (so John tells me) in 7.3.  I'm still using 6.0 and 7.0.

 Yes, fixing for one, breaking for another is not very fair.
 


Nicolas

2016-05-05 21:54 GMT+02:00 John McIntosh <[hidden email]>:
 
ARC is not supported by the os-x 32bit legacy objective-C runtime kernel. 

On Thu, May 5, 2016 at 12:23 PM, Eliot Miranda <[hidden email]> wrote:
 
Hi John,

On Thu, May 5, 2016 at 10:57 AM, <[hidden email]> wrote:

Revision: 3697
Author:   johnmci
Date:     2016-05-05 10:57:28 -0700 (Thu, 05 May 2016)
Log Message:
-----------
Turn ARC On for 64bit compiles, don't make MIDI, fix various issues with bridge and windowIndex for ARC, fix parseArgument data type warning

Curious (ok, ignorant).  Why use ARC for 64-bits but weak for 32-bits?  WOup;don't it be better to go with one approach for both?  If ARC is the future why not change the 32-bit compile to ARC too?
 
 [snip]
Modified: branches/Cog/build.macos32x86/common/Makefile.flags
===================================================================
--- branches/Cog/build.macos32x86/common/Makefile.flags 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/build.macos32x86/common/Makefile.flags 2016-05-05 17:57:28 UTC (rev 3697)
@@ -9,7 +9,7 @@
 SDKs:=MacOSX10.12.sdk MacOSX10.11.sdk MacOSX10.10.sdk MacOSX10.9.sdk
 SDK:=$(firstword $(realpath $(addprefix $(SDKsDIR)/, $(SDKs))))
 TARGET_ARCH:=i386
-TARGET_VERSION_MIN:=10.6
+TARGET_VERSION_MIN:=10.7

 CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX=1 \
                -arch $(TARGET_ARCH) \
@@ -17,6 +17,7 @@
                        -fvisibility=default -fwrapv \
                        -fmacro-backtrace-limit=0 -fdiagnostics-show-note-include-stack \
                        -fmessage-length=0 -fpascal-strings -fasm-blocks -fstrict-aliasing \
+                       -fobjc-weak \
                -isysroot $(SDK) \
                -include $(PLATDIR)/iOS/vm/SqueakPureObjc_Prefix.pch
[snip]
Modified: branches/Cog/build.macos64x64/common/Makefile.flags
===================================================================
--- branches/Cog/build.macos64x64/common/Makefile.flags 2016-05-05 17:18:10 UTC (rev 3696)
+++ branches/Cog/build.macos64x64/common/Makefile.flags 2016-05-05 17:57:28 UTC (rev 3697)
@@ -9,7 +9,7 @@
 SDKs:=MacOSX10.12.sdk MacOSX10.11.sdk MacOSX10.10.sdk MacOSX10.9.sdk
 SDK:=$(firstword $(realpath $(addprefix $(SDKsDIR)/, $(SDKs))))
 TARGET_ARCH:=x86_64
-TARGET_VERSION_MIN:=10.6
+TARGET_VERSION_MIN:=10.7

 CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX=1 \
                -arch $(TARGET_ARCH) \
@@ -17,6 +17,7 @@
                        -fvisibility=default -fwrapv \
                        -fmacro-backtrace-limit=0 -fdiagnostics-show-note-include-stack \
                        -fmessage-length=0 -fpascal-strings -fasm-blocks -fstrict-aliasing \
+                       -fobjc-arc \
                -isysroot $(SDK) \
                -include $(PLATDIR)/iOS/vm/SqueakPureObjc_Prefix.pch
[snip] 

_,,,^..^,,,_
best, Eliot




--
===========================================================================
John M. McIntosh. Corporate Smalltalk Consulting Ltd https://www.linkedin.com/in/smalltalk
===========================================================================
Reply | Threaded
Open this post in threaded view
|

Re: [commit][3697] Turn ARC On for 64bit compiles, don't make MIDI, fix various issues with bridge and windowIndex for ARC, fix parseArgument data type warning

johnmci
 
>I hear you.  We're likely weeks, not months, away from having the move done.  We're meeting next week in the squeak bird venue to discuss and hopefully finalize.  Esteban Lorenzano will be present from Pharo.  Let me know if you, and you, John, would like to attend.

Sure, provide details 


--
===========================================================================
John M. McIntosh. Corporate Smalltalk Consulting Ltd https://www.linkedin.com/in/smalltalk
===========================================================================
Reply | Threaded
Open this post in threaded view
|

Re: [commit][3697] Turn ARC On for 64bit compiles, don't make MIDI, fix various issues with bridge and windowIndex for ARC, fix parseArgument data type warning

johnmci
In reply to this post by Eliot Miranda-2
 
>John, I understand that we have to upgrade 64-but Mac OS X to the 10.7 SDK to get ARC.  But is there a good reason for upgrading the 32-bit compile to the 10.7 SDK, or would it be ok to keep using the 10.6 SDK for the 32-bit compile?

We should run some tests to understand if there are any llvm compiler optimizations that might be useful. 

--
===========================================================================
John M. McIntosh. Corporate Smalltalk Consulting Ltd https://www.linkedin.com/in/smalltalk
===========================================================================
Reply | Threaded
Open this post in threaded view
|

Re: [commit][3697] Turn ARC On for 64bit compiles, don't make MIDI, fix various issues with bridge and windowIndex for ARC, fix parseArgument data type warning

johnmci
In reply to this post by Nicolas Cellier
 
Yes you need the bridge. It is part of the changes I pushed in the last 24 hours

Sent from my iPhone

> On May 6, 2016, at 1:26 PM, Nicolas Cellier <[hidden email]> wrote:
>
> bridge

smime.p7s (6K) Download Attachment