Commit Graph

4244 Commits

Author SHA1 Message Date
Thomas A
260697e7a9 [Kerberos] Update Framework header Symbolic-Link 2023-05-02 16:22:04 -07:00
Thomas A
b5b7dd0b8d [IOKit] Update Framework Headers Symbolic-Link 2023-05-02 16:22:04 -07:00
Thomas A
f09cad4352 [SoftLinking] Add SOFT_LINK_OPTIONAL_FRAMEWORK Stub 2023-05-02 16:22:04 -07:00
Thomas A
f78046581e [icu] Fix ulocdata.h symbolic link 2023-05-02 16:22:04 -07:00
Thomas A
86701b081a [InternationalSupport] Implement "minimizedLanguagesFromLanguages:" stub 2023-05-02 16:22:04 -07:00
Thomas A
f22434231e [duct] Add "crashreporter_annotations_t" struct 2023-05-02 16:22:04 -07:00
Thomas A
e105a1b3a1 [DiskArbitration] Update Headers From DiskArbitration-342.140.1 Source
Also stubbed DADisk values
2023-05-02 16:22:04 -07:00
Thomas A
fcc3d8c766 Update add_darling_executable to reference crt1.10.6
Adding in crt.c object file breaks the bash executable, luckly it is not need for later versions (10.5 or later) of macOS. So we can just not include it.
2023-05-02 16:22:03 -07:00
Thomas A
58fba5a72a [kernel/libsyscall] Add back fallback for mach_get_times
Fixes notifyd crashing
2023-05-02 16:22:03 -07:00
Thomas A
272dbd2710 [mldr] Set kernel/user page shift values in memory
In the past these values would be hardcoded, but now these values are grabbed from memory.

Include the math library as part of the link libraries.
2023-05-02 16:22:03 -07:00
Thomas A
33e2d2322f [kernel/libsyscall] Update CMakeLists.txt 2023-05-02 16:22:03 -07:00
Thomas A
e985f5a408 [kernel/libsyscall] Include "sys/fcntl.h" in fcntl-base.c 2023-05-02 16:22:03 -07:00
Thomas A
f9f1d9d839 [libsysmon] Remove OS_object from OS_sysmon_object.h
There seems to be a duplicate conflict:

```
/home/user/Downloads/darling/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sysmon/OS_sysmon_object.h:20:1: error: duplicate interface definition for class 'OS_object'
@interface OS_object
^
/home/user/Downloads/darling/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/os/object.h:203:1: note: previous definition is here
OS_OBJECT_DECL_BASE(object, NSObject);
```
2023-05-02 16:22:03 -07:00
Thomas A
84c3da19b8 [kernel/libsyscall] Add stub methods for os_thread_self_restrict. 2023-05-02 16:22:03 -07:00
Thomas A
653d430df8 [kernel/libsyscall] Generate bsdsyscalls using xnu-7195.141.2 files 2023-05-02 16:22:03 -07:00
Thomas A
fc97b2ad30 [kernel/libsyscall] Restore darling specific changes 2023-05-02 16:22:03 -07:00
Thomas A
73761f1c6c [kernel/libsyscall] Add Workaround For Case Sensitivity 2023-05-02 16:22:02 -07:00
Thomas A
b947d5e647 [kernel/libsyscall] Add syscalls.master and restore ppc/syscall.map
`syscalls.master` is taken from `xnu/bsd/kern` (xnu-7195.141.2)
2023-05-02 16:22:02 -07:00
Thomas A
839836fdaa [src/kernel/libsyscall] Update source to xnu-7195.141.2 2023-05-02 16:22:02 -07:00
Thomas A
c9613e1608 Define PLATFORM_MacOSX
The cdef.h header is used to automatically determine how a symbol should be defined. Since no platform was defined, the `__DARWIN_ONLY_UNIX_CONFORMANCE` would not properly get set to 1 if the arch is not `i386`.

This fixes the issues where x86_64 would have `$UNIX2003` appended to some of the symbols.

I recommend refering to the `COMPAT(5)` man page for a better understanding on this issue.
2023-05-02 16:22:02 -07:00
Thomas A
fdbb1f49a8 Update symbolic header 2023-05-02 16:22:02 -07:00
Thomas A
557e7e9dec Fix Metal SDK Header Symlinks 2023-05-02 15:37:09 -07:00
Ariel Abreu
565f9639ca
Merge pull request #1355 from zhaofengli/fix-wrapgen-vaddr
wrapgen: Fix address resolution in dynamic section
2023-05-01 15:42:13 -04:00
Ariel Abreu
6dcf8d8d9c
Update darlingserver and nano 2023-05-01 14:37:44 -04:00
Ariel Abreu
e34366db25
Merge pull request #1358 from zhaofengli/fix-libm-rpath
libm: Remove unused rpath config
2023-05-01 14:36:41 -04:00
CuriousTommy
9dcf75cf07
Merge pull request #1352 from CKegel/LaunchServices_patch
Rewrite LSINFO getDatabaseQueue in LaunchServices to be Threadsafe
2023-04-30 14:07:55 -07:00
ckegel
95e77cd7b2 Fix LaunchServices to retrieve the DatabaseQueue in a thread-safe manner 2023-04-30 13:16:39 -04:00
Christian
20b1b34fba
Add AE TypeDefs for AppKit Apps (#1363)
added typedefs for Appkit Events
2023-04-28 10:55:49 -07:00
CuriousTommy
896a8989d0
Merge pull request #1360 from darlinghq/relocate_bmalloc_headers
Relocate "bmalloc" Headers
2023-04-26 20:00:07 -07:00
Zhaofeng Li
ce466ff296 libm: Remove unused rpath config
Ref: https://github.com/darlinghq/darling/pull/1358#issuecomment-1519590780
2023-04-26 14:37:57 -06:00
Thomas A
973698b8f1 Update "bmalloc" Path 2023-04-26 13:34:26 -07:00
Ariel Abreu
410e215184
Merge pull request #1356 from zhaofengli/pyc-optional
cmake: Make Python 2 bytecode pre-compilation optional
2023-04-26 14:34:05 -04:00
CuriousTommy
8d744680ec
Merge pull request #1359 from darlinghq/update_wtf_include
Update WTF Include Path
2023-04-24 14:14:50 -07:00
Thomas A
5f47b0aa33 Update WTF Include Path 2023-04-24 09:57:40 -07:00
Zhaofeng Li
1aa60261f6 cmake: Make Python 2 bytecode pre-compilation optional
This affects performance while preserving compatibility.

Ref: #1074
2023-04-23 16:22:37 -06:00
Zhaofeng Li
8fa8c70d7d wrapgen: Fix address resolution in dynamic section
The values are addresses which aren't necessarily equal to file
offsets.
2023-04-22 21:42:00 -06:00
Ariel Abreu
759f5479a6
Update darlingserver
This should allow Darling to compile with Clang 15
2023-04-21 18:16:06 -04:00
Ariel Abreu
39b0f38c24
Add libcap2-bin to Debian build deps
We need it for the setcap executable
2023-04-14 19:50:52 -04:00
Ariel Abreu
9797e2d32a
Build Darling on a faster private CI machine
This machine is not always available, but when it is,
it's much faster (about 5-10 mins) than both the
GitHub Actions CI (3+ hours) and the old private CI machine (1+ hour).
2023-04-14 19:07:46 -04:00
Ariel Abreu
84a6ae50d4
Update Cocotron and Metal; get rid of Vulkan and LLVM wrappers 2023-04-12 15:11:35 -04:00
Ariel Abreu
b811648393
Make Metal an optional part of the build
The new `ENABLE_METAL` option can be set to `ON`/truthy, `OFF`/falsy,
or `AUTO` (the default). When set to `AUTO`, Metal support will only be
enabled if LLVM and Vulkan are available.

Note that even if Metal support is compiled-in, Metal will only be
available at runtime if LLVM and Vulkan are available. This also means
that you can build Darling on a host with LLVM and Vulkan available and
install it on machines without these libraries available with no issue
(the only effect would be that Metal would be unavailable at runtime on
these machines).
2023-04-12 15:10:59 -04:00
Ariel Abreu
bf3abfb1c9
Be smarter about how we find libLLVM.so
On some distros, LLVM is not placed in the root of `/usr/lib` and is
kept in a versioned subdirectory instead. Regardless of what the case
is, llvm-config should give us the right path.

*This* should finally fix the CI build.
2023-04-12 14:59:43 -04:00
Ariel Abreu
53447d925a
[debian] Add LLVM and Vulkan as dependencies
This should hopefully fix the CI build as well
2023-04-10 07:26:16 -04:00
Ariel Abreu
2d3b258851
More work on Metal support
Basic rendering works! (kind of; see the Cocotron commit for more details)
2023-04-10 07:26:15 -04:00
Ariel Abreu
876dea3a13
Start work on an actual Metal implementation 2023-04-10 07:26:15 -04:00
Ariel Abreu
34c9b22112
Various fixes and improvements for darling-coredump
These changes, most notably the last one, should greatly improve the
reliability of core dumps produced with `darling-coredump`.

  * Mark areas with `protection == 0` as invalid. These regions aren't
    supposed to be accessed anyways, so we might as well not dump them.
  * Add a few debugging options: `DUMP_FLOAT_STATE` to enable/disable
    dumping floating-point state, `ALIGN_REGIONS` to enable/disable
    page-aligning dumped regions, and `INVALIDATE_DEVICES` to
    enable/disable marking devices (in `/dev`) as invalid regions.
  * Continuously retry file writes in `dump_emit` until the entire
    buffer has been written. It's possible for the `write` system call
    to simply write fewer bytes than what we give it for absolutely no
    reason at all (well, it's because of write buffering, but that's not
    something we control, so it's seemingly arbitrary to us). Therefore,
    to ensure we write the full buffer in as many cases as possible, we
    have to retry the `write` syscall until we either get a fatal error
    or finish writing the contents.
  * Always dump memory regions according to memory size, not file size.
    As explained in a comment, LLDB assumes that contiguous memory
    regions are also contiguous in the file. This is a reasonable
    assumption, but it means that regions whose memory size is larger
    than their file size have to be manually zero-extended in the file
    to match their memory size. I actually had to clone LLDB and build
    it locally and debug it (with LLDB) to figure out that this is what
    it was doing and why it was loading an otherwise-correct core dump
    improperly.
2023-04-10 07:25:30 -04:00
Thomas A
fc46ad2138 Fix parameter name omitted Build Issue 2023-03-29 14:57:30 -07:00
Ariel Abreu
46443de5e2
Fix NT_PRSTATUS handling for i386
Of course, on 32-bit architectures, all the fields in the structure are
32-bit as well, so we need to use a separate structure for them.
2023-03-29 08:01:49 -04:00
Ariel Abreu
d7b8f39262
WIP work on 32-bit core dump support
`darling-coredump` can now process 32-bit core dumps, but it doesn't seem
to produce anything usable (LLDB says the code memory is missing in the
core dump).
2023-03-28 22:47:20 -04:00
Thomas A
e56511bd14 Add Configuration To Load Core Dumps In VSCode Debugger 2023-03-28 11:37:49 -07:00