]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libiberty/Makefile.in
libiberty: Fix up libiberty_vprintf_buffer_size
[thirdparty/gcc.git] / libiberty / Makefile.in
index 1b0d8ae782bfd579c4e339c4563c16aebd67ea90..85c4b6b6ef89b8fd9aca7a7e05bd38e39eb8de30 100644 (file)
@@ -1,9 +1,7 @@
 # Makefile for the libiberty library.
 # Originally written by K. Richard Pixley <rich@cygnus.com>.
 #
-# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-# 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
-# 2012, 2014 Free Software Foundation
+# Copyright (C) 1990-2024 Free Software Foundation, Inc.
 #
 # This file is part of the libiberty library.
 # Libiberty is free software; you can redistribute it and/or
@@ -31,6 +29,7 @@ bindir = @bindir@
 libdir = @libdir@
 includedir = @includedir@
 target_header_dir = @target_header_dir@
+dvidir = @dvidir@
 objext = @OBJEXT@
 
 SHELL = @SHELL@
@@ -51,13 +50,13 @@ mkinstalldirs = $(SHELL) $(libiberty_topdir)/mkinstalldirs
 # Some compilers can't handle cc -c blah.c -o foo/blah.o.
 OUTPUT_OPTION = @OUTPUT_OPTION@
 
-AR = @AR@
+AR = @AR@ @AR_PLUGIN_OPTION@
 AR_FLAGS = rc
 
 CC = @CC@
 CFLAGS = @CFLAGS@
 CPPFLAGS = @CPPFLAGS@
-RANLIB = @RANLIB@
+RANLIB = @RANLIB@ @RANLIB_PLUGIN_OPTION@
 MAKEINFO = @MAKEINFO@
 PERL = @PERL@
 
@@ -113,7 +112,9 @@ installcheck: installcheck-subdir
 
 INCDIR=$(srcdir)/$(MULTISRCTOP)../include
 
-COMPILE.c = $(CC) -c @DEFS@ $(CFLAGS) $(CPPFLAGS) -I. -I$(INCDIR) $(HDEFINES) @ac_libiberty_warn_cflags@
+COMPILE.c = $(CC) -c @DEFS@ $(CFLAGS) $(CPPFLAGS) -I. -I$(INCDIR) \
+               $(HDEFINES) @ac_libiberty_warn_cflags@ -D_GNU_SOURCE \
+               @CET_HOST_FLAGS@ @HWCAP_CFLAGS@
 
 # Just to make sure we don't use a built-in rule with VPATH
 .c.$(objext):
@@ -124,11 +125,11 @@ COMPILE.c = $(CC) -c @DEFS@ $(CFLAGS) $(CPPFLAGS) -I. -I$(INCDIR) $(HDEFINES) @a
 # 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                          \
-       fdmatch.c ffs.c fibheap.c filename_cmp.c floatformat.c          \
+       fdmatch.c ffs.c fibheap.c filedescriptor.c filename_cmp.c floatformat.c         \
        fnmatch.c fopen_unlocked.c                                      \
        getcwd.c getopt.c getopt1.c getpagesize.c getpwd.c getruntime.c \
          gettimeofday.c                                                 \
@@ -145,6 +146,7 @@ CFILES = alloca.c argv.c asprintf.c atexit.c                                \
         pex-unix.c pex-win32.c                                         \
          physmem.c putenv.c                                            \
        random.c regex.c rename.c rindex.c                              \
+       rust-demangle.c                                                 \
        safe-ctype.c setenv.c setproctitle.c sha1.c sigsetmask.c        \
         simple-object.c simple-object-coff.c simple-object-elf.c       \
         simple-object-mach-o.c simple-object-xcoff.c                   \
@@ -155,10 +157,11 @@ CFILES = alloca.c argv.c asprintf.c atexit.c                              \
         strtoll.c strtoul.c strtoull.c strndup.c strnlen.c             \
         strverscmp.c timeval-utils.c tmpnam.c                          \
        unlink-if-ordinary.c                                            \
-       vasprintf.c vfork.c vfprintf.c vprintf.c vsnprintf.c vsprintf.c \
+       vasprintf.c vfork.c vfprintf.c vprintf.c vprintf-support.c      \
+        vsnprintf.c vsprintf.c                                         \
        waitpid.c                                                       \
-       xatexit.c xexit.c xmalloc.c xmemdup.c xstrdup.c xstrerror.c     \
-        xstrndup.c
+       xasprintf.c xatexit.c xexit.c xmalloc.c xmemdup.c xstrdup.c     \
+        xstrerror.c xstrndup.c xvasprintf.c
 
 # These are always included in the library.  The first four are listed
 # first and by compile time to optimize parallel builds.
@@ -166,10 +169,12 @@ 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)                   \
        ./fdmatch.$(objext) ./fibheap.$(objext)                         \
+       ./filedescriptor.$(objext)      \
        ./filename_cmp.$(objext) ./floatformat.$(objext)                \
        ./fnmatch.$(objext) ./fopen_unlocked.$(objext)                  \
        ./getopt.$(objext) ./getopt1.$(objext) ./getpwd.$(objext)       \
@@ -180,7 +185,8 @@ REQUIRED_OFILES =                                                   \
        ./obstack.$(objext)                                             \
        ./partition.$(objext) ./pexecute.$(objext) ./physmem.$(objext)  \
        ./pex-common.$(objext) ./pex-one.$(objext)                      \
-       ./@pexecute@.$(objext)                                          \
+       ./@pexecute@.$(objext) ./vprintf-support.$(objext)              \
+       ./rust-demangle.$(objext)                                       \
        ./safe-ctype.$(objext)                                          \
        ./simple-object.$(objext) ./simple-object-coff.$(objext)        \
        ./simple-object-elf.$(objext) ./simple-object-mach-o.$(objext)  \
@@ -189,9 +195,10 @@ REQUIRED_OFILES =                                                  \
        ./splay-tree.$(objext) ./stack-limit.$(objext)                  \
        ./strerror.$(objext) ./strsignal.$(objext)                      \
        ./timeval-utils.$(objext) ./unlink-if-ordinary.$(objext)        \
-       ./xatexit.$(objext) ./xexit.$(objext) ./xmalloc.$(objext)       \
-       ./xmemdup.$(objext) ./xstrdup.$(objext) ./xstrerror.$(objext)   \
-       ./xstrndup.$(objext)
+       ./xasprintf.$(objext) ./xatexit.$(objext) ./xexit.$(objext)     \
+       ./xmalloc.$(objext) ./xmemdup.$(objext) ./xstrdup.$(objext)     \
+       ./xstrerror.$(objext) ./xstrndup.$(objext)                      \
+       ./xvasprintf.$(objext)
 
 # These are all the objects that configure may add to the library via
 # $funcs or EXTRA_OFILES.  This list exists here only for "make
@@ -270,7 +277,24 @@ $(TESTLIB): $(REQUIRED_OFILES) $(CONFIGURED_OFILES)
 info: libiberty.info info-subdir
 install-info: install-info-subdir
 clean-info: clean-info-subdir
-dvi: libiberty.dvi dvi-subdir
+
+LIBIBERTY_DVIFILES = libiberty.dvi
+
+dvi: $(LIBIBERTY_DVIFILES) dvi-subdir
+
+.PHONY: install-dvi
+
+dvi__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+
+install-dvi: $(LIBIBERTY_DVIFILES)
+       @$(NORMAL_INSTALL)
+       test -z "$(dvidir)" || $(mkinstalldirs) "$(DESTDIR)$(dvidir)"
+       @list='$(LIBIBERTY_DVIFILES)'; for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         f=$(dvi__strip_dir) \
+         echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(dvidir)/$$f'"; \
+         $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(dvidir)/$$f"; \
+       done
 
 LIBIBERTY_PDFFILES = libiberty.pdf
 
@@ -403,12 +427,12 @@ stamp-noasandir:
        else true; fi
        touch stamp-noasandir
 
-.PHONY: all etags tags ls clean stage1 stage2
+.PHONY: all etags tags TAGS ls clean stage1 stage2
 
-etags tags: TAGS etags-subdir
+ETAGS = @ETAGS@
 
-TAGS: $(CFILES)
-       etags `for i in $(CFILES); do echo $(srcdir)/$$i ; done`
+etags tags TAGS: etags-subdir
+       cd $(srcdir) && $(ETAGS) $(CFILES)
 
 # The standalone demangler (c++filt) has been moved to binutils.
 # But make this target work anyway for demangler hacking.
@@ -477,15 +501,25 @@ config.status: $(srcdir)/configure
        $(SHELL) ./config.status --recheck
 
 AUTOCONF = autoconf
-configure_deps = $(srcdir)/aclocal.m4 \
+ACLOCAL = aclocal
+ACLOCAL_AMFLAGS = -I ../config -I ..
+aclocal_deps = \
        $(srcdir)/../config/acx.m4 \
+       $(srcdir)/../config/cet.m4 \
+       $(srcdir)/../config/enable.m4 \
+       $(srcdir)/../config/gcc-plugin.m4 \
        $(srcdir)/../config/no-executables.m4 \
        $(srcdir)/../config/override.m4 \
+       $(srcdir)/../config/picflag.m4 \
        $(srcdir)/../config/warnings.m4 \
+       $(srcdir)/acinclude.m4
 
-$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(configure_deps)
+$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/aclocal.m4
        cd $(srcdir) && $(AUTOCONF)
 
+$(srcdir)/aclocal.m4: @MAINT@ $(aclocal_deps)
+       cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
 # Depending on config.h makes sure that config.status has been re-run
 # if needed.  This prevents problems with parallel builds, in case
 # subdirectories need to run config.status also.
@@ -595,6 +629,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/$@; \
@@ -754,6 +797,17 @@ $(CONFIGURED_OFILES): stamp-picdir stamp-noasandir
        else true; fi
        $(COMPILE.c) $(srcdir)/fibheap.c $(OUTPUT_OPTION)
 
+./filedescriptor.$(objext): $(srcdir)/filedescriptor.c config.h $(INCDIR)/ansidecl.h \
+       $(INCDIR)/libiberty.h
+       if [ x"$(PICFLAG)" != x ]; then \
+         $(COMPILE.c) $(PICFLAG) $(srcdir)/filedescriptor.c -o pic/$@; \
+       else true; fi
+       if [ x"$(NOASANFLAG)" != x ]; then \
+         $(COMPILE.c) $(PICFLAG) $(NOASANFLAG) $(srcdir)/filedescriptor.c -o noasan/$@; \
+       else true; fi
+       $(COMPILE.c) $(srcdir)/filedescriptor.c $(OUTPUT_OPTION)
+
+
 ./filename_cmp.$(objext): $(srcdir)/filename_cmp.c config.h $(INCDIR)/ansidecl.h \
        $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
        $(INCDIR)/safe-ctype.h
@@ -1187,6 +1241,17 @@ $(CONFIGURED_OFILES): stamp-picdir stamp-noasandir
        else true; fi
        $(COMPILE.c) $(srcdir)/rindex.c $(OUTPUT_OPTION)
 
+./rust-demangle.$(objext): $(srcdir)/rust-demangle.c config.h \
+       $(INCDIR)/ansidecl.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h \
+       $(INCDIR)/safe-ctype.h
+       if [ x"$(PICFLAG)" != x ]; then \
+         $(COMPILE.c) $(PICFLAG) $(srcdir)/rust-demangle.c -o pic/$@; \
+       else true; fi
+       if [ x"$(NOASANFLAG)" != x ]; then \
+         $(COMPILE.c) $(PICFLAG) $(NOASANFLAG) $(srcdir)/rust-demangle.c -o noasan/$@; \
+       else true; fi
+       $(COMPILE.c) $(srcdir)/rust-demangle.c $(OUTPUT_OPTION)
+
 ./safe-ctype.$(objext): $(srcdir)/safe-ctype.c $(INCDIR)/ansidecl.h \
        $(INCDIR)/safe-ctype.h
        if [ x"$(PICFLAG)" != x ]; then \
@@ -1543,7 +1608,7 @@ $(CONFIGURED_OFILES): stamp-picdir stamp-noasandir
        $(COMPILE.c) $(srcdir)/unlink-if-ordinary.c $(OUTPUT_OPTION)
 
 ./vasprintf.$(objext): $(srcdir)/vasprintf.c config.h $(INCDIR)/ansidecl.h \
-       $(INCDIR)/libiberty.h
+       $(INCDIR)/libiberty.h $(srcdir)/vprintf-support.h
        if [ x"$(PICFLAG)" != x ]; then \
          $(COMPILE.c) $(PICFLAG) $(srcdir)/vasprintf.c -o pic/$@; \
        else true; fi
@@ -1570,6 +1635,16 @@ $(CONFIGURED_OFILES): stamp-picdir stamp-noasandir
        else true; fi
        $(COMPILE.c) $(srcdir)/vfprintf.c $(OUTPUT_OPTION)
 
+./vprintf-support.$(objext): $(srcdir)/vprintf-support.c config.h \
+       $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+       if [ x"$(PICFLAG)" != x ]; then \
+         $(COMPILE.c) $(PICFLAG) $(srcdir)/vprintf-support.c -o pic/$@; \
+       else true; fi
+       if [ x"$(NOASANFLAG)" != x ]; then \
+         $(COMPILE.c) $(PICFLAG) $(NOASANFLAG) $(srcdir)/vprintf-support.c -o noasan/$@; \
+       else true; fi
+       $(COMPILE.c) $(srcdir)/vprintf-support.c $(OUTPUT_OPTION)
+
 ./vprintf.$(objext): $(srcdir)/vprintf.c $(INCDIR)/ansidecl.h
        if [ x"$(PICFLAG)" != x ]; then \
          $(COMPILE.c) $(PICFLAG) $(srcdir)/vprintf.c -o pic/$@; \
@@ -1607,6 +1682,16 @@ $(CONFIGURED_OFILES): stamp-picdir stamp-noasandir
        else true; fi
        $(COMPILE.c) $(srcdir)/waitpid.c $(OUTPUT_OPTION)
 
+./xasprintf.$(objext): $(srcdir)/xasprintf.c config.h $(INCDIR)/ansidecl.h \
+       $(INCDIR)/libiberty.h
+       if [ x"$(PICFLAG)" != x ]; then \
+         $(COMPILE.c) $(PICFLAG) $(srcdir)/xasprintf.c -o pic/$@; \
+       else true; fi
+       if [ x"$(NOASANFLAG)" != x ]; then \
+         $(COMPILE.c) $(PICFLAG) $(NOASANFLAG) $(srcdir)/xasprintf.c -o noasan/$@; \
+       else true; fi
+       $(COMPILE.c) $(srcdir)/xasprintf.c $(OUTPUT_OPTION)
+
 ./xatexit.$(objext): $(srcdir)/xatexit.c config.h $(INCDIR)/ansidecl.h \
        $(INCDIR)/libiberty.h
        if [ x"$(PICFLAG)" != x ]; then \
@@ -1677,3 +1762,12 @@ $(CONFIGURED_OFILES): stamp-picdir stamp-noasandir
        else true; fi
        $(COMPILE.c) $(srcdir)/xstrndup.c $(OUTPUT_OPTION)
 
+./xvasprintf.$(objext): $(srcdir)/xvasprintf.c config.h $(INCDIR)/ansidecl.h \
+       $(INCDIR)/libiberty.h $(srcdir)/vprintf-support.h
+       if [ x"$(PICFLAG)" != x ]; then \
+         $(COMPILE.c) $(PICFLAG) $(srcdir)/xvasprintf.c -o pic/$@; \
+       else true; fi
+       if [ x"$(NOASANFLAG)" != x ]; then \
+         $(COMPILE.c) $(PICFLAG) $(NOASANFLAG) $(srcdir)/xvasprintf.c -o noasan/$@; \
+       else true; fi
+       $(COMPILE.c) $(srcdir)/xvasprintf.c $(OUTPUT_OPTION)