mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 13:39:39 +01:00 
			
		
		
		
	* objcprotocol symbols have to be weak in the non-fragile abi to prevent
conflicts in case a protocol is adopted by classes in multiple object
    files part of the same binary (mantis #20875)
git-svn-id: trunk@19865 -
			
			
This commit is contained in:
		
							parent
							
								
									310e8e0b9c
								
							
						
					
					
						commit
						40a9762ac6
					
				
							
								
								
									
										3
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
								
							@ -9734,7 +9734,10 @@ tests/test/packages/cocoaint/tobjc33a.pp svneol=native#text/plain
 | 
				
			|||||||
tests/test/packages/cocoaint/tobjcnh1.pp svneol=native#text/plain
 | 
					tests/test/packages/cocoaint/tobjcnh1.pp svneol=native#text/plain
 | 
				
			||||||
tests/test/packages/cocoaint/tvarpara.pp svneol=native#text/plain
 | 
					tests/test/packages/cocoaint/tvarpara.pp svneol=native#text/plain
 | 
				
			||||||
tests/test/packages/cocoaint/tw16329.pp svneol=native#text/plain
 | 
					tests/test/packages/cocoaint/tw16329.pp svneol=native#text/plain
 | 
				
			||||||
 | 
					tests/test/packages/cocoaint/tw20875.pp svneol=native#text/plain
 | 
				
			||||||
tests/test/packages/cocoaint/tw20876.pp svneol=native#text/plain
 | 
					tests/test/packages/cocoaint/tw20876.pp svneol=native#text/plain
 | 
				
			||||||
 | 
					tests/test/packages/cocoaint/uw20875a.pp svneol=native#text/plain
 | 
				
			||||||
 | 
					tests/test/packages/cocoaint/uw20875b.pp svneol=native#text/plain
 | 
				
			||||||
tests/test/packages/fcl-base/tascii85.pp svneol=native#text/plain
 | 
					tests/test/packages/fcl-base/tascii85.pp svneol=native#text/plain
 | 
				
			||||||
tests/test/packages/fcl-base/tgettext1.pp svneol=native#text/plain
 | 
					tests/test/packages/fcl-base/tgettext1.pp svneol=native#text/plain
 | 
				
			||||||
tests/test/packages/fcl-db/assertions.pas svneol=native#text/plain
 | 
					tests/test/packages/fcl-db/assertions.pas svneol=native#text/plain
 | 
				
			||||||
 | 
				
			|||||||
@ -1123,6 +1123,7 @@ procedure tobjcrttiwriter_nonfragile.gen_objc_protocol(list: tasmlist; protocol:
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    lbl:=current_asmdata.DefineAsmSymbol(protocol.rtti_mangledname(objcclassrtti),AB_PRIVATE_EXTERN,AT_DATA);
 | 
					    lbl:=current_asmdata.DefineAsmSymbol(protocol.rtti_mangledname(objcclassrtti),AB_PRIVATE_EXTERN,AT_DATA);
 | 
				
			||||||
    list.Concat(tai_symbol.Create_Global(lbl,0));
 | 
					    list.Concat(tai_symbol.Create_Global(lbl,0));
 | 
				
			||||||
 | 
					    list.Concat(tai_directive.Create(asd_weak_definition,lbl.name));
 | 
				
			||||||
    protocollabel:=lbl;
 | 
					    protocollabel:=lbl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    { protocol's isa - always nil }
 | 
					    { protocol's isa - always nil }
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										12
									
								
								tests/test/packages/cocoaint/tw20875.pp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								tests/test/packages/cocoaint/tw20875.pp
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,12 @@
 | 
				
			|||||||
 | 
					{ %norun }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					program testlink;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{$MODE Delphi}
 | 
				
			||||||
 | 
					{$modeswitch ObjectiveC1}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					uses
 | 
				
			||||||
 | 
					  uw20875a,uw20875b;
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					begin
 | 
				
			||||||
 | 
					end.
 | 
				
			||||||
							
								
								
									
										24
									
								
								tests/test/packages/cocoaint/uw20875a.pp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								tests/test/packages/cocoaint/uw20875a.pp
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,24 @@
 | 
				
			|||||||
 | 
					unit uw20875a;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{$MODE Delphi}
 | 
				
			||||||
 | 
					{$modeswitch ObjectiveC1}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					interface
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					uses
 | 
				
			||||||
 | 
					  CocoaAll;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type
 | 
				
			||||||
 | 
					  TController1 = objcclass(NSWindowController, NSWindowDelegateProtocol)
 | 
				
			||||||
 | 
					  public
 | 
				
			||||||
 | 
					    function init : id; override;
 | 
				
			||||||
 | 
					  end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					implementation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function TController1.init : id;
 | 
				
			||||||
 | 
					begin
 | 
				
			||||||
 | 
					  Result := inherited init;
 | 
				
			||||||
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					end.
 | 
				
			||||||
							
								
								
									
										24
									
								
								tests/test/packages/cocoaint/uw20875b.pp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								tests/test/packages/cocoaint/uw20875b.pp
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,24 @@
 | 
				
			|||||||
 | 
					unit uw20875b;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{$MODE Delphi}
 | 
				
			||||||
 | 
					{$modeswitch ObjectiveC1}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					interface
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					uses
 | 
				
			||||||
 | 
					  CocoaAll;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type
 | 
				
			||||||
 | 
					  TController2 = objcclass(NSWindowController, NSWindowDelegateProtocol)
 | 
				
			||||||
 | 
					  public
 | 
				
			||||||
 | 
					    function init : id; override;
 | 
				
			||||||
 | 
					  end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					implementation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function TController2.init : id;
 | 
				
			||||||
 | 
					begin
 | 
				
			||||||
 | 
					  Result := inherited init;
 | 
				
			||||||
 | 
					end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					end.
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user