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 alternativediff -r1.36 -r1.37 pkgsrc/devel/gnustep-objc/Makefile
(manu)
@@ -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 | |||
3 | DISTNAME= libobjc2-1.8.1 | 3 | DISTNAME= libobjc2-2.1.0 | |
4 | PKGNAME= ${DISTNAME:S/libobjc2/gnustep-objc/} | 4 | PKGNAME= ${DISTNAME:S/libobjc2/gnustep-objc/} | |
5 | CATEGORIES= devel gnustep | 5 | CATEGORIES= devel gnustep | |
6 | MASTER_SITES= ${MASTER_SITE_GNUSTEP:=libs/} | 6 | MASTER_SITES= ${MASTER_SITE_GITHUB:=gnustep/} | |
7 | GITHUB_PROJECT= libobjc2 | |||
8 | GITHUB_TAG= v2.1 | |||
7 | 9 | |||
8 | MAINTAINER= pkgsrc-users@NetBSD.org | 10 | MAINTAINER= pkgsrc-users@NetBSD.org | |
9 | HOMEPAGE= https://github.com/gnustep/libobjc2 | 11 | HOMEPAGE= https://github.com/gnustep/libobjc2 | |
10 | COMMENT= Objective-C runtime | 12 | COMMENT= Objective-C runtime | |
11 | LICENSE= mit | 13 | LICENSE= mit | |
12 | 14 | |||
15 | BUILD_DEPENDS+= clang-[0-9]*:../../lang/clang | |||
16 | ||||
13 | USE_LANGUAGES= objc c++11 | 17 | USE_LANGUAGES= objc c++11 | |
14 | USE_TOOLS+= gmake cmake | 18 | USE_TOOLS+= gmake cmake pax | |
15 | MAKE_FILE= GNUmakefile | 19 | USE_CMAKE= yes | |
16 | MAKE_ENV+= ADDITIONAL_LDFLAGS=-lpthread | 20 | CMAKE_ARGS+= -DCMAKE_C_COMPILER=${CLANGBASE:Q}/bin/clang | |
21 | CMAKE_ARGS+= -DCMAKE_CXX_COMPILER=${CLANGBASE:Q}/bin/clang++ | |||
22 | LDFLAGS+= -lm -lunwind -lstdc++ | |||
23 | MAKE_FILE= Makefile | |||
24 | MAKE_ENV+= ADDITIONAL_LDFLAGS="-lpthread" | |||
17 | MAKE_ENV+= LIBOBJC=libobjc | 25 | MAKE_ENV+= LIBOBJC=libobjc | |
18 | MAKE_ENV+= LIBOBJCXX=libobjcxx | 26 | MAKE_ENV+= LIBOBJCXX=libobjcxx | |
19 | MAKE_ENV+= VERSION=4.6 | 27 | MAKE_ENV+= VERSION=4.6 | |
20 | MAKE_ENV+= MAJOR_VERSION=4 | 28 | MAKE_ENV+= MAJOR_VERSION=4 | |
21 | MAKE_ENV+= MINOR_VERSION=6 | 29 | MAKE_ENV+= MINOR_VERSION=6 | |
22 | 30 | |||
23 | INSTALLATION_DIRS= lib include/objc | 31 | INSTALLATION_DIRS= lib include/objc | |
24 | 32 | |||
33 | post-extract: | |||
34 | cd ${BUILDLINK_PREFIX.robin-map} && \ | |||
35 | pax -rwpam include/tsl ${WRKSRC}/third_party/robin-map/ | |||
36 | ||||
25 | do-configure: | 37 | do-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-*) | |
36 | CMAKE_ARGS+= -DTESTS:BOOL=FALSE | 47 | CMAKE_ARGS+= -DTESTS:BOOL=FALSE | |
37 | .endif | 48 | .endif | |
38 | 49 | |||
39 | PLIST_VARS+= objcxx | 50 | PLIST_VARS+= objcxx | |
40 | .if ${OPSYS} != "FreeBSD" | 51 | .if ${OPSYS} != "FreeBSD" && ${OPSYS} != "NetBSD" | |
41 | PLIST.objcxx= yes | 52 | PLIST.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" |
@@ -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 $ | |
2 | include/Block.h | |||
3 | include/Block_private.h | |||
2 | include/objc/Availability.h | 4 | include/objc/Availability.h | |
3 | include/objc/Object.h | 5 | include/objc/Object.h | |
4 | include/objc/Protocol.h | 6 | include/objc/Protocol.h | |
5 | include/objc/blocks_private.h | 7 | include/objc/blocks_private.h | |
6 | include/objc/blocks_runtime.h | 8 | include/objc/blocks_runtime.h | |
7 | include/objc/capabilities.h | 9 | include/objc/capabilities.h | |
8 | include/objc/developer.h | 10 | include/objc/developer.h | |
9 | include/objc/encoding.h | 11 | include/objc/encoding.h | |
10 | include/objc/hooks.h | 12 | include/objc/hooks.h | |
11 | include/objc/message.h | 13 | include/objc/message.h | |
12 | include/objc/objc-api.h | 14 | include/objc/objc-api.h | |
13 | include/objc/objc-arc.h | 15 | include/objc/objc-arc.h | |
14 | include/objc/objc-auto.h | 16 | include/objc/objc-auto.h | |
17 | include/objc/objc-class.h | |||
18 | include/objc/objc-runtime.h | |||
19 | include/objc/objc-visibility.h | |||
15 | include/objc/objc.h | 20 | include/objc/objc.h | |
16 | include/objc/runtime-deprecated.h | 21 | include/objc/runtime-deprecated.h | |
17 | include/objc/runtime.h | 22 | include/objc/runtime.h | |
18 | include/objc/slot.h | 23 | include/objc/slot.h | |
19 | include/objc/toydispatch.h | |||
20 | lib/libobjc.so | 24 | lib/libobjc.so | |
21 | lib/libobjc.so.4 | |||
22 | lib/libobjc.so.4.6 | 25 | lib/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 | |
28 | lib/pkgconfig/libobjc.pc |
@@ -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 | |||
3 | BUILDLINK_TREE+= gnustep-objc | 3 | BUILDLINK_TREE+= gnustep-objc | |
4 | 4 | |||
5 | .if !defined(GNUSTEP_OBJC_BUILDLINK3_MK) | 5 | .if !defined(GNUSTEP_OBJC_BUILDLINK3_MK) | |
6 | GNUSTEP_OBJC_BUILDLINK3_MK:= | 6 | GNUSTEP_OBJC_BUILDLINK3_MK:= | |
7 | 7 | |||
8 | BUILDLINK_API_DEPENDS.gnustep-objc+= gnustep-objc>=1.3.0 | 8 | BUILDLINK_API_DEPENDS.gnustep-objc+= gnustep-objc>=1.3.0 | |
9 | BUILDLINK_ABI_DEPENDS.gnustep-objc+= gnustep-objc>=1.3.0nb1 | 9 | BUILDLINK_ABI_DEPENDS.gnustep-objc+= gnustep-objc>=1.3.0nb1 | |
10 | BUILDLINK_PKGSRCDIR.gnustep-objc?= ../../devel/gnustep-objc | 10 | BUILDLINK_PKGSRCDIR.gnustep-objc?= ../../devel/gnustep-objc | |
11 | 11 | |||
12 | BUILDLINK_CFLAGS.gnustep-objc+= -I${BUILDLINK_PREFIX.gnustep-objc}/include/objc | 12 | BUILDLINK_CFLAGS.gnustep-objc+= -I${BUILDLINK_PREFIX.gnustep-objc}/include/objc | |
13 | BUILDLINK_LDFLAGS.gnustep-objc+= -lobjc -lpthread | 13 | BUILDLINK_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 | |||
18 | BUILDLINK_TREE+= -gnustep-objc | 17 | BUILDLINK_TREE+= -gnustep-objc |
@@ -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 | |||
3 | BLAKE2s (libobjc2-1.8.1.tar.gz) = 2a19ab2491baa156f7cef635053080dc4bf3eae356f1156a79edb98ebd3c0434 | 3 | BLAKE2s (libobjc2-2.1.0.tar.gz) = 4812d384515b96a0b837356cd95f68fea492e109ad4166e6159f64b608299f79 | |
4 | SHA512 (libobjc2-1.8.1.tar.gz) = 518f36e96a82a076fc67fe384226bd97310cd10a53c7b0951db9f3658aa534582b245d5cb97956fe91c38338c3fc8f1e569dd8af36f6d12e32bf1460251d02eb | 4 | SHA512 (libobjc2-2.1.0.tar.gz) = a93c385f9ad53fce0f736088c3a18e72119c0128690725e435a35fe4250830d13e18899f98c7d80e6ea41cbfe1404f055d9d6c3d891ad7c770d47dcd0244fc7f | |
5 | Size (libobjc2-1.8.1.tar.gz) = 173635 bytes | 5 | Size (libobjc2-2.1.0.tar.gz) = 200290 bytes | |
6 | SHA1 (patch-GNUmakefile) = d9ba0c41e06122326cc6d2579af1db3d3323151d | 6 | SHA1 (patch-CMakeLists.txt) = 7b4a6a3c28a332ed96ab08837397455ea699bada | |
7 | SHA1 (patch-objc_runtime.h) = cc8aaeb1352a403abb918aaf5a12d86fdcea383f | 7 | SHA1 (patch-objc_runtime.h) = af2e2944e825e8982252a878939465a259324030 | |
8 | SHA1 (patch-objcxx_eh.cc) = 8804d075cb46380165e40af5f4abd5d8d413b92a | 8 | SHA1 (patch-objcxx_eh.cc) = 42760e1e3c91d686e13c6705c9b1f86d85a7d2ad | |
9 | SHA1 (patch-objcxx_eh.h) = 68a3709ed9d029e6ae4c7a6cc375678ee7c21b1e | 9 | SHA1 (patch-objcxx_eh.h) = 0ae17a3631d40e5db66ef0f0f09818d7fdc03d80 |
$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 ()
@@ -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 | |||
3 | In gcc>=10 SEL is implemented as an build-in typedef. Because it's | 3 | In gcc>=10 SEL is implemented as an build-in typedef. Because it's | |
4 | required to use the typedef by gnustep-objc it's defined to overwrite | 4 | required to use the typedef by gnustep-objc it's defined to overwrite | |
5 | it. | 5 | it. | |
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 | /** |
@@ -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 | |||
3 | Workaround build failure due to redefinition and include correct header. | 3 | Workaround 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) |
@@ -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 | |||
3 | Workaround build failure due to redefinition | 3 | Workaround 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. |
@@ -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 | |||
3 | Changes to the packages collection and infrastructure in 2023: | 3 | Changes 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] |