diff options
author | Alan Modra <amodra@gmail.com> | 2022-05-30 17:04:39 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-05-30 17:04:39 +0930 |
commit | 7273d78f3f7ae3701512f1ff423430f51b011ece (patch) | |
tree | 53d5096b48a68232ce5a476df4a222e4f07586d8 /bfd/doc/local.mk | |
parent | f43ffe07b1e5c3fe8c0f55e33d047e64b7bdb624 (diff) | |
download | gdb-7273d78f3f7ae3701512f1ff423430f51b011ece.zip gdb-7273d78f3f7ae3701512f1ff423430f51b011ece.tar.gz gdb-7273d78f3f7ae3701512f1ff423430f51b011ece.tar.bz2 |
use libiberty xmalloc in bfd/doc/chew.c
Catch out of memory.
* doc/chew.c: Include libibery.h.
(init_string_with_size, nextword): Replace malloc with xmalloc.
(newentry, add_to_definition): Likewise.
(catchar, catbuf): Replace realloc with xrealloc.
(add_intrinsic): Replace strdup with xstrdup.
* doc/local.mk (LIBIBERTY): Define.
(chew): Link against libiberty.
* Makefile.in: Regenerate.
Diffstat (limited to 'bfd/doc/local.mk')
-rw-r--r-- | bfd/doc/local.mk | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bfd/doc/local.mk b/bfd/doc/local.mk index 931942f..8c69328 100644 --- a/bfd/doc/local.mk +++ b/bfd/doc/local.mk @@ -82,12 +82,14 @@ TEXI2DVI = texi2dvi -I "$(srcdir)/%D%" -I %D% MKDOC = %D%/chew$(EXEEXT_FOR_BUILD) +LIBIBERTY = ../libiberty/libiberty.a + $(MKDOC): %D%/chew.stamp ; @true %D%/chew.stamp: $(srcdir)/%D%/chew.c %D%/$(am__dirstamp) $(AM_V_CCLD)$(CC_FOR_BUILD) -o %D%/chw$$$$$(EXEEXT_FOR_BUILD) $(CFLAGS_FOR_BUILD) \ $(LDFLAGS_FOR_BUILD) $(H_CFLAGS) \ -I. -I$(srcdir) -I%D% -I$(srcdir)/../include -I$(srcdir)/../intl -I../intl \ - $(srcdir)/%D%/chew.c && \ + $(srcdir)/%D%/chew.c $(LIBIBERTY) && \ $(SHELL) $(srcdir)/../move-if-change \ %D%/chw$$$$$(EXEEXT_FOR_BUILD) $(MKDOC) && \ touch $@ |