Age | Commit message (Collapse) | Author |
|
As suggested by Bernhard, there is no point in evaluating the compiler's
flag availability when cleaning, so skip things in that case. If there
are variables that change targets based on the flags, then things are
already broken and need fixing independently.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
RTLD_DEEPBIND is not supported in uclibc
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
Since we want to clean out all the headers we symlinked into include/,
just use `find` to locate all the symlinks for us. This simplifies it
greatly, and actually fixes bugs where we build for one arch, switch
to another, and then do a clean but the previous arch headers are left
behind.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
The MAKEFLAGS variable contains all the flags without the leading dash.
From the GNU make manual:
This variable is set up automatically by make to contain the flag
letters that make received. Thus, if you do ‘make -ks’ then MAKEFLAGS
gets the value ‘ks’.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
We inherit the top-level Rules.mak which sets up this flag for us,
so just rely on that.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
If backtrace support is turned on, build raise() and abort() with
unwind info (fixup 4c9b7f3c21ff21c199e54bfad2fdf3445fa4573d).
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Invalid signals have no handlers so when trying to restore the old
handler to a bad signal a SIGSEGV occurs. This is because the library
tries to store the old handler to an invalid memory area where it things
the bad signal lives.
URL: https://bugs.busybox.net/show_bug.cgi?id=4640
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Running `make clean` atm takes like 20 seconds because every subdir
re-evaluates all the toolchain flags. Add some helpers to automate
the process of setting up variables to cache the result of tests,
as well as the checking of an already set flag.
Now `make clean` takes like 2 seconds on my system.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
From gcc documentation, we can read:
" ...
-fasynchronous-unwind-tables
Generate unwind table in dwarf2 format, if supported by target
machine. The table is exact at each instruction boundary, so it can be
used for stack unwinding from asynchronous events (such as debugger or
garbage collector)
..."
So it seems better rather than using -funwind-tables (glibc seems to prefer
-fasynchronous-unwind-tables).
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
|
|
Build raise and abort function with dwarf2 info by using
-fasynchronous-unwind-tables to make backtrace() working across a
call to abort.
A scenario where it could be useful is within a signal handler that
wants to dump a backtrace when catching some signal (i.e SIGABRT).
Without having abort & raise built with DWARF2 information, it is not
possible for the libgcc stack unwinder to walk through the call stack
out of the abort/raise function.
Impacts in terms of size are really limited
Current
text data bss dec hex filename
164 0 0 164 a4 ./libpthread/nptl/sysdeps/unix/sysv/linux/raise.os
164 0 0 164 a4 ./libpthread/nptl/sysdeps/unix/sysv/linux/raise.oS
220 24 4 248 f8 ./libc/stdlib/abort.os
With (-fasynchronous-unwind-tables)
text data bss dec hex filename
216 0 0 216 d8 ./libpthread/nptl/sysdeps/unix/sysv/linux/raise.os
216 0 0 216 d8 ./libpthread/nptl/sysdeps/unix/sysv/linux/raise.oS
280 24 4 308 134 ./libc/stdlib/abort.os
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Acked-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
If people use an interp path such as "ld.so", then there is no "/" found,
and we end up dereferencing a NULL pointer. Simplify the logic by having
a relative interp path like that be the same as "" (which the code later
on interprets as $PWD).
While we're here, document some of the nuances of this code.
Reported-by: Ignacy Gawędzki <uclibc@qult.net>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
The setup logic is duplicated, so unify it in a local func.
Mark the variable const while we're doing this, and add missing
ifdef protection to the header that declares it availability.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
fixes bogus fgets error check
fixes bogus strlen() < 0 check
switches off buffering regardless of tcgetattr() success
prints newline even on error or if there was no '\n' on input
uses sizeof(buf) instead of PWD_BUFFER_SIZE
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
For backtrace to work is enough to use -funwind-tables instead
of -fexceptions.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
This is based on Ulrich Drepper's implementation in GLIBC, but hacked up to work
in uClibc. The differences from the GLIBC version are as follows:
- b64_from_24bit() has been converted into a macro
- Usage of GLIBC-isms (such as libc_freeres_ptr) have been removed
It is enabled by the UCLIBC_HAS_SHA256_CRYPT_IMPL configuration symbol. You must
have UCLIBC_HAS_CRYPT_IMPL enabled as well.
Signed-off-by: William Pitcock <nenolod@dereferenced.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
This is based on Ulrich Drepper's implementation in GLIBC, but hacked up to work
in uClibc. The differences from the GLIBC version are as follows:
- b64_from_24bit() has been converted into a macro
- Usage of GLIBC-isms (such as libc_freeres_ptr) have been removed
It is enabled by the UCLIBC_HAS_SHA512_CRYPT_IMPL configuration symbol. You must
have UCLIBC_HAS_CRYPT_IMPL enabled as well.
Signed-off-by: William Pitcock <nenolod@dereferenced.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
By using a function table, we can more cleanly support new crypt
implementations, such as SHA256 ($5$) and SHA512 ($6$).
Signed-off-by: William Pitcock <nenolod@dereferenced.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
This implements big-dlfcn lock to allow multithreaded usage of
dlopen/dlsym/dlclose. We should really clean up the dl code so
we can use more fine grained locking or even RCU where appropriate.
But at least we won't crash now.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Xen needs SIMPLEQ_* queue types which was not provided from the old
uclibc queue.h.
Use same implementation as eglibc.
Grabbed from: http://www.eglibc.org/svn/trunk/libc/misc/sys/queue.h
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
The current x86_64 setjmp helpers incur a reloc, so fix that up.
$ readelf -r lib/libc.so.0
...
Relocation section '.rela.plt' at offset 0xb058 contains 10 entries:
Offset Info Type Sym. Value Sym. Name + Addend
000000236010 02a400000007 R_X86_64_JUMP_SLO 000000000000b3c4 __sigsetjmp + 0
...
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
The pututline func calls getutid, so add a hidden def for
it to avoid plt relocs:
$ readelf -r lib/libc.so.0
...
Relocation section '.rela.plt' at offset 0xb058 contains 11 entries:
Offset Info Type Sym. Value Sym. Name + Addend
000000236000 01cf00000007 R_X86_64_JUMP_SLO 00000000000190ab getutid + 0
...
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
An earlier version had this, but was lost as code was shuffled around.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
The L1 data and L2 code paths duplicate a lot, so unify them.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
There should (hopefully) be no functional changes here.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Much of the logic in the bfin/frv subdirs is FDPIC specific and not arch
specific. So start a new fdpic/ subdir to keep common things.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Some places have opencoded the ARRAY_SIZE macro, so move it to a global
internal location so other places can leverage it.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
The former is part of a standard (C99) while the latter is not.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
We source the .config file, so there should be no need to manually extract
it. If the sourcing doesn't work, then a lot of things break in this file.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Use CROSS_COMPILE instead of CROSS as other projects are doing
(i.e. kernel, busybox, buildroot).
CROSS is still supported for backward compatibility only
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
fix bd3c1a2495cbcb51b606f8e4892fcd127f91e645 forgotten file.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
On several architectures __NR_ulimit syscall number is currently
defined but it is remapped onto sys_ni_syscall, while on other
architectures they are not longer defined.
So use {get,set}rlimit only to implement ulimit interface.
It fixes LTP ulimit01 test case.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Acked-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Fix size parameter when unmap a library by means of dlclose, by
taking into account the p_vaddr of first PT_LOAD segment, so it works
also for prelinked shared objects.
Unmapping of dlopen shared libraries is broken since
94cc6edb78a12655c0602a246fa1cbdc8c6d0ad9
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Support this useful glibc extension for optionally setting O_CLOEXEC
on fopen streams.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Thanks to William Pitcock for noticing
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
fix signed vs. unsigned comparison warnings while at it
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: 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: Bernd Schmidt <bernds@codesourcery.com>
|
|
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
When libubacktrace is not enabled there is no need to link in libgcc_eh
Fixes bootstrap failures with (gcc-4.5.x) stage1 compilers that --disable-shared
Signed-off-by: Jason Woodward <jason.woodward@timesys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|