1328 Commits (d0d28b8f9df02db471e6a39b5b78358ab07ad753)
 

Author SHA1 Message Date
David Chisnall a575db7392 Fix C++ runtime detection.
- Don't try to detect libc++abi.  It doesn't actually work, so don't
   try it.
 - Correctly try to link the standard library.

This should fix the build on GNU/Linux systems with libc++abi.so
installed (including our Ubuntu CI!).
5 years ago
Frederik Seiffert 4cf4ad145c
Correctly copy inner exception structs when building for ARM. (#166)
Fixes #164.
6 years ago
Frederik Seiffert cca84b183c Fix building without ObjC++ support. 6 years ago
Frederik Seiffert ed8eec6c6a Add unwind COPY_EXCEPTION macro. 6 years ago
David Chisnall b39a42252e Hide ARC warnings behind an off-by-default flag. 6 years ago
David Chisnall 3b8879720c More EH fixes.
libsupc++ is more aggressive about internal consistency checks than
libcxxrt, so we need to be more careful in the interop.  The tests from
PR #138 now pass for me on Debian with libsupc++.
6 years ago
David Chisnall be6483de6d Improve constant string support in tests.
This makes no difference to existing tests, but is needed for the ones
in #138
6 years ago
David Chisnall ec5c0bcae2 More C++ exception fixes.
* Make sure the unwind state is synchronised between the Objective-C
   and C++ exception objects.
 * Reintroduce the is-pointer callback so that `__cxa_begin_catch`
   adjusts the pointer correctly.  Objective-C++ code uses
   `__cxa_begin_catch` without the `objc_begin_catch` wrapper and the
   runtime does not call the `__do_catch` method on the type info if the
   type info is an exact match, so the caught object ended up being a
   pointer to the object.  This also meant that we needed to remove the
   double dereference in the `__do_catch` methods.
 * Introduce a subclass of `std::type_info` for all Objective-C types
   and move the `virtual` functions there.  This should simplify
   supporting libc++abi.
6 years ago
Johannes Brakensiek d5973fb6ce Add INSTALL instruction to reflect that git submodules need to be checked out as well 6 years ago
David Chisnall 1594de76c3
Merge pull request #156 from gnustep/detect-ehabi
Initial run-time detection of C++ EH ABI variant.
6 years ago
David Chisnall 65d6b279a0 Rework C++ exception interop again.
We now, the first time we encounter a foreign exception, throw a C++
exception through a frame that has a custom personality function and
probe the layout of the __cxa_exception structure.
We then use the offsets learned from this along with the public ABI
functions for allocating the structure.

At the same time, add a test that we are correctly setting the count of
uncaught exceptions.

Fixes #146
6 years ago
David Chisnall 76e081dc48 Initial run-time detection of C++ EH ABI variant.
On Itanium C++ ABI platforms, there are a lot of different variations
that have subtly different structure layouts.  This commit adds a
run-time test that throws a C++ exception through a function that has
its personality function replaced with a wrapper so that we can inspect
a C++ exception in controlled conditions.

Initially, this just detects the exception type value used for C++
exceptions.
6 years ago
David Chisnall ec8782e396
Merge pull request #149 from gnustep/checkARCAccessors-fix
Fix detection of ARC-incompatible memory management methods
6 years ago
David Chisnall 5a35fff19d Add test for checking whether a class supports fast ARC. 6 years ago
David Chisnall 2d87ac45a1 Fix logging macro 6 years ago
rfm 8dbee52d24 Fix fast-ARC checks.
Check for release and autorelease as well as for retain.
6 years ago
David Chisnall 78ff24516c Fix invoking missing superclass methods.
The lookup functions for the superclass paths were silently ignoring
missing methods, rather than calling the forwarding hook.

Fixes #153
6 years ago
David Chisnall fa2914b13c Don't fail on ctest writing to stderr
When passing -T to ask CTest to generate XML output, CTest complains
about a missing TCL file.  This causes the build steps to fail.  To
avoid that, make sure the ctest invocation is the last line in the
script so that its error status will be reported.
6 years ago
David Chisnall 2d46c97544 Add a publish results step to Azure pipeline. 6 years ago
David Chisnall 691c1df6ad Bump the Linux CI version to Ubuntu 18.04 6 years ago
David Chisnall bbf748474c Bump CI FreeBSD image version. 6 years ago
Frederik Seiffert 97de29fae2 Match indentation in unwind-arm.h 6 years ago
Frederik Seiffert 849fa9c8eb Match _Unwind_Reason_Code enum between ARM and Itanium. 6 years ago
Frederik Seiffert 186847c8d0 Fix eh_win32_msvc.cc includes 6 years ago
David Chisnall 249acabbf4 Disable a test on Windows.
This is failing (and needs fixing) but it's unhelpful for CI to report
failures on Windows for PRs.
6 years ago
David Chisnall 769ac2f8b7 Fix some bad instructions in the INSTALL file. 6 years ago
Niels Grewe cbfc592713
Merge pull request #148 from gnustep/mmap-anonymous
Use (anonymous) mmap() for allocating block-based IMPs.
6 years ago
Niels Grewe 0e84e318e7
Use (anonymous) mmap() when available.
Should fix #147 (SELinux related segfault)
6 years ago
Dustin L. Howett bfc0b9afe4 Operate on the real weak ref table when erasing an entry
Fixes #144.

(cherry picked from commit 9702494b902eedf9383e9194df372a4482d7a044)
6 years ago
Dustin L. Howett 7ad75c07d6 Revert "Fix test failure."
This reverts commit 336d8a828c.

(cherry picked from commit 194d2ba8db86a03a08ef825501627d7d178e4202)
6 years ago
Niels Grewe 59815ebc10 fix test for class properties 6 years ago
Niels Grewe ecdc4ffbd4 check both for the full and the short name of the C++ ABI library, unset cache if the library is not usable 6 years ago
Niels Grewe 8e749db5ca chore: Add project() statement to prevent noise in CMake logs 6 years ago
Niels Grewe 5578072611
Write a correct .pc file for gnustep-make installs
Fixes #140
6 years ago
David Chisnall 7c79dfc4c5 Add missing files. 6 years ago
David Chisnall aa775cf835 Fix ObjC++ interop bug.
The reworked wrapping of C++ exceptions meant that we were missing a
dereference of the result of __cxa_begin_catch.

Add a test that triggers this issue.  It would have occurred in the
non-ARC version if we actually did anything with the exception, but
compiling it in ARC mode makes the compiler insert retain / autorelease
around the exception object to ensure that it remains live.
6 years ago
David Chisnall 8e59872681 Require C++14 in CMake. 6 years ago
Niels Grewe 8249036318 generate a pkg-config file 6 years ago
David Chisnall 28375c9a27
Merge pull request #132 from triplef/freebsd-test-libcxxrt
Run FreeBSD CI also against libcxxrt master.
6 years ago
Frederik Seiffert ecfce73295 Run FreeBSD CI also against libcxxrt master. 6 years ago
David Chisnall 55819ce107 Move the libstdc++ code path to a separate file.
We need to #include <exception> for this to work, but this brings in the
public definition of `std::type_info` and, unfortunately, that breaks
the private definition that we need in this compilation unit.
6 years ago
David Chisnall 55a4719976 Attempt to fix libsupc++ support.
Recent versions of libstdc++ appear to have lost the clean layering
between libstdc++ and libsupc++, so use the high-level APIs and some
pointer evilness to fudge the low-level ones...
6 years ago
David Chisnall 0ad8cad910 Remove the include of <cxxabi.h>
This removes conflicting definitions on libsupc++ platforms.
6 years ago
David Chisnall 242442b3aa Rework Objective-C++ exceptions.
The new version now does not depend on the layout of the C++ exception
structure and instead finds the two offsets that it cares about.

Fixes #108
6 years ago
David Chisnall 8e26f54e3e
Merge pull request #119 from gnustep/arc-cxx
Rework ARC code as C++.

Fixes #107
6 years ago
David Chisnall 75ad9243a1 Prevent libc++ from using exceptions. 6 years ago
David Chisnall 457361354c Merge remote-tracking branch 'origin/master' into arc-cxx 6 years ago
Rupert Daniel 108d4e19c0 Updated BlockImpTest asserts. Fixes #126
assert now directly compares block self with expected class, avoiding
objc_msgSend.
6 years ago
Rupert Daniel 710b2368cc Fixed crash when using self in imp_implementationWithBlock on armv7a 6 years ago
Frederik Seiffert 7166a41999 Fixed usage of properties linked list. 6 years ago