summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2021-08-25Fix warnings due to missing attributes for __EI_ prefixed symbolsYann Sionneau
With new compiler (gcc >= 9 ?) building uClibc-ng now gives this sort of warnings: ./include/libc-symbols.h:426:25: warning: '__EI_localeconv' specifies less restrictive attribute than its target 'localeconv': 'nothrow' [-Wmissing-attributes] 426 | extern __typeof (name) __EI_##name __attribute__((alias (__hidden_asmname1 (,#local)))) | ^~~~~ ./include/libc-symbols.h:429:29: note: in expansion of macro '__hidden_ver1' 429 | # define hidden_def(name) __hidden_ver1(__GI_##name, name, name); | ^~~~~~~~~~~~~ ./include/libc-symbols.h:497:32: note: in expansion of macro 'hidden_def' 497 | # define libc_hidden_def(name) hidden_def (name) | ^~~~~~~~~~ libc/misc/locale/locale.c:306:1: note: in expansion of macro 'libc_hidden_def' 306 | libc_hidden_def(localeconv) | ^~~~~~~~~~~~~~~ In file included from libc/misc/locale/localeconv.c:8: libc/misc/locale/locale.c:261:15: note: '__EI_localeconv' target declared here 261 | struct lconv *localeconv(void) | ^~~~~~~~~~ The fix is mostly being backported/adapted from glibc.
2021-04-24include/sys/personality.h: resync with glibcThomas Petazzoni
The trigger for this resync was ADDR_NO_RANDOMIZE, which was not defined in uClibc-ng, but is used for example by the uftrace project. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-04-09open: Add support for O_TMPFILENicolas Cavallari
Since Linux 3.11, O_TMPFILE allows to create unnamed files that can be linked later on. It is internally defined as (O_TMPFILE | O_DIRECTORY) to make it fail on old kernels. Copying definitions from glibc for O_TMPFILE is not enough to support O_TMPFILE; The open() wrapper also need to pass the mode when the flag contains O_TMPFILE, otherwise, it will pass mode 000 which will succeed but yield unexpected results. openat() is curiously not affected since it passes the mode unconditionally.. Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
2021-02-19string.h: Make strdup() available if _USE_XOPEN2K8Paul Cercueil
The strdup() function is present in POSIX 2008.09. Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2020-10-02kvx: add support for kvx arch to uClibc-ngYann Sionneau
This commit adds support for Kalray VLIW family (kvx) Kalray kv3 core is embedded in Kalray Coolidge SoC. This core which is the third of the KV family has the following features: 32/64 bits execution mode 6-issue VLIW architecture 64 x 64bits general purpose registers SIMD instructions little-endian In order to build a usable toolchain, build scripts are provided at the following address: https://github.com/kalray/build-scripts. Kalray uses FOSS which is available at https://github.com/kalray This includes Linux kernel, uClibc-ng, gcc, binutils, etc. Signed-off-by: Clément Léger <cleger@kalray.eu> Signed-off-by: Guillaume Thouvenin <gthouvenin@kalray.eu> Signed-off-by: Laurent Thevenoux <lthevenoux@kalray.eu> Signed-off-by: Marc Poulhies <mpoulhies@kalray.eu> Signed-off-by: Marius Gligor <mgligor@kalray.eu> Signed-off-by: Yann Sionneau <ysionneau@kalray.eu>
2020-09-21Support b64_ntop(), b64_pton() (bsd-compat)Waldemar Brodkorb
Signed-off-by: akater <nuclearspace@gmail.com>
2020-09-09add MAX_HANDLE_SZWaldemar Brodkorb
2020-08-19Add {name, open}_to_handle_at() implementationPetr Vorel
copied from musl 1.2.1. Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
2020-06-19inet: add sockatmark implementationClement Leger
Import musl C sockatmark implementation into uClibc-ng. Signed-off-by: Clement Leger <cleger@kalray.eu> Acked-by: Yann Sionneau <ysionneau@kalray.eu>
2020-04-01statx: make include conditional, fixes non-csky arch buildroot buildsWaldemar Brodkorb
2020-02-10include/ctype.h: restore __isctype_l definitionMax Filippov
Recent is*_l fix broke uclibc build because removed __isctype_l definition was used in libc/misc/ctype/ctype.c. Restore it. Fixes: d1a3ca7ca566 ("include/ctype.h: drop is*_l macro definitions") Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2020-02-04include/ctype.h: drop is*_l macro definitionsMax Filippov
ctype locale-specific macro definitions are broken because they result in dereference of pointer to structure of incomplete type. Drop these macros since they are optional and let applications use functions with the same names. This change fixes parted-3.3 build with uClibc-ng: http://autobuild.buildroot.net/results/b7ba1210d5aa184b133f0171da621d2b0083ec39/build-end.log Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2020-02-03csky: add statx conditionalsWaldemar Brodkorb
Similar to glibc commit https://sourceware.org/git/?p=glibc.git;a=commit;h=6bbfc5c09fc5b5e3d4a0cddbbd4e2e457767dae7 we need to handle Linux kernel change, which removed stat64 family from default syscall set. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org> Signed-off-by: Waldemar Brodkorb <wbrodkorb@conet.de>
2019-11-05implement fexecve from glibcWaldemar Brodkorb
2019-11-01riscv64: add shared library supportWaldemar Brodkorb
2019-05-13preadv/pwritev: fix offset argument typeMax Filippov
preadv/pwritev don't provide separate version for 64-bit wide off_t, and default to 32-bit wide off_t, which results in a mismatch between declaration and definition for user programs built with -D_FILE_OFFSET_BITS=64. Make offset argument of both functions __off64_t. This fixes test misc/tst-preadvwritev on xtensa. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2018-12-31csky: Add EM_CSKY for ldsoGuo Ren
Support EM_CSKY 252 elf format. Changelog: Increase EM_NUM to 253 Signed-off-by: Guo Ren <ren_guo@c-sky.com> Signed-off-by: Mao Han <han_mao@c-sky.com>
2018-08-10rtld: Add FDPIC code for armChristophe Lyon
Add FDPIC dynamic relocations support, similar to what other FDPIC targets do. Lazy binding is implemented in a folllow-up patch. Disable the SEND* macros because they involve relocations to access constant strings that are unsupported by the existing arm version. Define DL_START, START, ARCH_NEEDS_BOOTSTRAP_RELOCS, DL_CHECK_LIB_TYPE similarly to what other FDPIC targets do. Define raise() because _dl_find_hash references __aeabi_uidivmod, which uses __aeabi_idiv0 which in turn references raise. * include/elf.h (R_ARM_FUNCDESC): Define. (R_ARM_FUNCDESC_VALUE): Define. * ldso/include/dl-string.h (SEND_STDERR, SEND_ADDRESS_STDERR) (SEND_NUMBER_STDERR): Define empty for __FDPIC__. * ldso/ldso/arm/dl-inlines.h: New file. * ldso/ldso/arm/dl-startup.h (PERFORM_BOOTSTRAP_RELOC): Fix type of load_addr. Fix handling of R_ARM_RELATIVE, add support for R_ARM_FUNCDESC_VALUE. (DL_START, START): Define for __FDPIC__. (raise): Define. * ldso/ldso/arm/dl-sysdep.h (ARCH_NEEDS_BOOTSTRAP_RELOCS): Define. (DL_CHECK_LIB_TYPE): Define. (elf_machine_type_class): Take into account FDPIC related relocations. (elf_machine_load_address): Support __FDPIC__. (elf_machine_relative): Likewise. * ldso/ldso/arm/elfinterp.c (_dl_linux_resolver): Dummy support for __FDPIC__, implemented in a later patch. (_dl_do_reloc): Fix reloc_adr computation for __FDPIC__, fix handling of local symbols. Fix handling of R_ARM_RELATIVE, add support for R_ARM_FUNCDESC_VALUE, R_ARM_FUNCDESC. * ldso/ldso/arm/resolve.S: Make _dl_linux_resolve hidden. * ldso/ldso/fdpic/dl-inlines.h (htab_delete): Declare. * libc/sysdeps/linux/arm/bits/elf-fdpic.h: New file, similar to bfin's. * libc/sysdeps/linux/arm/crtreloc.c: Likewise. * libc/sysdeps/linux/arm/find_exidx.c (__dl_addr_in_loadaddr) Define. (find_exidx_callback): Support __FDPIC__. Signed-off-by: Mickaël Guêné <mickael.guene@st.com> Signed-off-by: Christophe Lyon <christophe.lyon@st.com>
2018-08-10rtld: Add #if defined (__FDPIC__)Christophe Lyon
Like for other FDPIC targets, add defined(__FDPIC__) where needed. * include/link.h: Include bits/elf-fdpic.h if __FDPIC__ is defined. (link_map): Use elf32_fdpic_loadaddr if __FDPIC__ is defined. (dl_phdr_info): Likewise. * ldso/include/dl-elf.h (__dl_parse_dynamic_info): Support __FDPIC__. * ldso/include/dl-hash.h (elf_resolve): Add funcdesc_ht field if __FDPIC__ is defined. * ldso/ldso/dl-hash.c (_dl_find_hash): Support __FDPIC__. * libc/misc/elf/dl-iterate-phdr.c (dl_iterate_phdr): Support __FDPIC__. Signed-off-by: Mickaël Guêné <mickael.guene@st.com> Signed-off-by: Christophe Lyon <christophe.lyon@st.com>
2018-06-29elf.h: add some missing definesWaldemar Brodkorb
2018-06-15Fix prototypes for preadv pwritev.Vlad Starodubtsev
2018-05-05librt: clock_nanosleep could be even used without threadsWaldemar Brodkorb
2018-05-01librt: declare clock_nanosleep not only for NPTLWaldemar Brodkorb
Reported-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
2018-03-01fix issue with LDSO_GNU_HASH_SUPPORTWaldemar Brodkorb
Under Fedora 27 there is a problem with the existing ld check. Binutils ld segfaults. Add a glibc compat macro to complete the build on Fedora. Signed-off-by: Sven Anders <anders@anduras.de>
2018-02-03add libc version compatibilityWaldemar Brodkorb
2018-01-31malloc: add malloc_usable_size()Waldemar Brodkorb
2018-01-31remove arc4random (rc4 based)Waldemar Brodkorb
OpenBSD arc4random is using chacha20 cipher algorithm for a long time. This copy is still based on deprecated rc4 cipher algorithm. We could either update the arc4random.c or drop it. Drop it. Users should better use libbsd when using arc4random interface. Musl/glibc does not have arc4random either.
2018-01-20include/elf.h: sync with GNU C libraryWaldemar Brodkorb
Add NT_GNU_BUILD_ID and other defines to allow applications using it to successfully compile. (f.e. firefox)
2017-12-31m68k: add NPTL/TLS supportWaldemar Brodkorb
Port over NPTL/TLS support from GNU C Library. In the first step only the slower syscall is used for TLS access. The uClibc-ng testsuite shows 79 errors, so their is room for bugfixes and improvements.
2017-11-19csky: port to uclibc-ngGuo Ren
Follow the steps to build c-sky uclibc linux system: 1. git clone https://github.com/c-sky/buildroot.git 2. cd buildroot 3. make qemu_csky_ck810_uclibc_defconfig 4. make Follow the buildroot/board/qemu/csky/readme.txt to run. This buildroot toolchain is pre-build, But you can rebuild the c-sky uclibc-ng alone and install it to the buildroot sysroot manually. We'll try our best to improve the uclibc-ng continuously. Signed-off-by: Guo Ren <ren_guo@c-sky.com>
2017-11-19remove unused FORTIFY code fragmentsWaldemar Brodkorb
2017-11-03math: add exception handling functionalitySergey Cherkashin
According to standards SVID and SYSV. Modified lgamma calling in case when 'signgam' variable should not be used. Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2017-11-02convert accept4() to use cancel.h macrosWaldemar Brodkorb
2017-10-01recvmmsg/sendmmsg: add recvmmsg sendmmsg support.Guo Ren
The recvmmsg and sendmmsg is very important for UDP stream application. If we only use recvmsg for UDP stream, it will only copy one mtu size of data in a syscall. And recvmmsg copy as many as you want in a syscall. So recvmmsg is more efficient,and some applications will depends on the recvmmsg and sendmmsg, eg: UDP media stream player. Signed-off-by: Guo Ren <ren_guo@c-sky.com>
2017-07-28stdlib.h: Fix valloc declaration.Eugene Yudin
2017-07-28nptl: remove sysdep-cancel ASM macros, convert to CWaldemar Brodkorb
2017-07-28rt: convert mq_timedsend/mq_timedreceive to use cancel.h macrosWaldemar Brodkorb
2017-07-18netinet/in.h: add IPPROTO_MHWaldemar Brodkorb
Fix compile of latest iproute2 package. Reported-By: Baruch Siach <baruch@tkos.co.il>
2017-07-05udp.h: sync completely with GNU C libraryWaldemar Brodkorb
2017-06-22remove __FAVOR_BSDWaldemar Brodkorb
Remove __FAVOR_BSD and sync with GNU C library Some issues compiling knock application fixed. Reported-By: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-06-21remove editor hints for viWaldemar Brodkorb
2017-06-08wchar.h: wchar_t must be definedWaldemar Brodkorb
Fix compile issues with uchar.h users, f.e. systemd.
2017-06-06sys/time.h: sync with GNU C libraryWaldemar Brodkorb
In commit 4b7634a5e03b0da6f8875de9d3f74c1cf6f2a6e8 non-null check was removed. Fixes a compiler warning when trying to compile systemd.
2017-06-06sys/types.h: sync with GNU C libraryWaldemar Brodkorb
Fixed in glibc commit f9cfa295ae3f2556bd8808f0ff693cfe44f4ac25. Found via Buildroot autobuilder and gdbm package cross-compile.
2017-06-01include/features.h: add _DEFAULT_SOURCE macroAnthony G. Basile
man feature_test_macros(7) specifies that _BSD_SOURCE and _SVID_SOURCE have been deprecated in favor of _DEFAULT_SOURCE since libc 2.20. Specifying either of the former is now equivalent to specifying just the latter. We add this macro to conform to this standard, but do not add the compiler warning to maintain full backwards compatibility with earlier version of glibc and uclibc. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2017-05-22include/sys/reboot.h: add constants RB_SW_SUSPEND and RB_KEXECAnthony G. Basile
This syncs up <sys/reboot.h> with the GNU C library, see their commit 1a09dc56. These constants are needed by init systems like openrc. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2017-05-22“new LT” is gonemirabilos
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
2017-05-22add another generated filemirabilos
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
2017-05-14or1k: add NPTL/TLS supportWaldemar Brodkorb
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
2017-05-07sync features.h with GNU C library, fixes gcc 7.1 toolchain creationWaldemar Brodkorb