77 Commits

Author SHA1 Message Date
Bernhard Reutner-Fischer
03cc2041fc librt: Add missing __dso_handle
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-04-14 23:58:41 +02:00
Bernhard Reutner-Fischer
efc26521e8 librt: Refine LIBS
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-04-14 23:58:41 +02:00
Bernhard Reutner-Fischer
a8cf23486e librt: honour HAS_STUBS in buildsys
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-04-14 23:58:41 +02:00
Bernhard Reutner-Fischer
19c4bf396e librt: Rephrase librt.so library dependencies
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-04-14 23:58:41 +02:00
Bernhard Reutner-Fischer
04cd09eb3a librt: Fix librt.so depends for !NPTL
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-04-14 23:58:41 +02:00
Bernhard Reutner-Fischer
5fe8fc1ac4 buildsys: Do not build crt upon pregen
No need to build crt when just generating headers

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-31 23:47:43 +02:00
Bernhard Reutner-Fischer
3a14ea8812 Revert "librt: Use -nodefaultlibs instead of -nostdlib"
This reverts commit 534f44d531.

I don't think this is wanted.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-31 22:43:52 +02:00
Khem Raj
534f44d531 librt: Use -nodefaultlibs instead of -nostdlib
nostdlib disables linking in startup files too which is not
what we want here since it needs to resolve __dso_handle
which comes from crtbeginS.o, otherwise librt has this
undefined reference to a weak undefined __dso_handle that
shows up as error (with gold linker)
when shared libraries are being built which are
linking in librt

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-22 14:49:27 +01:00
Baruch Siach
294079b3fd librt: fix mq_timed{send,receive} return instructions
Not all architectures use 'ret' as function return instruction. For example,
xtensa usually uses 'retw'. Use the ret_ERRVAL arch dependant macro instead.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-12-20 15:46:49 +01:00
Mike Frysinger
266bdc1f62 Replace FSF snail mail address with URLs
This matches a similar change made to glibc.

No functional changes here.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-11-18 06:03:38 -05:00
Peter S. Mazinger
c28cabb179 Reorder includes and include only what is necessary
Use param.h instead of MIN.
Use stddef.h instead of offsetof.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15 14:00:38 +02:00
Peter S. Mazinger
cfe1298282 librt: provide missing prototypes for mq_timedreceive,mq_timedsend
If ADVANCED_REALTIME is disabled, these prototypes are missing and
librt_hidden_proto() fails.
Makefile.in: added a comment, we build mq_timedreceive/mq_timedsend
on NPTL even if ADVANCED_REALTIME is disabled.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15 14:00:32 +02:00
Peter S. Mazinger
b8e6e4064c librt: get rid of visible __mq_timed(send,receive)
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15 14:00:32 +02:00
Peter S. Mazinger
5d39c1ed76 do not include libc-internal.h
it is already included by features.h

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15 14:00:21 +02:00
Bernhard Reutner-Fischer
57f058bb34 librt: convince spawn to compile for !LFS
Great to have this valuable family of high kwalitee functions in here.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-04-04 18:08:09 +02:00
Mike Frysinger
e2a32f7514 spawn: fix building on no-mmu systems
We don't have fork() on no-mmu, so if we're going to end up calling it,
return ENOSYS instead.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-26 23:42:24 -04:00
Mike Frysinger
d8b4e7a80c spawn: do not require C99 style
Simple style tweak to build with older standards.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-26 23:42:24 -04:00
Ismael Luceno
0dcf66744f librt: add posix_spawn support
Signed-off-by: Ismael Luceno <ismael.luceno@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-25 01:45:23 -04:00
Mike Frysinger
60b9866848 librt: refactor source selection
Should make adding more knob control simpler as people only need
to modify one variable now (librt_filter_SRC).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-05 01:37:57 -05:00
Bernhard Reutner-Fischer
d8d695731d stubs: mark stubs as used
Avoids warning from -Wunused-function about the alias target that is
only used at link-time.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-01-18 09:14:30 +01:00
Bernd Schmidt bernds_cb1@t-online.de
f4eebb6146 Add Makefile support for DSBT ELF.
This adds support for a new binary format, DSBT ELF, to the Makefiles.
Every shared library is assigned a DSBT index, and the link.so macro is
adjusted to ensure the correct linker argument is passed.

Configuration and ldso support will follow in separate commits.

Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-03-05 18:09:46 +01:00
Peter S. Mazinger
45dafbdb4e fix dependency on ADVANCED_REALTIME
Do not depend on ADVANCED REALTIME for mq_send/mq_receive
Added stubs implementation based on libc's stubs.c

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2011-03-03 18:22:50 +01:00
Bernhard Reutner-Fischer
486fbd8d66 librt: fix linking WRT pthreads
Linking order matters. Always did and still does today.
See how this makes the ugly and wrong hack to put pthread symbols into
librt _and_ linking librt against pthread moot?

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-06-17 19:31:27 +02:00
Bernhard Reutner-Fischer
7292938673 librt: simplify handling LDFLAGS
plus a few cosmetic touch-ups

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-06-17 18:40:14 +02:00
Natanael Copa
71239593ef nptl: proper soname handling
Since sublevel releases are not ABI compatible we need to adjust
the soname to include the sublevel version.

This makes it possible to install ABI incompatible versions of the
library side by side so clean upgrades are possible.

Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-04-22 08:39:36 -07:00
Austin Foxley
aae3eb9256 Merge commit 'origin/master' into nptl
Conflicts:
	Makefile.in
	extra/Configs/Config.in
	libc/sysdeps/linux/common/bits/kernel-features.h
	libc/sysdeps/linux/common/poll.c
	libc/sysdeps/linux/common/sysdep.h
	libc/sysdeps/linux/sh/sysdep.h

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-04-02 09:17:30 -07:00
Bernhard Reutner-Fischer
abdbaa897b prettify make clean
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-03-25 15:39:02 +01:00
Austin Foxley
7aab619f4b improve parallel make behaviour
* add library dependencies for libdl,libpthread
 * fix typo in librt/Makefile.in
 * also remove extra trailing slashes on i386, sparc pregen headers

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-02-23 01:11:53 -08:00
Austin Foxley
a032a65870 mass sync with glibc nptl
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-02-16 12:27:18 -08:00
Austin Foxley
a202cf6f11 librt additions that are now possible with nptl
* clock_getcpuclockid, clock_gettime, clock_nanosleep, mq_receive,
   mq_send, mq_timedreceive, mq_timedsend, _SC_MONOTONIC_CLOCK

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-10-17 14:42:01 -07:00
Denys Vlasenko
93f8a2e834 convert // comments to /**/; remove empty #if/#endif pairs. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-18 23:07:26 +02:00
Denys Vlasenko
fdf14ae2e6 do not save/restore errno around free() calls
In any non-buggy program free() does not fail.
And when it fails in a buggy program, the failure
is usually fatal (heap corruption and segfault).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-05 23:37:40 +02:00
Denys Vlasenko
abb3587fe9 CLOEXEC: use open(CLOEXEC) if exist; do not check fcntl(FD_CLOEXEC) failure
text           data     bss     dec     hex filename
-    370              0       0     370     172 libc/misc/dirent/opendir.o
+    366              0       0     366     16e libc/misc/dirent/opendir.o
-    375              4       0     379     17b libc/pwd_grp/lckpwdf.o
+    356              4       0     360     168 libc/pwd_grp/lckpwdf.o
-    248              0       0     248      f8 librt/shm.o
+    209              0       0     209      d1 librt/shm.o

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-05 22:04:36 +02:00
Bernhard Reutner-Fischer
49d8a0e9c6 support building out-of-tree
Handle O=

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-08-17 19:17:00 +02:00
Ron
e0b6a06c8f Add a few missing includes
elf.h needs __BYTE_ORDER, and s_scalbn.c needs {LONG,INT}_MAX.
shm.c complains about no prototypes for shm_{open,unlink} without its header.

Signed-off-by: Ron Lee <ron@debian.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-05 20:27:17 -04:00
Bernhard Reutner-Fischer
eac5e6eee9 add testcases for shm_{open,unlink}
Reported-by: Mikael Lund Jepsen <mlj@iccc.dk>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-07-03 00:20:19 +02:00
Bernhard Reutner-Fischer
0e605ccee7 include errno.h unconditionally
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-06-02 17:58:58 +02:00
Bernhard Reutner-Fischer
b32dd708df add stub for shm_open() and shm_unlink
Untested and needs testsuite exercise added

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-06-02 16:55:20 +02:00
Bernhard Reutner-Fischer
db5c575256 - also link librt with --as-needed and do so unconditionally to work around
bugs in gentoo's QA.
  Just add UCLIBC_HAS_SSP to the "and" of link.asneeded to properly take SSP
  into account, if you prefer.
2009-01-22 09:47:09 +00:00
Carmelo Amoroso
866c320ae9 CLean librt/*.oS too (NPTL will add some). 2008-12-04 15:49:26 +00:00
Bernhard Reutner-Fischer
b74c3aa1a9 - less verbose make clean 2008-11-07 21:15:53 +00:00
Bernhard Reutner-Fischer
c0adda8b79 - disentangle REALTIME from ADVANCED_REALTIME (Peter S. Mazinger) 2008-10-06 08:55:23 +00:00
Bernhard Reutner-Fischer
f1775381f9 - fix inline keyword 2008-07-23 11:19:00 +00:00
Bernhard Reutner-Fischer
63abaebc01 - move stripping into do_ar resp compile-m for the sake of simplicity 2008-06-17 14:20:36 +00:00
Bernhard Reutner-Fischer
bf765e60dd - strip the targets and not prerequisites
- tidy up PTHREADS_DEBUG_SUPPORT by using per-target STRIP_FLAGS for the few

  This fixes the spurious rebuilds bernd and vda were seeing with libpthreads.
2008-06-04 14:57:16 +00:00
Bernhard Reutner-Fischer
4cc4b30426 - adds several config-options to allow for turning off certain features
like
  o UCLIBC_HAS_GNU_ERROR
  o UCLIBC_HAS_BSD_ERR
  o UCLIBC_HAS_PTY
  o UCLIBC_HAS_GETPT (1)
  o UCLIBC_SYSCALL_STUBS
  o UCLIBC_SYSCALL_STUB_WARNING
  o UCLIBC_LINUX_SPECIFIC (2)
  o UCLIBC_BSD_SPECIFIC (3)
  o UCLIBC_NTP_LEGACY (4)
  o UCLIBC_SV4_DEPRECATED (5)
  o UCLIBC_HAVE_REALTIME (6)
  o UCLIBC_HAVE_ADVANCED_REALTIME (7)
  o UCLIBC_HAVE_EPOLL (8)
  o UCLIBC_HAVE_XATTR (9)
  o UCLIBC_HAVE_PROFILING (10)

(1) make non-standard getpt optional and implement standard posix_openpt
(2) fstatfs(), inotify_*(), ioperm(), iopl(), madvise(), modify_ldt(),
    personality()
    ppoll(), setresuid()
(3) mincore(), getdomainname(), setdomainname()
(4) ntp_adjtime(), ntp_gettime() aliases
(5) ustat() [use statfs(2) in your code instead]
(6) All marked as "(REALTIME)" in SUSv3
(7) All marked as "(ADVANCED REALTIME)" in SUSv3
(8) epoll_create(), epoll_ctl(), epoll_wait()
(9) all Extended Attributes
(10) helpers for gcc's -finstrument-functions

- Fixes _dl_exit()
- Implements sleep(3) for !UCLIBC_HAVE_REALTIME
- Implements usleep(3) for !UCLIBC_HAVE_REALTIME
- adds #warning about incorrect posix_fadvise{,64}()
- removes unused and unwanted uselib()

Net outcome is that an allnoconfig with HAVE_SHARED is now about 88k instead 
of formerly 130k.
2008-06-03 08:11:56 +00:00
Bernd Schmidt
68d02d6473 A slight improvement over my previous commit which ensured we always rebuild
libc when one of the source files changes.

Since there are more places which want to depend on $(libc), fix them all to
use a new variable $(libc.depend), which contains the filename for which we
have a rule.
2008-06-01 16:49:23 +00:00
Mike Frysinger
6bc45b2d57 #1273 if EXTRAVERSION is set, make sure we respect it 2007-03-19 09:49:04 +00:00
Mike Frysinger
59dc2f86bf Kay McCormick reports: when evp is NULL, it is reset too late and so can cause a crash when it is dereferenced 2007-02-09 22:23:35 +00:00
Mike Frysinger
87ad91cafb run through Lindent 2007-02-09 22:14:34 +00:00