summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-01-05Makefile: Detect and link an obstack librarySamuel Holland2-3/+20
Signed-off-by: Samuel Holland <samuel@sholland.org>
2019-01-05Makefile: Clean up compiler invocationsSamuel Holland1-9/+11
- Respect user CFLAGS and LDFLAGS consistently. - Consistent use of curly braces for variables over parentheses. - Sort flags, putting '-o' at the end for readability of `make` output. - -fPIE doesn't mean anything to the linker Signed-off-by: Samuel Holland <samuel@sholland.org>
2019-01-05run clang-format on the source codeSamuel Holland1-1/+1
Signed-off-by: Samuel Holland <samuel@sholland.org>
2019-01-05Makefile: depend on internal.h; format headersSamuel Holland3-11/+11
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-11-12wchar: Implement __wcstol_internalA. Wilcox2-0/+17
2018-09-21Release 0.3.00.3.0A. Wilcox1-1/+5
2018-09-21Merge branch 'patch-3' into 'master' A. Wilcox14-24/+177
Add some more functions (notably __cxa_thread_atexit_impl and realpath) and run clang-format See merge request !3
2018-09-11libgcompat: Fix formatting inconsistencies (clang-format)Samuel Holland6-24/+21
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-09-11unistd: Add __open_2 and its __open64_2 aliasSamuel Holland2-0/+14
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-09-11stdlib: Add secure_getenv alias to __secure_getenvSamuel Holland2-0/+9
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-09-11readlink: Report EIO on /proc read failureSamuel Holland2-0/+2
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-09-11realpath: Intercept realpath(/proc/self/exe)Samuel Holland3-2/+55
Reuse the machinery from readlink Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-09-11readlink: Report ENOSYS on dlsym failureSamuel Holland2-0/+8
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-09-11ctype: Add __ctype_bSamuel Holland3-0/+8
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-09-11cxx_thread: Add __cxa_thread_atexit_implSamuel Holland3-0/+62
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-07-08Merge branch 'master' into 'master' A. Wilcox2-0/+36
string: add memfrob and strfry This adds two missing glibc string functions. See merge request !2
2018-06-21string: add memfrob and strfryJason A. Donenfeld2-0/+36
2018-06-13string: add __strcspn_c2A. Wilcox2-0/+23
2018-06-13resolv: add __res_search aliasA. Wilcox2-0/+12
2018-04-03Update changelogElizabeth Myers1-0/+6
2018-04-03malloc: add malloc_trim functionElizabeth Myers1-0/+6
2018-04-03Fix stupid blunder in the changelogElizabeth Myers1-0/+5
2018-04-03socket: fix buildElizabeth Myers1-0/+1
2018-04-03Update changelogElizabeth Myers1-1/+1
2018-04-03socket: __poll_chkElizabeth Myers1-0/+13
2018-04-03Fix silly type in Contribution GuideA. Wilcox1-2/+2
2018-04-03Update CHANGELOGA. Wilcox1-0/+6
2018-04-03math: implement most of glibc's __*_finite functionsElizabeth Myers1-2/+1090
These are supposed to be specialisations for speed, but these are just faked. Some warnings were added too, if they return infinite values. As a side effect of this change, scalbl is also now implemented. As noted, not all functions are implemented; the big two blockers are an implementation of j0l and y0l; I imagine Bessel functions aren't too widely used, so I doubt that many things will want them. Someone (not it) can implement them later.
2018-04-03GCOMPAT__assert_with_reason: omit format parameterElizabeth Myers1-2/+2
__VA_ARGS__ expects one or more arguments; this is a cheesy hack to allow passing only a format string (which is often all you need for small asserts).
2018-03-16README: document WITH_LIBUCONTEXT variableWilliam Pitcock1-6/+7
2018-03-16CHANGELOG: note libucontext supportWilliam Pitcock1-0/+9
2018-03-16build: allow building with libucontext supportWilliam Pitcock2-2/+13
2018-02-23gnulib: use GCOMPAT__assert_with_reason() instead of bare assert()William Pitcock1-2/+10
2018-02-23libgcompat: add internal api for GCOMPAT__panic().William Pitcock3-0/+33
2018-02-20CHANGELOG: update for 0.2.00.2.0A. Wilcox1-1/+9
2018-02-15CONTRIBUTING: gcompat development is actually gcompat@lists.adelielinux.org nowWilliam Pitcock1-1/+1
2018-02-08loader: quiet some valgrind warningsWilliam Pitcock1-3/+3
2018-02-07misc: implement __libc_stack_endWilliam Pitcock1-0/+2
2018-02-07loader: gracefully handle user-exec of the ELF interpreter itselfWilliam Pitcock1-0/+12
2018-02-01socket: add __cmsg_nxthdrA. Wilcox2-0/+16
2018-02-01malloc: add __sbrkA. Wilcox2-0/+12
2018-02-01CHANGELOG: update copyright year, add smaeul's laundry list :)A. Wilcox1-3/+156
2018-02-01Merge branch 'patch-1' into 'master' A. Wilcox33-389/+1713
Clean up everything and add lots of new functions I hope everything here is okay. I fixed some bugs in existing functions (mostly wrong prototypes or off-by-one errors) and formatted everything to a consistent style. If you'd like me to adjust the style, that's no problem. It wasn't very consistent to start with (within the code, and compared to the documentation). *I added specific notes you may want to comment on to some of the commit messages.* Major features: * Pass correct `argv[0]` in loader * Intercept `readlink("/proc/self/exe")` to allow re-exec * Add almost all reasonable-to-implement functions in LSB 5.0.0 core generic libc. Remaining functions are: - Impossible-to-implement: sigreturn - Not useful: reentrant random (`*rand48_r`, etc.), argz, envz, pmap, rpc (clnt_*, svc*, xdr*), bindresvport - Got tired of it: checked wchar * Add additional functions used by android and its NDK tools (clang, cmake, lldb, ninja, etc.). At this point, I am able to run Android Studio with the bundled prebuilt JDK, and compile, install, and run an android application (including one with native libraries) on a real device, with only a few minor issues: * must export `LD_LIBRARY_PATH=/opt/android-studio/jre/jre/lib/amd64/server` because musl and glibc interpret the variable differently with regards to `dlopen`. This is something that has to be patched in musl builds of openjdk, so it's not a gcompat issue. * ld.bfd fails to parse the argument `--sysroot=/path`, but can parse `--sysroot /path`. So there's some difference with `getopt_long_only` (or getopt in general). May be a bug, may be just an API difference. May be it can be patched up. * LLDB fails to connect to the android phone for native debugging -- I haven't tried it on glibc yet, so it may not be a gcompat issue at all (may be a phone or the app issue). I'd be happy to send some documentation later. See merge request !1
2018-01-15stdlib: add __strtol_internalWilliam Pitcock1-0/+10
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-15readlink: Intercept readlink("/proc/self/exe")Samuel Holland2-0/+86
This allows programs run through gcompat to fork and re-exec themselves. It fixes readlink("/proc/self/exe") to return the executable's absolute path, instead of musl's path. Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-15utmp: Implement the reentrant utmp function from LSBSamuel Holland2-0/+15
This takes advantage of the (lack of a) musl implementation for simplicity. Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-15unistd: Implement LSB functions plus moreSamuel Holland2-0/+173
On musl pread and pread64 are the same thing. Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-15syslog: Implement checked syslog functions from LSBSamuel Holland2-0/+33
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-15socket: Implement checked socket functions from LSBSamuel Holland2-0/+32
Signed-off-by: Samuel Holland <samuel@sholland.org>
2018-01-15signal: Add a signal function from LSBSamuel Holland2-0/+12
The other unimplemented signal function in LSB is sigreturn, with is not really implementable. Signed-off-by: Samuel Holland <samuel@sholland.org>