Commit Graph

1828 Commits

Author SHA1 Message Date
Yen Chi Hsuan
b87a2ca53d There's no need to close an invalid FILE*
Android doesn't have /proc/modules, and darling segfaults instead of
reporting errors elegantly. On BioniC, fclose(NULL) leads to SIGSEGV.

a8f9c8069e/libc/stdio/stdio.cpp (374)
2017-04-13 23:19:23 +08:00
Yen Chi Hsuan
3d0159dc1f Skip kernel module handling on Android
Android does not provide utilities like modprobe
2017-04-13 23:17:09 +08:00
Yen Chi Hsuan
87446d26a5 mldr: use bswap_32 instead. Now the whole tree builds
glibc has bswap_32 => __bswap_32 => __builtin_bswap32
Android NDK has bswap_32 => __swap32 => __builtin_bswap32
2017-04-13 23:15:59 +08:00
Yen Chi Hsuan
731c33e26d Skip mldr32 on Android
Android NDK with x86_64 doesn't support -m32 with -ldl
2017-04-13 22:57:35 +08:00
Yen Chi Hsuan
54cfbd72c6 Use Threads::Threads to link mldr for better portability on Android
Android does not have libpthread.so, and thus -pthread should be used
instead.
2017-04-13 22:41:30 +08:00
Yen Chi Hsuan
357243f047 Add a cmake option BUILD_ANDROID
And skip components not applicable on Android

* fuse: Android's kernel do support fuse, but there's no libfuse.
  Instead, those who need fuse, like the /system/bin/sdcard daemon,
  talks to the kernel directly.
* udev: Android doesn't use udev. They use ueventd instead.
2017-04-13 21:48:23 +08:00
Yen Chi Hsuan
600b660812 Don't insert clang include path for host (ELF) executables
Host (ELF) executables like darling, mldr or wrapgen are not built with
-nostdinc, so there's no need to insert clang's include path manually.
On the other hand, cross-compiled darling and mldr may use a different
set of clang includes, which may cause conflicts. For example, Android
NDK uses customized headers in
$NDK/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/3.8.275480/include/
2017-04-13 21:21:32 +08:00
Yen Chi Hsuan
f28d4a5a4b Move wrapgen to another directory
To support cross-compiled Darling, mldr and darling should be compiled
for target system wrapgen not. Split them for simpler build systems.
2017-04-13 21:16:38 +08:00
Lubos Dolezel
cf5bf5a38d Cleanup in src/kernel/mach 2017-04-13 11:18:13 +02:00
Lubos Dolezel
76ca3173e1 Set compatibility version to 1.0.0 by default for dylibs 2017-04-13 11:18:10 +02:00
Lubos Dolezel
27c53a03a0 Work on getting libdispatch working 2017-04-12 14:59:39 +02:00
Lubos Dolezel
01638947a1 Our new libdispatch doesn't crash immediately 2017-04-11 16:38:26 +02:00
Lubos Dolezel
926482c5ed Merge remote-tracking branch 'origin/master' into newlkm 2017-04-11 12:40:44 +02:00
Lubos Dolezel
2e9324d632 Add dummy __pthread_canceled() syscall impl 2017-04-11 12:08:25 +02:00
Lubos Dolezel
3f6cfa2b2f Handle TIOCISATTY ioctl() 2017-04-11 12:08:10 +02:00
Lubos Dolezel
77cea17e61 Merge remote-tracking branch 'origin/master' into newlkm 2017-04-11 09:45:02 +02:00
Andrew Hyatt
74b89da9cd Merge branch 'master' of https://github.com/darlinghq/darling
I can't merge now because of unstaged changes (sorry)
2017-04-10 19:33:19 -07:00
Andrew Hyatt
108a8257f3 Update Security
It is still not built by default, as it is broken
2017-04-10 19:31:27 -07:00
Andrew Hyatt
e628355b16 Some CoreGraphics corrections 2017-04-10 19:29:42 -07:00
Andrew Hyatt
539d4fc0e8 Add TextEdit 2017-04-10 19:27:19 -07:00
Lubos Dolezel
e042929dc9 Workqueues with kevents (untested) implementation (#287) 2017-04-10 17:54:37 +02:00
Yen Chi Hsuan
a0b4b5e89d Add /bin/expr
This was the same as f01f28650f.
bfc5afc061 accidentally reverted it.
2017-04-09 23:49:57 +08:00
Lubos Dolezel
34da42bf33 Add libkqueue wrapper for kevent64 (#288) 2017-04-09 13:38:23 +02:00
Lubos Dolezel
fdc3ea4c5a Add dummy guarded_* functions that actually do no guarding 2017-04-09 12:02:00 +02:00
Andrew Hyatt
80c0ac3cd9 Set versions for sub frameworks 2017-04-08 15:05:41 -07:00
Lubos Dolezel
a07f054985 Merge remote-tracking branch 'origin/master' into newlkm 2017-04-08 23:57:54 +02:00
Lubos Dolezel
5ad660ca6b Initial BSD syscall tracing (resolves #282) 2017-04-08 23:44:50 +02:00
Andrew Hyatt
c6df5cf359 Merge branch 'master' of https://github.com/darlinghq/darling 2017-04-08 14:40:54 -07:00
Andrew Hyatt
ddbcac42e0 Build login.framework and DebugSymbols.framework 2017-04-08 14:40:17 -07:00
Andrew Hyatt
8ec15186ad Do one import per line 2017-04-08 14:04:48 -07:00
Andrew Hyatt
28652c46d1 Improvements to stub-gen-c-func.py 2017-04-08 14:04:02 -07:00
Andrew Hyatt
e3bf8634c3 Build ImageIO stubs 2017-04-08 13:56:40 -07:00
Andrew Hyatt
29df86d67a Stop building BSD patch
GNU patch is used by macOS instead
2017-04-08 13:56:14 -07:00
Andrew Hyatt
bfc5afc061 Update darling-dmg and shell_cmds 2017-04-08 13:49:27 -07:00
Andrew Hyatt
2edab8ebd1 Merge branch 'master' of https://github.com/darlinghq/darling 2017-04-08 13:48:56 -07:00
Andrew Hyatt
ab1b98f5a5 Some OpenDirectory work 2017-04-08 13:48:26 -07:00
Andrew Hyatt
0c00bb48fd Create stub-gen-c-func.py 2017-04-08 13:43:52 -07:00
Luboš Doležel
5b4acc7474 Merge pull request #285 from yan12125/add-expr
Add /bin/expr
2017-04-08 20:14:38 +02:00
Yen Chi Hsuan
f01f28650f Add /bin/expr 2017-04-09 02:12:47 +08:00
Sergey Bugaev
742b0f6bad Fix hdiutil 2017-04-08 20:07:37 +03:00
Sergey Bugaev
f0e8f43654 Fix exec'ing ELFs 2017-04-08 20:03:15 +03:00
Andrew Hyatt
0a0ab22382 Add DSTools and DirectoryServices
This is for the `dsmemberutil` program, needed by the Homebrew installer
2017-04-07 19:04:50 -07:00
Lubos Dolezel
b84380505a Fix 'make lkm_install' 2017-04-07 21:06:19 +02:00
Lubos Dolezel
b2f23864f7 LKM build from CMake (resolves #280) 2017-04-07 18:48:16 +02:00
Andrew Hyatt
a9abe47e0d Fake the GID too 2017-04-07 08:31:04 -07:00
Lubos Dolezel
1dda3fd5ac Fix mach_port_allocate() 2017-04-07 12:00:00 +02:00
Andrew Hyatt
9539c45b55 Build patch_cmds 2017-04-06 20:02:11 -07:00
Andrew Hyatt
c70524cff6 Build misc_cmds 2017-04-06 19:33:36 -07:00
Andrew Hyatt
2b3b86da3f Build basic_cmds 2017-04-06 15:40:36 -07:00
Lubos Dolezel
6da6cb1102 Update to newest LKM submodule 2017-04-06 17:28:14 +02:00