summary refs log tree commit diff
path: root/src/liblibc
AgeCommit message (Collapse)AuthorLines
2016-10-19std: Update liblibc submoduleAlex Crichton-0/+0
This fixes compilation on the s390x target
2016-09-26When getaddrinfo returns EAI_SYSTEM retrieve actual error from errno.Tomasz Miąsko-0/+0
Fixes issue #36546. This change also updates libc to earliest version that includes EAI_SYSTEM constant.
2016-09-09Add s390x supportUlrich Weigand-0/+0
This adds support for building the Rust compiler and standard library for s390x-linux, allowing a full cross-bootstrap sequence to complete. This includes: - Makefile/configure changes to allow native s390x builds - Full Rust compiler support for the s390x C ABI (only the non-vector ABI is supported at this point) - Port of the standard library to s390x - Update the liblibc submodule to a version including s390x support - Testsuite fixes to allow clean "make check" on s390x Caveats: - Resets base cpu to "z10" to bring support in sync with the default behaviour of other compilers on the platforms. (Usually, upstream supports all older processors; a distribution build may then chose to require a more recent base version.) (Also, using zEC12 causes failures in the valgrind tests since valgrind doesn't fully support this CPU yet.) - z13 vector ABI is not yet supported. To ensure compatible code generation, the -vector feature is passed to LLVM. Note that this means that even when compiling for z13, no vector instructions will be used. In the future, support for the vector ABI should be added (this will require common code support for different ABIs that need different data_layout strings on the same platform). - Two test cases are (temporarily) ignored on s390x to allow passing the test suite. The underlying issues still need to be fixed: * debuginfo/simd.rs fails because of incorrect debug information. This seems to be a LLVM bug (also seen with C code). * run-pass/union/union-basic.rs simply seems to be incorrect for all big-endian platforms. Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
2016-08-29update libc submoduleJorge Aparicio-0/+0
2016-08-27update libcJorge Aparicio-0/+0
2016-07-30point the libc submodule back to rust-lang/libcJorge Aparicio-0/+0
2016-07-30arm-musl targets now use cfg(env = "musl")Jorge Aparicio-0/+0
2016-07-11libc: fast-forward for solaris `RTLD_DEFAULT`Josh Stone-0/+0
2016-06-02Update libc to bring in pthread mutex type definitionsAmanieu d'Antras-0/+0
2016-05-17std: Update libc submoduleAlex Crichton-0/+0
Brings in a fix where `-lutil` is no longer passed for musl targets, lifting the need for a musl toolchain to be installed again. Closes #33608
2016-05-15Update libc to bring in updates for android's aarch64.Nerijus Arlauskas-0/+0
2016-04-04std: Fix linking against `signal` on AndroidAlex Crichton-0/+0
Currently the minimum supported Android version of the standard library is API level 18 (android-18). Back in those days [1] the `signal` function was just an inline wrapper around `bsd_signal`, but starting in API level android-20 the `signal` symbols was introduced [2]. Finally, in android-21 the API `bsd_signal` was removed [3]. Basically this means that if we want to be binary compatible with multiple Android releases (oldest being 18 and newest being 21) then we need to check for both symbols and not actually link against either. This was first discovered in rust-lang/libc#236 with a fix proposed in rust-lang/libc#237. I suspect that we'll want to accept rust-lang/libc#237 so Rust crates at large continue to be compatible with newer releases of Android and crates, like the standard library, that want to opt into older support can continue to do so via similar means. Closes rust-lang/libc#236 [1]: https://chromium.googlesource.com/android_tools/+/20ee6d20/ndk/platforms/android-18/arch-arm/usr/include/signal.h [2]: https://chromium.googlesource.com/android_tools/+/fbd420/ndk_experimental/platforms/android-20/arch-arm/usr/include/signal.h [3]: https://chromium.googlesource.com/android_tools/+/20ee6d/ndk/platforms/android-21/arch-arm/usr/include/signal.h
2016-03-09std: Don't spawn threads in `wait_with_output`Alex Crichton-0/+0
Semantically there's actually no reason for us to spawn threads as part of the call to `wait_with_output`, and that's generally an incredibly heavyweight operation for just reading a few bytes (especially when stderr probably rarely has bytes!). An equivalent operation in terms of what's implemented today would be to just drain both pipes of all contents and then call `wait` on the child process itself. On Unix we can implement this through some convenient use of the `select` function, whereas on Windows we can make use of overlapped I/O. Note that on Windows this requires us to use named pipes instead of anonymous pipes, but they're semantically the same under the hood.
2016-03-06update the src/liblibc submoduleJorge Aparicio-0/+0
2016-03-01Update libc crateSebastian Wicki-0/+0
2016-02-22Update libc to 16f1c19Mátyás Mustoha-0/+0
2016-02-21std: Use Android LFS off64_t, ftruncate64, and lseek64Josh Stone-0/+0
Android should use 64-bit LFS symbols for `lseek` and `ftruncate`, lest those offset parameters suffer a lossy cast down to a 32-bit `off_t`. Unlike GNU/Linux, Android's `stat`, `dirent`, and related functions are always 64-bit LFS compatible, and `open` already implies `O_LARGEFILE`, so all those don't need to follow Linux. It might be nice to unify them anyway, but those other LFS symbols aren't present in API 18 bionic. r? @alexcrichton
2016-02-18Remove alternate stack with sigaltstack before unmapping it.Tomasz Miąsko-0/+0
Also reuse existing signal stack if already set, this is especially useful when working with sanitizers that configure alternate stack themselves.
2016-02-05std: Add a helper for symbols that may not existAlex Crichton-0/+0
Right now we only attempt to call one symbol which my not exist everywhere, __pthread_get_minstack, but this pattern will come up more often as we start to bind newer functionality of systems like Linux. Take a similar strategy as the Windows implementation where we use `dlopen` to lookup whether a symbol exists or not.
2016-01-31update libc submoduleJorge Aparicio-0/+0
fixes failed test (std::os::raw::tests::unix) in x86_64-musl target
2016-01-30revert changes used for local testingJorge Aparicio-0/+0
2016-01-29add support for mips(el)-unknown-linux-muslJorge Aparicio-0/+0
This target covers MIPS devices that run the trunk version of OpenWRT. The x86_64-unknown-linux-musl target always links statically to C libraries. For the mips(el)-unknown-linux-musl target, we opt for dynamic linking (like most of other targets do) to keep binary size down. As for the C compiler flags used in the build system, we use the same flags used for the mips(el)-unknown-linux-gnu target.
2016-01-28std: Fix rumprun buildAlex Crichton-0/+0
Looks like the rumprun build has bitrotted over time, so this includes some libc fixes and some various libstd fixes which gets it back to bootstrapping.
2016-01-21updating the libc dependency to pull in build breaker fixesDave Huseby-0/+0
2016-01-15Update libcAnton Blanchard-0/+0
This brings in powerpc64 and powerpc64le support recently added.
2016-01-12android has `posix_memalign` for API 16+ since NDK r10dTamir Duberstein-0/+0
See: http://developer.android.com/ndk/downloads/revision_history.html Also, use `libc`'s `posix_memalign`.
2015-12-21unbreak openbsd codeSébastien Marie-0/+0
- upgrades libc to version with si_addr support in openbsd - declares libc use for getentropy
2015-12-18Pull newer version of libc for NR_GETENTROPYMichael McConville-0/+0
2015-12-18Update liblibc to current masterFlorian Hahn-0/+0
2015-11-26Update libc. Fixes netbsd.Brian Anderson-0/+0
2015-11-25Update liblibcVadim Petrochenkov-0/+0
2015-11-22libc: Update to masterAlex Crichton-0/+0
Includes rust-lang-nursery/libc#66 which should: Closes #29956
2015-11-17Add changes to liblibcDevon Hollowood-0/+0
2015-11-09libc: Replace liblibc with crates.io libcAlex Crichton-7184/+0
2015-10-23Unsafety -> Safety in doc headingsSteve Klabnik-1/+1
Follow https://doc.rust-lang.org/book/documentation.html#special-sections
2015-10-23Auto merge of #29216 - steveklabnik:fix_libc, r=alexcrichtonbors-1/+1
This is needed to release a new version of libc r? @alexcrichton
2015-10-22Fix build of libc on stableSteve Klabnik-1/+1
This is needed to release a new version of libc
2015-10-21rustfmt liblibcMarcello Seri-2584/+2726
2015-09-27Add PATH_MAX to liblibc's Linux bindings.Utkarsh Kukreti-0/+4
2015-09-26Add support for the rumprun unikernelSebastian Wicki-1/+5
For most parts, rumprun currently looks like NetBSD, as they share the same libc and drivers. However, being a unikernel, rumprun does not support process management, signals or virtual memory, so related functions might fail at runtime. Stack guards are disabled exactly for this reason. Code for rumprun is always cross-compiled, it uses always static linking and needs a custom linker.
2015-09-23unbreak openbsd after netbsd integrationSébastien Marie-1/+3
separate use code between openbsd/netbsd. netbsd use c_int and c_uint, but openbsd not, resulting a unused_import error.
2015-09-21Various fixes for NetBSD/amd64Sebastian Wicki-50/+488
2015-08-30Atomically set CLOEXEC on duplicated socketsTobias Bucher-1/+6
For Bitrig, NetBSD and OpenBSD the constant was incorrectly in posix01, when it's actually posix08, so we move it. This is a [breaking-change], but we already had one in #27930. Fix NetBSD's F_DUPFD_CLOEXEC constant. For a similar feature detection, see this musl thread: http://comments.gmane.org/gmane.linux.lib.musl.general/2963 This assumes that an int literal has type `c_int` for varidic functions.
2015-08-28libc: Fix constants used by `libc::pathconf`Barosl Lee-2/+17
`_PC_NAME_MAX` is necessary to use `libc::pathconf`. Its value is fixed to 3 currently, but actually it varies with the platform. * _PC_NAME_MAX == 3 Linux (glibc): https://sourceware.org/git/?p=glibc.git;a=blob;f=bits/confname.h;h=1c714dfbf9398b8a600f9b69426a7ad8c7e89ab4;hb=HEAD#l32 NaCl (newlib): https://chromium.googlesource.com/native_client/nacl-newlib/+/373135ec5241d09138aa56603742b94b3b64ea1d/newlib/libc/include/sys/unistd.h#430 * _PC_NAME_MAX == 4 Android (Bionic): https://github.com/android/platform_bionic/blob/7e919daeaad62515ebbbf7b06badc77625a14d90/libc/include/unistd.h#L59 FreeBSD: https://svnweb.freebsd.org/base/head/sys/sys/unistd.h?revision=239347&view=markup#l127 NetBSD: http://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/sys/sys/unistd.h OS X: http://opensource.apple.com/source/xnu/xnu-2782.10.72/bsd/sys/unistd.h This commit fixes this, and also addes the `_PC_PATH_MAX` constant needed by further commits.
2015-08-25Auto merge of #27971 - tbu-:pr_cloexec, r=alexcrichtonbors-0/+21
On Linux the flag is just ignored if it is not supported: https://lwn.net/Articles/588444/ Still needs the values of O_CLOEXEC on the BSDs. Touches #24237.
2015-08-25Auto merge of #27957 - overminder:aug23-i686-android, r=alexcrichtonbors-9/+12
- All the libstd tests are passing in the optimized build against a Zenfone2 and the x86 Android emulator. I haven't tested the other libraries though.
2015-08-24Atomically open files with O_CLOEXEC where possibleTobias Bucher-0/+21
On Linux the flag is just ignored if it is not supported: https://lwn.net/Articles/588444/ Touches #24237.
2015-08-24i686-linux-android: Removing useless cfgs.Overmind JIANG-5/+0
That line is in a `#[cfg(target_os = "macos")]` block..
2015-08-23Auto merge of #27931 - tbu-:pr_liblibc_void, r=alexcrichtonbors-5/+6
2015-08-23New cross target: i686-linux-androidTim JIANG-9/+17
- All the libstd tests are now passing in the optimized build against a Zenfone2 and the x86 Android simulator.