Sat Jan 14 01:30:53 2023 UTC ()
Update devel/gnustep-objc to 2.1.0 and fix its build

Highlights of 2.1.0 release include:

- Numerous improvements to the Objective-C++ exception interoperation code.
  The runtime now dynamically detects whether the libcxxrt or libsupc++ variant
  of the Itanium C++ Exception ABI is being used

- Sending a message to `super` where the corresponding method did not exist was
  silently ignored in previous versions of the runtime.  This now correctly
  invokes the forwarding hooks and so (with an implementation of the Foundation
  framework, such as GNUstep Base or WinObjC) will trigger an exception or
  invoke `forwardInvocation:`.

- The checks for overloaded memory management methods were incorrect, causing
  some classes to be incorrectly opted into ARC fast paths.  These checks are
  now correct.

- Several memory management bugs in corner cases of weak reference management
  were fixed.

- The ARM assembly implementation of `objc_msgSend` now correctly restores the
  stack after calling a forwarding implementation.  This bug caused stack
  corruption and usually crashing on ARM.

- The ARC code has been rewritten as C++, using a well-tested third-party
  Robin-Hood hash table to store weak references, replacing the home-grown
  version.  This improves performance and reduces the likelihood of bugs
  arising from the hash table implementation.

- Control Flow Guard (CGF) checks were added on Windows on x86 (32- and
  64-bit).  If Objective-C code is compiled with CFG enabled then
  `objc_msgSend` will crash if it attempts to jump to an address that is not a
  valid function entry point.

- The function signatures in the blocks headers were updated for compatibility
  with recent macOS releases.

- Support for the C11 _Atomic type qualifier in property metadata was added.

Highlights of 2.0.0 release include:

- The linker now removes duplicate selectors within a library.

- The linker will remove duplicate protocol definitions within a library.

- Protocols and classes are now always accessed via an indirection layer, so
  they can be extended by future versions of the ABI without breaking
  compatibility.

- Categories can include property metadata and both categories.

- Constant strings are now emitted with a richer structure, which provides
  faster hashing and better unicode support.

- Instance variable metadata includes size and alignment, allowing better object
  layout and more accurate introspection.  Instance variable metadata now
  includes more accurate information about ARC ownership semantics.

- Method metadata now includes extended type information, allowing bridged
  languages to understand the class that methods expect and not just the fact
  that they take an object.  This was previously an obstacle to supporting
  JavaScriptCore's Objective-C bridge with GNUstep.

In addition to the new ABI, there are several improvements on Windows:

- The runtime now uses SEH-based exception handling on Windows.  This
  interoperates with C++ exceptions in libraries compiled with MSVC or
  MSVC-compatible compilers.

- All of the assembly code paths now fully support i386 and x64 Windows.

- Object allocations on 32-bit Windows now use `_aligned_malloc` to guarantee
  sufficient alignment for AVX vectors in instance variables.

- The runtime now uses fibre-local storage and critical sections on Windows,
  improving performance in multithreaded workloads on Windows.

- Public runtime functions are now marked dllexport, so the runtime can be built
  as objc.dll on Windows.

**WARNING**: The new ABI is currently incompatible with incremental linking on
Windows, so projects built with Microsoft's linker must disable incremental
linking.

Note: Microsoft's WinObjC project contains a friendly fork of this library that
includes a work around for the incremental linking issue.  If you wish to use
incremental linking on Windows, please use that version.  A subsequent version
of clang and link.exe should include a fix that will make it possible to use
this version with incremental linking.

The runtime will now use the new ABI's data structures internally and will
automatically upgrade on-disk structures from old ABIs when used with the old
ABI.  As a result, memory usage will be higher when using the old ABI and users
who are unable to recompile their code may prefer to stick with the 1.9.x
release series.  Mixing libraries compiled with the old and new ABIs is not
supported and will abort at run time.

The new ABI provides better run-time introspection metadata and smaller
binaries.  When used with the new ABI, this version of the runtime will consume
less memory than the previous release.

Highlights of 1.9.0 release include:

- Support for 64-bit ARM (AArch64) processors, including assembly fast paths
  for message sending.

- Improved the dispatch table representation to improve performance and cache
  usage on the fast path.

- The implementation of `imp_implementationWithBlock`, the function that allows
  blocks to be used as methods, no longer requires physical pages to be mapped
  both writeable and executable.

- Numerous improvements to the interaction between runtime functions and ARC.

- Support for Thumb-2 interworking on ARM.  Note that the library must be
  compiled for ARMv7 or ARMv6T2 for this code to be enabled.  Once it has been,
  other Objective-C binaries linked with the library can be compiled as ARM or
  Thumb-2 code.  This will also generate Thumb-2 message send functions,
  improving instruction cache usage.

- Significant improvements to ARC, including

  * The runtime no longer acquires a global lock on every object deallocation (a
    global lock is still used for objects that have weak references). *NOTE:*
    This is incompatible with other code directly inspecting the reference
    count and will break with older versions of GNUstep Base!

  * Weak references use a scheme closer to C++ `std::weak_pointer` and are
    lazily zeroed on access.  This reduces the space overheads for weak
    references.

  * Some additional helper functions are added for use in `NSObject` and other
    root classes,  which simplifies the layering between the runtime and the
    Foundation (or equivalent) implementation.

- Improvements to how the runtime handles layout of ivars with strong alignment
  requirements, which should fix issues relating to using vector types in
  Objective-C objects.

- The option to build a separate libobjcxx has been removed.  The runtime will
  now depend on the C++ standard library implementation if no useable C++
  runtime is available.  Note that C++ exception interworking does not work
  because LLVM's libc++abi (shipped by Apple) does not provide GNU-compatible
  hooks and so Objective-C++ exception support will be automatically disabled
  on this platform.  Any other platforms shipping libc++abi should consider
  either GNU libsupc++ or libcxxrt as an alternative


(manu)
diff -r1.36 -r1.37 pkgsrc/devel/gnustep-objc/Makefile
diff -r1.8 -r1.9 pkgsrc/devel/gnustep-objc/PLIST
diff -r1.14 -r1.15 pkgsrc/devel/gnustep-objc/buildlink3.mk
diff -r1.18 -r1.19 pkgsrc/devel/gnustep-objc/distinfo
diff -r0 -r1.1 pkgsrc/devel/gnustep-objc/patches/patch-CMakeLists.txt
diff -r1.4 -r0 pkgsrc/devel/gnustep-objc/patches/patch-GNUmakefile
diff -r1.1 -r1.2 pkgsrc/devel/gnustep-objc/patches/patch-objc_runtime.h
diff -r1.2 -r1.3 pkgsrc/devel/gnustep-objc/patches/patch-objcxx_eh.cc
diff -r1.2 -r1.3 pkgsrc/devel/gnustep-objc/patches/patch-objcxx_eh.h
diff -r1.326 -r1.327 pkgsrc/doc/CHANGES-2023

cvs diff -r1.36 -r1.37 pkgsrc/devel/gnustep-objc/Makefile (expand / switch to unified diff)

--- pkgsrc/devel/gnustep-objc/Makefile 2021/11/28 15:45:13 1.36
+++ pkgsrc/devel/gnustep-objc/Makefile 2023/01/14 01:30:53 1.37
@@ -1,45 +1,59 @@ @@ -1,45 +1,59 @@
1# $NetBSD: Makefile,v 1.36 2021/11/28 15:45:13 pho Exp $ 1# $NetBSD: Makefile,v 1.37 2023/01/14 01:30:53 manu Exp $
2 2
3DISTNAME= libobjc2-1.8.1 3DISTNAME= libobjc2-2.1.0
4PKGNAME= ${DISTNAME:S/libobjc2/gnustep-objc/} 4PKGNAME= ${DISTNAME:S/libobjc2/gnustep-objc/}
5CATEGORIES= devel gnustep 5CATEGORIES= devel gnustep
6MASTER_SITES= ${MASTER_SITE_GNUSTEP:=libs/} 6MASTER_SITES= ${MASTER_SITE_GITHUB:=gnustep/}
 7GITHUB_PROJECT= libobjc2
 8GITHUB_TAG= v2.1
7 9
8MAINTAINER= pkgsrc-users@NetBSD.org 10MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= https://github.com/gnustep/libobjc2 11HOMEPAGE= https://github.com/gnustep/libobjc2
10COMMENT= Objective-C runtime 12COMMENT= Objective-C runtime
11LICENSE= mit 13LICENSE= mit
12 14
 15BUILD_DEPENDS+= clang-[0-9]*:../../lang/clang
 16
13USE_LANGUAGES= objc c++11 17USE_LANGUAGES= objc c++11
14USE_TOOLS+= gmake cmake 18USE_TOOLS+= gmake cmake pax
15MAKE_FILE= GNUmakefile 19USE_CMAKE= yes
16MAKE_ENV+= ADDITIONAL_LDFLAGS=-lpthread 20CMAKE_ARGS+= -DCMAKE_C_COMPILER=${CLANGBASE:Q}/bin/clang
 21CMAKE_ARGS+= -DCMAKE_CXX_COMPILER=${CLANGBASE:Q}/bin/clang++
 22LDFLAGS+= -lm -lunwind -lstdc++
 23MAKE_FILE= Makefile
 24MAKE_ENV+= ADDITIONAL_LDFLAGS="-lpthread"
17MAKE_ENV+= LIBOBJC=libobjc 25MAKE_ENV+= LIBOBJC=libobjc
18MAKE_ENV+= LIBOBJCXX=libobjcxx 26MAKE_ENV+= LIBOBJCXX=libobjcxx
19MAKE_ENV+= VERSION=4.6 27MAKE_ENV+= VERSION=4.6
20MAKE_ENV+= MAJOR_VERSION=4 28MAKE_ENV+= MAJOR_VERSION=4
21MAKE_ENV+= MINOR_VERSION=6 29MAKE_ENV+= MINOR_VERSION=6
22 30
23INSTALLATION_DIRS= lib include/objc 31INSTALLATION_DIRS= lib include/objc
24 32
 33post-extract:
 34 cd ${BUILDLINK_PREFIX.robin-map} && \
 35 pax -rwpam include/tsl ${WRKSRC}/third_party/robin-map/
 36
25do-configure: 37do-configure:
26 cd ${WRKSRC} && \ 38 cd ${WRKSRC} && \
27 ${SETENV} ${CONFIGURE_ENV} ${CMAKE} -Wno-dev ${CMAKE_ARGS} . 39 ${SETENV} ${CONFIGURE_ENV} ${CMAKE} -Wno-dev ${CMAKE_ARGS} .
28 40
29.include "../../devel/gnustep-make/buildlink3.mk" 
30.include "../../mk/compiler.mk" 41.include "../../mk/compiler.mk"
31 42
32.include "../../mk/bsd.prefs.mk" 43.include "../../mk/bsd.prefs.mk"
33 44
34# Building tests with GCC is not supported. 45# Building tests with GCC is not supported.
35.if empty(CC_VERSION:Mclang-*) 46.if empty(CC_VERSION:Mclang-*)
36CMAKE_ARGS+= -DTESTS:BOOL=FALSE 47CMAKE_ARGS+= -DTESTS:BOOL=FALSE
37.endif 48.endif
38 49
39PLIST_VARS+= objcxx 50PLIST_VARS+= objcxx
40.if ${OPSYS} != "FreeBSD" 51.if ${OPSYS} != "FreeBSD" && ${OPSYS} != "NetBSD"
41PLIST.objcxx= yes 52PLIST.objcxx= yes
42.endif 53.endif
43 54
44.include "../../mk/pthread.buildlink3.mk" 55.include "../../mk/pthread.buildlink3.mk"
 56.include "../../devel/robin-map/buildlink3.mk"
 57.include "../../lang/libunwind/buildlink3.mk"
 58.include "../../mk/compiler/clang.mk"
45.include "../../mk/bsd.pkg.mk" 59.include "../../mk/bsd.pkg.mk"

cvs diff -r1.8 -r1.9 pkgsrc/devel/gnustep-objc/PLIST (expand / switch to unified diff)

--- pkgsrc/devel/gnustep-objc/PLIST 2020/11/04 08:36:52 1.8
+++ pkgsrc/devel/gnustep-objc/PLIST 2023/01/14 01:30:53 1.9
@@ -1,25 +1,28 @@ @@ -1,25 +1,28 @@
1@comment $NetBSD: PLIST,v 1.8 2020/11/04 08:36:52 triaxx Exp $ 1@comment $NetBSD: PLIST,v 1.9 2023/01/14 01:30:53 manu Exp $
 2include/Block.h
 3include/Block_private.h
2include/objc/Availability.h 4include/objc/Availability.h
3include/objc/Object.h 5include/objc/Object.h
4include/objc/Protocol.h 6include/objc/Protocol.h
5include/objc/blocks_private.h 7include/objc/blocks_private.h
6include/objc/blocks_runtime.h 8include/objc/blocks_runtime.h
7include/objc/capabilities.h 9include/objc/capabilities.h
8include/objc/developer.h 10include/objc/developer.h
9include/objc/encoding.h 11include/objc/encoding.h
10include/objc/hooks.h 12include/objc/hooks.h
11include/objc/message.h 13include/objc/message.h
12include/objc/objc-api.h 14include/objc/objc-api.h
13include/objc/objc-arc.h 15include/objc/objc-arc.h
14include/objc/objc-auto.h 16include/objc/objc-auto.h
 17include/objc/objc-class.h
 18include/objc/objc-runtime.h
 19include/objc/objc-visibility.h
15include/objc/objc.h 20include/objc/objc.h
16include/objc/runtime-deprecated.h 21include/objc/runtime-deprecated.h
17include/objc/runtime.h 22include/objc/runtime.h
18include/objc/slot.h 23include/objc/slot.h
19include/objc/toydispatch.h 
20lib/libobjc.so 24lib/libobjc.so
21lib/libobjc.so.4 
22lib/libobjc.so.4.6 25lib/libobjc.so.4.6
23${PLIST.objcxx}lib/libobjcxx.so 26${PLIST.objcxx}lib/libobjcxx.so
24${PLIST.objcxx}lib/libobjcxx.so.4 
25${PLIST.objcxx}lib/libobjcxx.so.4.6 27${PLIST.objcxx}lib/libobjcxx.so.4.6
 28lib/pkgconfig/libobjc.pc

cvs diff -r1.14 -r1.15 pkgsrc/devel/gnustep-objc/buildlink3.mk (expand / switch to unified diff)

--- pkgsrc/devel/gnustep-objc/buildlink3.mk 2020/11/04 08:36:52 1.14
+++ pkgsrc/devel/gnustep-objc/buildlink3.mk 2023/01/14 01:30:53 1.15
@@ -1,18 +1,17 @@ @@ -1,18 +1,17 @@
1# $NetBSD: buildlink3.mk,v 1.14 2020/11/04 08:36:52 triaxx Exp $ 1# $NetBSD: buildlink3.mk,v 1.15 2023/01/14 01:30:53 manu Exp $
2 2
3BUILDLINK_TREE+= gnustep-objc 3BUILDLINK_TREE+= gnustep-objc
4 4
5.if !defined(GNUSTEP_OBJC_BUILDLINK3_MK) 5.if !defined(GNUSTEP_OBJC_BUILDLINK3_MK)
6GNUSTEP_OBJC_BUILDLINK3_MK:= 6GNUSTEP_OBJC_BUILDLINK3_MK:=
7 7
8BUILDLINK_API_DEPENDS.gnustep-objc+= gnustep-objc>=1.3.0 8BUILDLINK_API_DEPENDS.gnustep-objc+= gnustep-objc>=1.3.0
9BUILDLINK_ABI_DEPENDS.gnustep-objc+= gnustep-objc>=1.3.0nb1 9BUILDLINK_ABI_DEPENDS.gnustep-objc+= gnustep-objc>=1.3.0nb1
10BUILDLINK_PKGSRCDIR.gnustep-objc?= ../../devel/gnustep-objc 10BUILDLINK_PKGSRCDIR.gnustep-objc?= ../../devel/gnustep-objc
11 11
12BUILDLINK_CFLAGS.gnustep-objc+= -I${BUILDLINK_PREFIX.gnustep-objc}/include/objc 12BUILDLINK_CFLAGS.gnustep-objc+= -I${BUILDLINK_PREFIX.gnustep-objc}/include/objc
13BUILDLINK_LDFLAGS.gnustep-objc+= -lobjc -lpthread 13BUILDLINK_LDFLAGS.gnustep-objc+= -lobjc -lpthread
14 14
15.include "../../devel/gnustep-make/buildlink3.mk" 
16.endif # GNUSTEP_OBJC_BUILDLINK3_MK 15.endif # GNUSTEP_OBJC_BUILDLINK3_MK
17 16
18BUILDLINK_TREE+= -gnustep-objc 17BUILDLINK_TREE+= -gnustep-objc

cvs diff -r1.18 -r1.19 pkgsrc/devel/gnustep-objc/distinfo (expand / switch to unified diff)

--- pkgsrc/devel/gnustep-objc/distinfo 2023/01/03 17:41:16 1.18
+++ pkgsrc/devel/gnustep-objc/distinfo 2023/01/14 01:30:53 1.19
@@ -1,9 +1,9 @@ @@ -1,9 +1,9 @@
1$NetBSD: distinfo,v 1.18 2023/01/03 17:41:16 wiz Exp $ 1$NetBSD: distinfo,v 1.19 2023/01/14 01:30:53 manu Exp $
2 2
3BLAKE2s (libobjc2-1.8.1.tar.gz) = 2a19ab2491baa156f7cef635053080dc4bf3eae356f1156a79edb98ebd3c0434 3BLAKE2s (libobjc2-2.1.0.tar.gz) = 4812d384515b96a0b837356cd95f68fea492e109ad4166e6159f64b608299f79
4SHA512 (libobjc2-1.8.1.tar.gz) = 518f36e96a82a076fc67fe384226bd97310cd10a53c7b0951db9f3658aa534582b245d5cb97956fe91c38338c3fc8f1e569dd8af36f6d12e32bf1460251d02eb 4SHA512 (libobjc2-2.1.0.tar.gz) = a93c385f9ad53fce0f736088c3a18e72119c0128690725e435a35fe4250830d13e18899f98c7d80e6ea41cbfe1404f055d9d6c3d891ad7c770d47dcd0244fc7f
5Size (libobjc2-1.8.1.tar.gz) = 173635 bytes 5Size (libobjc2-2.1.0.tar.gz) = 200290 bytes
6SHA1 (patch-GNUmakefile) = d9ba0c41e06122326cc6d2579af1db3d3323151d 6SHA1 (patch-CMakeLists.txt) = 7b4a6a3c28a332ed96ab08837397455ea699bada
7SHA1 (patch-objc_runtime.h) = cc8aaeb1352a403abb918aaf5a12d86fdcea383f 7SHA1 (patch-objc_runtime.h) = af2e2944e825e8982252a878939465a259324030
8SHA1 (patch-objcxx_eh.cc) = 8804d075cb46380165e40af5f4abd5d8d413b92a 8SHA1 (patch-objcxx_eh.cc) = 42760e1e3c91d686e13c6705c9b1f86d85a7d2ad
9SHA1 (patch-objcxx_eh.h) = 68a3709ed9d029e6ae4c7a6cc375678ee7c21b1e 9SHA1 (patch-objcxx_eh.h) = 0ae17a3631d40e5db66ef0f0f09818d7fdc03d80

File Added: pkgsrc/devel/gnustep-objc/patches/patch-CMakeLists.txt
$NetBSD: patch-CMakeLists.txt,v 1.1 2023/01/14 01:30:53 manu Exp $

Remove useless ${CMAKE_CXX_FLAGS} that break the build

--- CMakeLists.txt.orig	2023-01-12 14:46:28.472484641 +0000
+++ CMakeLists.txt	2023-01-12 14:46:55.625639141 +0000
@@ -316,9 +316,9 @@
 				set(ENABLE_OBJCXX false)
 			endif()
 		endif ()
 		add_custom_command(OUTPUT eh_trampoline.s
-			COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_FLAGS} -fPIC -S "${CMAKE_SOURCE_DIR}/eh_trampoline.cc" -o - -fexceptions -fno-inline | sed "s/__gxx_personality_v0/test_eh_personality/g" > "${CMAKE_BINARY_DIR}/eh_trampoline.s"
+			COMMAND ${CMAKE_CXX_COMPILER} -fPIC -S "${CMAKE_SOURCE_DIR}/eh_trampoline.cc" -o - -fexceptions -fno-inline | sed "s/__gxx_personality_v0/test_eh_personality/g" > "${CMAKE_BINARY_DIR}/eh_trampoline.s"
 			MAIN_DEPENDENCY eh_trampoline.cc)
 		list(APPEND libobjc_ASM_SRCS eh_trampoline.s)
 		list(APPEND libobjc_CXX_SRCS objcxx_eh.cc)
 	endif ()

File Deleted: pkgsrc/devel/gnustep-objc/patches/Attic/patch-GNUmakefile

cvs diff -r1.1 -r1.2 pkgsrc/devel/gnustep-objc/patches/patch-objc_runtime.h (expand / switch to unified diff)

--- pkgsrc/devel/gnustep-objc/patches/patch-objc_runtime.h 2022/01/26 15:57:54 1.1
+++ pkgsrc/devel/gnustep-objc/patches/patch-objc_runtime.h 2023/01/14 01:30:53 1.2
@@ -1,18 +1,20 @@ @@ -1,18 +1,20 @@
1$NetBSD: patch-objc_runtime.h,v 1.1 2022/01/26 15:57:54 tm Exp $ 1$NetBSD: patch-objc_runtime.h,v 1.2 2023/01/14 01:30:53 manu Exp $
2 2
3In gcc>=10 SEL is implemented as an build-in typedef. Because it's 3In gcc>=10 SEL is implemented as an build-in typedef. Because it's
4required to use the typedef by gnustep-objc it's defined to overwrite 4required to use the typedef by gnustep-objc it's defined to overwrite
5it. 5it.
6 6
7--- objc/runtime.h.orig 2015-08-07 11:33:41.000000000 +0000 7--- ./objc/runtime.h.orig 2020-08-23 15:10:20.000000000 +0000
8+++ objc/runtime.h 8+++ ./objc/runtime.h 2023-01-11 10:07:01.905661420 +0000
9@@ -68,6 +68,9 @@ typedef struct objc_ivar* Ivar; 9@@ -68,8 +68,11 @@
 10 */
10 #if !defined(__clang__) && !defined(__OBJC_RUNTIME_INTERNAL__) 11 #if !defined(__clang__) && !defined(__OBJC_RUNTIME_INTERNAL__)
11 typedef const struct objc_selector *SEL; 12 typedef const struct objc_selector *SEL;
12 #else 13 #else
13+#if __GNUC__ >= 10 14+#if __GNUC__ >= 10
14+#define SEL none 15+#define SEL none
15+#endif 16+#endif
16 typedef struct objc_selector *SEL; 17 typedef struct objc_selector *SEL;
17 #endif 18 #endif
18  19
 20 /**

cvs diff -r1.2 -r1.3 pkgsrc/devel/gnustep-objc/patches/patch-objcxx_eh.cc (expand / switch to unified diff)

--- pkgsrc/devel/gnustep-objc/patches/patch-objcxx_eh.cc 2020/04/17 13:32:23 1.2
+++ pkgsrc/devel/gnustep-objc/patches/patch-objcxx_eh.cc 2023/01/14 01:30:53 1.3
@@ -1,30 +1,69 @@ @@ -1,30 +1,69 @@
1$NetBSD: patch-objcxx_eh.cc,v 1.2 2020/04/17 13:32:23 joerg Exp $ 1$NetBSD: patch-objcxx_eh.cc,v 1.3 2023/01/14 01:30:53 manu Exp $
2 2
3Workaround build failure due to redefinition and include correct header. 3Workaround build failure due to redefinition and include correct header.
4 4
5--- objcxx_eh.cc.orig 2015-08-07 11:33:41.000000000 +0000 5--- ./objcxx_eh.cc.orig 2020-08-23 15:10:20.000000000 +0000
6+++ objcxx_eh.cc 6+++ ./objcxx_eh.cc 2023-01-11 13:01:46.256573178 +0000
7@@ -3,6 +3,7 @@ 7@@ -5,8 +5,9 @@
8 #include "dwarf_eh.h" 8 #include "dwarf_eh.h"
9 #include "objcxx_eh.h" 9 #include "objcxx_eh.h"
10 #include <exception> 10 #include "visibility.h"
 11 #include "objc/runtime.h"
11+#include <typeinfo> 12+#include <typeinfo>
12  13
13 extern "C"  14 /**
14 { 15 * Helper function that has a custom personality function.
15@@ -15,6 +16,7 @@ namespace __cxxabiv1 16 * This calls `cxx_throw` and has a destructor that must be run. We intercept
16  17@@ -56,8 +57,9 @@
17 using __cxxabiv1::__class_type_info; 18 */
 19 extern "C" __cxa_eh_globals *__cxa_get_globals();
 20 }
18  21
19+#if 0 22+#if 0
20 namespace std 23 namespace std
21 { 24 {
22 /** 25 struct type_info;
23@@ -48,6 +50,7 @@ namespace std 26 }
24 void **thrown_object) const; 27@@ -99,8 +101,9 @@
 28 public:
 29 const char* name() const { return __type_name; }
25 }; 30 };
26 } 31 }
27+#endif 32+#endif
28  33
29 using namespace std; 34 namespace
 35 {
 36 /**
 37@@ -190,9 +193,9 @@
 38 // __cxa_exception takes a pointer to the end of the __cxa_exception
 39 // structure, and so we find that by adding the size of the generic
 40 // exception structure + padding to the pointer to the generic exception
 41 // structure field of the enclosing structure.
 42- auto *cxxEx = pointer_add<__cxa_exception>(ex, exception_struct_size);
 43+ auto *cxxEx = pointer_add<__cxxabiv1::__cxa_exception>(ex, exception_struct_size);
 44 __cxa_free_exception(cxxEx);
 45 }
 46
 47 }
 48@@ -262,9 +265,9 @@
 49 *
 50 * This should never be called on Objective-C types.
 51 */
 52 virtual bool __do_upcast(
 53- const __class_type_info *target,
 54+ const __cxxabiv1::__class_type_info *target,
 55 void **thrown_object) const
 56 {
 57 return false;
 58 };
 59@@ -374,9 +377,9 @@
 60 _Unwind_Exception *ex = pointer_add<_Unwind_Exception>(newEx, -exception_struct_size);
 61 *pointer_add<std::type_info*>(ex, type_info_offset) = &__objc_id_type_info;
 62 ex->exception_class = cxx_exception_class;
 63 ex->exception_cleanup = exception_cleanup;
 64- __cxa_get_globals()->uncaughtExceptions++;
 65+ __cxxabiv1::__cxa_get_globals()->uncaughtExceptions++;
 66 return ex;
 67 }
30  68
 69 void* objc_object_for_cxx_exception(void *thrown_exception, int *isValid)

cvs diff -r1.2 -r1.3 pkgsrc/devel/gnustep-objc/patches/patch-objcxx_eh.h (expand / switch to unified diff)

--- pkgsrc/devel/gnustep-objc/patches/patch-objcxx_eh.h 2020/04/17 13:32:23 1.2
+++ pkgsrc/devel/gnustep-objc/patches/patch-objcxx_eh.h 2023/01/14 01:30:53 1.3
@@ -1,27 +1,30 @@ @@ -1,27 +1,30 @@
1$NetBSD: patch-objcxx_eh.h,v 1.2 2020/04/17 13:32:23 joerg Exp $ 1$NetBSD: patch-objcxx_eh.h,v 1.3 2023/01/14 01:30:53 manu Exp $
2 2
3Workaround build failure due to redefinition 3Workaround build failure due to redefinition
4 4
5--- objcxx_eh.h.orig 2015-08-07 11:33:41.000000000 +0000 5--- ./objcxx_eh.h.orig 2020-08-23 15:10:20.000000000 +0000
6+++ objcxx_eh.h 6+++ ./objcxx_eh.h 2023-01-11 10:07:02.311233320 +0000
7@@ -1,6 +1,11 @@ 7@@ -1,7 +1,12 @@
8 #ifdef __cplusplus 8 #ifdef __cplusplus
9 extern "C" { 9 extern "C" {
10 #endif 10 #endif
11+ 11+
12+#ifndef _GLIBCXX_NOTHROW 12+#ifndef _GLIBCXX_NOTHROW
13+#define _GLIBCXX_NOTHROW 13+#define _GLIBCXX_NOTHROW
14+#endif 14+#endif
15+ 15+
16 /** 16 /**
17 * Allocates a C++ exception. This function is part of the Itanium C++ ABI and 17 * Allocates a C++ exception. This function is part of the Itanium C++ ABI and
18 * is provided externally. 18 * is provided externally.
19@@ -25,7 +30,7 @@ __attribute__((weak)) DECLARE_PERSONALIT 19 */
 20@@ -34,9 +39,9 @@
 21 * Frees an exception object allocated by __cxa_allocate_exception(). Part of
20 * the Itanium C++ ABI. 22 * the Itanium C++ ABI.
21 */ 23 */
22 __attribute__((weak)) 24 __attribute__((weak))
23-void __cxa_free_exception(void *thrown_exception); 25-void __cxa_free_exception(void *thrown_exception);
24+void __cxa_free_exception(void *thrown_exception) _GLIBCXX_NOTHROW; 26+void __cxa_free_exception(void *thrown_exception) _GLIBCXX_NOTHROW;
25 /** 27 /**
26 * Tests whether a C++ exception contains an Objective-C object, and returns if 28 * Tests whether a C++ exception contains an Objective-C object, and returns if
27 * if it does. The second argument is a pointer to a boolean value indicating 29 * if it does. The second argument is a pointer to a boolean value indicating
 30 * whether this is a valid object.

cvs diff -r1.326 -r1.327 pkgsrc/doc/CHANGES-2023 (expand / switch to unified diff)

--- pkgsrc/doc/CHANGES-2023 2023/01/13 22:31:16 1.326
+++ pkgsrc/doc/CHANGES-2023 2023/01/14 01:30:53 1.327
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1$NetBSD: CHANGES-2023,v 1.326 2023/01/13 22:31:16 js Exp $ 1$NetBSD: CHANGES-2023,v 1.327 2023/01/14 01:30:53 manu Exp $
2 2
3Changes to the packages collection and infrastructure in 2023: 3Changes to the packages collection and infrastructure in 2023:
4 4
5 Updated devel/R-cli to 3.5.0 [mef 2023-01-01] 5 Updated devel/R-cli to 3.5.0 [mef 2023-01-01]
6 Updated devel/R-purrr to 1.0.0 [mef 2023-01-01] 6 Updated devel/R-purrr to 1.0.0 [mef 2023-01-01]
7 Updated www/R-webfakes to 1.1.6 [mef 2023-01-01] 7 Updated www/R-webfakes to 1.1.6 [mef 2023-01-01]
8 Updated devel/R-pkgcache to 2.0.4 [mef 2023-01-01] 8 Updated devel/R-pkgcache to 2.0.4 [mef 2023-01-01]
9 Updated devel/R-repr to 1.1.4 [mef 2023-01-01] 9 Updated devel/R-repr to 1.1.4 [mef 2023-01-01]
10 Updated databases/R-dbplyr to 2.2.1 [mef 2023-01-01] 10 Updated databases/R-dbplyr to 2.2.1 [mef 2023-01-01]
11 Updated archivers/R-zip to 2.2.2 [mef 2023-01-01] 11 Updated archivers/R-zip to 2.2.2 [mef 2023-01-01]
12 Updated misc/R-pillar to 1.8.1 [mef 2023-01-01] 12 Updated misc/R-pillar to 1.8.1 [mef 2023-01-01]
13 Updated math/R-tibble to 3.1.8 [mef 2023-01-01] 13 Updated math/R-tibble to 3.1.8 [mef 2023-01-01]
14 Updated databases/R-RSQLite to 2.2.20 [mef 2023-01-01] 14 Updated databases/R-RSQLite to 2.2.20 [mef 2023-01-01]
@@ -377,13 +377,14 @@ Changes to the packages collection and i @@ -377,13 +377,14 @@ Changes to the packages collection and i
377 Removed devel/libFoundation [wiz 2023-01-13] 377 Removed devel/libFoundation [wiz 2023-01-13]
378 Removed devel/gnustep-objc-lf2 [wiz 2023-01-13] 378 Removed devel/gnustep-objc-lf2 [wiz 2023-01-13]
379 Updated www/p5-CGI to 4.55 [wen 2023-01-13] 379 Updated www/p5-CGI to 4.55 [wen 2023-01-13]
380 Updated www/p5-Dancer to 1.3520 [wen 2023-01-13] 380 Updated www/p5-Dancer to 1.3520 [wen 2023-01-13]
381 Updated security/p5-Mozilla-CA to 20221114 [wen 2023-01-13] 381 Updated security/p5-Mozilla-CA to 20221114 [wen 2023-01-13]
382 Updated devel/p5-MooseX-Types-JSON to 1.01 [wen 2023-01-13] 382 Updated devel/p5-MooseX-Types-JSON to 1.01 [wen 2023-01-13]
383 Updated sysutils/ansible-core to 2.14.1nb1 [adam 2023-01-13] 383 Updated sysutils/ansible-core to 2.14.1nb1 [adam 2023-01-13]
384 Updated devel/py-future to 0.18.3 [adam 2023-01-13] 384 Updated devel/py-future to 0.18.3 [adam 2023-01-13]
385 Updated devel/p5-MooseX-OneArgNew to 0.007 [wen 2023-01-13] 385 Updated devel/p5-MooseX-OneArgNew to 0.007 [wen 2023-01-13]
386 Added databases/galera version 26.4.13 [wiz 2023-01-13] 386 Added databases/galera version 26.4.13 [wiz 2023-01-13]
387 Updated sysutils/lf to 28 [bsiegert 2023-01-13] 387 Updated sysutils/lf to 28 [bsiegert 2023-01-13]
388 Updated devel/asdf to 0.11.1 [schmonz 2023-01-13] 388 Updated devel/asdf to 0.11.1 [schmonz 2023-01-13]
389 Updated chat/element-web to 1.11.17 [js 2023-01-13] 389 Updated chat/element-web to 1.11.17 [js 2023-01-13]
 390 Updated devel/gnustep-objc to 2.1.0 [manu 2023-01-14]