Age | Commit message (Collapse) | Author |
|
Fixes haveged compile issues in OpenADK and buildroot when
a static toolchain is used.
|
|
Summary:
Recent arch do not support Legacy.
Thus they don't define ARCH_HAS_DEPRECATED_SYSCALLS
But this led to per-arch headers not being installed and common-generic ones taking precedence.
So it was impossible to declare arch-specific statfs.h for instance, to force 64-bit mode only.
This was leading to the following situation to happen:
1/ an application compiles (say without -D_FILE_OFFSET_BITS set)
it therefore uses struct statfs from libc/sysdeps/linux/common-generic/bits/statfs.h
where f_type and f_bsize fields are U32: https://elixir.bootlin.com/uclibc-ng/latest/source/libc/sysdeps/linux/common-generic/bits/statfs.h#L18
2/ application calls "statfs"
3/ uClibc issues "statfs64" syscall (because __NR_statfs64 is defined and __NR_statfs is undefined):
https://elixir.bootlin.com/uclibc-ng/latest/source/libc/sysdeps/linux/common/statfs.c#L14
4/ if Linux kernel port is not defining CONFIG_COMPAT, it calls do_statfs_native
https://elixir.bootlin.com/linux/latest/source/fs/statfs.c#L195
5/ it does copy_to_user of the size of struct statfs defined in the kernel source tree:
https://elixir.bootlin.com/linux/latest/source/fs/statfs.c#L161
6/ Generic struct statfs in the kernel is defined like this:
https://elixir.bootlin.com/linux/latest/source/include/uapi/asm-generic/statfs.h#L23
f_type and f_bsize fields are long (64 bits) for 64-bit archs.
7/ memory corruption occurs because of this mismatch
Solution:
Allow to not define __ARCH_HAS_DEPRECATED_SYSCALLS__ *and* declare its own arch-specific statfs.h header, matching the kernel one.
(for instance with f_type and f_bsize defined as long)
Does this change break other archs?
This change allows headers in libc/sysdeps/linux/<ARCH>/bits/ to override ones in libc/sysdeps/linux/common-generic/bits/
The only arch which does not define __ARCH_HAS_DEPRECATED_SYSCALLS__ *and* has a header in libc/sysdeps/linux/<ARCH>/bits/ which can conflict with one in libc/sysdeps/linux/common-generic/bits/
is c6x.
The file that can override is ../libc/sysdeps/linux/c6x/bits/kernel_stat.h
This, btw, means that, today, this file is there and is not used (during compilation, GNU Make overrides the rule):
Makefile.in:152: warning: overriding recipe for target `include/bits/kernel_stat.h'
Makefile.in:148: warning: ignoring old recipe for target `include/bits/kernel_stat.h'
I was not able to compile uClibc with the only binary toolchain I found for c6x arch (gcc-4.5.1 from code sourcery: https://sourcery.mentor.com/GNUToolchain/release1882)
However, I can tell that c6x's kernel_stat.h only defines two structs: kernel_stat and kernel_stat64: https://elixir.bootlin.com/uclibc-ng/latest/source/libc/sysdeps/linux/c6x/bits/kernel_stat.h
And I can also tell that those structs are only used when using xstat conversion functions (__xstat32_conv / xstat_conv) which are only used and present in the __ARCH_HAS_DEPRECATED_SYSCALLS__ == y case.
However, c6x does not define __ARCH_HAS_DEPRECATED_SYSCALLS__
So I think I can say that this change does not affect c6x nor other archs.
|
|
cleanup unused and unsupported code.
|
|
The included RPC implementation is ipv4 only.
Other C library projects have either deprecated the internal
RPC implementation (GNU C Library) or never implemented such
functionality (musl C Library). The latest rpcbind release (0.2.4)
checks for libtirpc and does not allow to be build with uClibc-ng
RPC without patching. The common use case for RPC nowadays is to
use rpcbind together with nfs-utils to provide NFS server or client
support to a system.
The included RPC implementation does create issues with duplicate
symbol failures when statically compiling with RPC enabled.
|
|
A wrong filename was present in Makefile.in leaving libintl.h installed
even if libintl support is disabled leading to wrong configure checks
by other packages.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
|
|
|
Remove __UCLIBC_HAS_OBSTACK__ as it isn't very uptodate and
maintained part. It shouldn't be required for any software and
mostly shipped with stuff which use it. (f.e. binutils-gdb)
|
|
These adds the stubs from gettext-tiny 0.0.5
from here:
https://github.com/sabotage-linux/gettext-tiny
|
|
To use it enable UCLIBC_HAS_LIBICONV, then iconv_open/iconv_close
should be available.
|
|
As __UCLIBC_HAS_GETTEXT_AWARENESS__ is never defined, this is
mostly dead code. It is planned to integrate libiconv-tiny
and gettext-tiny into uClibc-ng after the next release, so
that more software packages can be used without modification.
Remove any _/_N macro usage.
|
|
|
|
|
|
If uClibc is built outside of the source tree, then there is an error:
make[1]: *** No rule to make target `/home/akolesov/build-uclibc/extra/locale',
needed by `/home/akolesov/build-uclibc/extra/locale/gen_wc8bit'. Stop.
The rule to create $(top_builddir)/extra/locale is defined in top-level
Makefile.in. Same Makefile.in also invokes extra/locale/Makefile.in to build
various tools. Those tools have $(top_builddir)/extra/locale as a
dependency, but this makefile doesn't include top-level Makefile.in,
therefore rule to create dependant directory is absent in this submake
invocation.
To avoid this problem this patch defines $(top_builddir)/extra/locale as a
dependency for "headers" target, which invokes extra/locale/Makefile.in,
thus making sure that prerequisite directory is created in advance.
This problem doesn't occur when building in the source tree, since
$(top_builddir) == $(top_srcdir), so this directory already exists.
Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
|
|
The test suite is now a developed in a separate git repository.
See here:
http://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng-test.git
The test suite should be just like every other software compiled
with the cross-toolchain. In the past strange problems where found
when the test suite got build in the toolchain creation step.
|
|
|
|
Similar to musl libc a single libc has many benefits and solves
some open issues with uClibc-ng.
- no pthread_mutex_* weak symbols exported anymore
- applications no longer failing to link when either
-lrt or -lpthread are missing for dynamic and static linking mode
- smaller C library
- slightly better runtime performance
|
|
|
|
Linuxthreads.new isn't really useful with the existence
of NPTL/TLS for well supported architectures. There is no
reason to use LT.new for ARM/MIPS or other architectures
supporting NPTL/TLS. It is not available for noMMU architectures
like Blackfin or FR-V. To simplify the live of the few uClibc-ng
developers, LT.new is removed and LT.old is renamed to LT.
LINUXTHREADS_OLD -> UCLIBC_HAS_LINUXTHREADS
|
|
Argp is an advanced support for parsing unix-style argument vectors.
In addition to the common getopt interface, it provides automatic
response
to `--help' and `--version' options and use of custom parser in
conjunction
with argp native option parser, among others.
Argp support is required by elfutils package and prelink.
In uClibc argp functionalities has been moved from C library to
libuargp.so
Further the libc.so linker script contains an AS_NEEDED entry so that
it doesn't need to link libuargp.so explicitely.
Disable argp test if feature disabled.
Signed-off-by: Salvatore Cro <salvatore.cro@st.com>
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
|
|
|
|
pt-initfini eventually depends on xlocale
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Required for !NPTL, !context-funcs for example.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
|
|
No need to build crt when just generating headers
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
ucontext_i.h too depends on uClibc_config.h.
Update it to look like the other MANGLE generated files and tweak
prereqs
Fixes: make realclean ; make -j libc/misc/internals/__uClibc_main.i
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Introduce a <sys/random.h> for it.
/* FIXME: aren't there a couple of __restrict and const missing ?
*/
extern int getrandom(void *__buf, size_t count, unsigned int flags)
__nonnull ((1)) __wur;
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
This fixes the following build error:
GEN include/bits/sysnum.h
GEN libpthread/nptl/sysdeps/unix/sysv/linux/structsem.h
GEN libpthread/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.h
GEN libpthread/nptl/sysdeps/unix/sysv/linux/lowlevelbarrier.h
GEN libpthread/nptl/sysdeps/unix/sysv/linux/structsem.h
GEN libpthread/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.h
GEN libpthread/nptl/sysdeps/unix/sysv/linux/pthread-pi-defines.h
GEN libpthread/nptl/sysdeps/unix/sysv/linux/lowlevelbarrier.h
GEN libpthread/nptl/sysdeps/unix/sysv/linux/pthread-pi-defines.h
In file included from ./libpthread/nptl/pthreadP.h:25:0,
from <stdin>:2:
./include/sys/syscall.h:24:25: fatal error: bits/sysnum.h: No such file or directory
#include <bits/sysnum.h>
^
compilation terminated.
GEN libpthread/nptl/sysdeps/unix/sysv/linux/lowlevelcond.h
make[1]: *** [libpthread/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.h] Error 1
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
|
This reverts commit 6b6ede3d15f04fe825cfa9f697507457e3640344.
|
|
|
|
The GNU variant of getopt() previously had no way to turn off
getopt_long() support.
|
|
Gregory Fong noted that we'd better not install atomic.h
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
It now generated a file name defconfig in current directory
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
attempt to fix unifdef swallowing -f defundefile lines
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
sync up to 55501a61dd257e941d53f175350ee52fc6ff2866
(2.9 + refactor keyword and symbol matching)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
As in timerfd.h, eventfd.h needs arch-specific definition files.
alpha, mips and sparc needs separate file, all the other arch
will use common definition.
This problem is already fixed in glibc.
Also sanitize and provide bits for hppa.
Make sure not to install the new bits/eventfd unless eventfd support is
enabled.
Signed-off-by: Hiroaki KAWAI <kawai@stratosphere.co.jp>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
For anything but (toplevel) clean, CLEAN_%, we need .config
Otherwise realclean would leave stuff behind that was not intended to
survive.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Nowadays we should not be racy in this area anymore, so simplify
generating temporary build-files.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
0c3eb2da578bc7ba2e74d240e3249dce62ec725e moved KCONFIG_CONFIG around and
that broke propagation of config-settings to the testsuite. Fix that.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
New architectures, which don't define ARCH_HAS_DEPRECATED syscalls, need
to use the new interfaces from libc/sysdeps/linux/generic-syscalls/bits/
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
This script hasn't used this var in a while (it writes to stdout), so
drop all mention/usage of it.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Fixes:
make distclean
mkdir /.config
make -C test/API clean
Reading makefile `../../.config' (search path) (don't care) (no ~ expansion)...
make: *** ../../.config: Is a directory. Stop.
write(1, "Reading makefile `../../.config'"..., 80) = 80
open("../../.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/include/../../.config", O_RDONLY) = 6
fstat(6, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
read(6, 0x7f2fe3bfc000, 4096) = -1 EISDIR (Is a directory)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|