aboutsummaryrefslogtreecommitdiff
path: root/libiberty/Makefile.in
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2020-06-23 17:03:03 +0100
committerJose E. Marchesi <jose.marchesi@oracle.com>2020-06-23 18:39:38 +0200
commitaec24341d0aac1ca57031d066503c420fb850023 (patch)
tree4eeb94bd058b421c5708e22f2b53eafc65a3c004 /libiberty/Makefile.in
parent855bb998c937d4b1c86a394daea8844fe87eb387 (diff)
downloadgcc-aec24341d0aac1ca57031d066503c420fb850023.zip
gcc-aec24341d0aac1ca57031d066503c420fb850023.tar.gz
gcc-aec24341d0aac1ca57031d066503c420fb850023.tar.bz2
libiberty, include: add bsearch_r
libctf wants a bsearch that takes a void * arg pointer to avoid a nonportable use of __thread. bsearch_r is required, not optional, at this point because as far as I can see this obvious-sounding function is not implemented by anyone's libc. We can easily move it to AC_LIBOBJ later if it proves necessary to do so. include/ * libiberty.h (bsearch_r): New. libiberty/ * bsearch_r.c: New file. * Makefile.in (CFILES): Add bsearch_r.c. (REQUIRED_OFILES): Add bsearch_r.o. * functions.texi: Regenerate.
Diffstat (limited to 'libiberty/Makefile.in')
-rw-r--r--libiberty/Makefile.in12
1 files changed, 11 insertions, 1 deletions
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index d6b302e..895f701 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -124,7 +124,7 @@ COMPILE.c = $(CC) -c @DEFS@ $(CFLAGS) $(CPPFLAGS) -I. -I$(INCDIR) \
# CONFIGURED_OFILES and funcs in configure.ac. Also run "make maint-deps"
# to build the new rules.
CFILES = alloca.c argv.c asprintf.c atexit.c \
- basename.c bcmp.c bcopy.c bsearch.c bzero.c \
+ basename.c bcmp.c bcopy.c bsearch.c bsearch_r.c bzero.c \
calloc.c choose-temp.c clock.c concat.c cp-demangle.c \
cp-demint.c cplus-dem.c crc32.c \
d-demangle.c dwarfnames.c dyn-string.c \
@@ -168,6 +168,7 @@ REQUIRED_OFILES = \
./regex.$(objext) ./cplus-dem.$(objext) ./cp-demangle.$(objext) \
./md5.$(objext) ./sha1.$(objext) ./alloca.$(objext) \
./argv.$(objext) \
+ ./bsearch_r.$(objext) \
./choose-temp.$(objext) ./concat.$(objext) \
./cp-demint.$(objext) ./crc32.$(objext) ./d-demangle.$(objext) \
./dwarfnames.$(objext) ./dyn-string.$(objext) \
@@ -601,6 +602,15 @@ $(CONFIGURED_OFILES): stamp-picdir stamp-noasandir
else true; fi
$(COMPILE.c) $(srcdir)/bsearch.c $(OUTPUT_OPTION)
+./bsearch_r.$(objext): $(srcdir)/bsearch_r.c config.h $(INCDIR)/ansidecl.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/bsearch_r.c -o pic/$@; \
+ else true; fi
+ if [ x"$(NOASANFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(NOASANFLAG) $(srcdir)/bsearch_r.c -o noasan/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/bsearch_r.c $(OUTPUT_OPTION)
+
./bzero.$(objext): $(srcdir)/bzero.c
if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(srcdir)/bzero.c -o pic/$@; \