Makefile.in (needed-list): Only include stuff we actually need for libstdc++.
authorJason Merrill <jason@yorick.cygnus.com>
Wed, 7 Jul 1999 15:22:55 +0000 (15:22 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 7 Jul 1999 15:22:55 +0000 (11:22 -0400)
* Makefile.in (needed-list): Only include stuff we actually need
for libstdc++.

From-SVN: r27999

libiberty/ChangeLog
libiberty/Makefile.in

index 66936c413530b6d797a9bf8fb3a493a9b5439cfc..483f4d511592e80632a4119768c85713dc4f8fda 100644 (file)
@@ -1,3 +1,8 @@
+1999-07-07  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * Makefile.in (needed-list): Only include stuff we actually need
+       for libstdc++.
+
 1999-06-21  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
 
        * configure.in (checkfuncs): Add gettimeofday.
index b4cd7d035d019e4b914ce01fc319dd80971a1b94..485ba76d87a3a24655e2c533c74936950c8e186f 100644 (file)
@@ -154,13 +154,20 @@ install_to_tooldir: all
        mv -f $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB).n $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)
        @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
 
-# needed-list is used by libstdc++.
+# needed-list is used by libstdc++.  NEEDED is the list of functions
+# to include there.  Do not add anything LGPL to this list; libstdc++
+# can't use anything encumbering.
+NEEDED = atexit calloc memchr memcmp memcpy memmove memset rename strchr \
+        strerror strrchr strstr strtol strtoul tmpnam vfprintf vprintf \
+        vfork waitpid
 needed-list: Makefile
-       f="$(LIBOBJS) $(ALLOCA) $(EXTRA_OFILES)"; \
-       case $$f in \
-         *alloca.o*) f="$$f xmalloc.o xexit.o" ;; \
-       esac; \
-       echo $$f > needed-list
+       rm -f needed-list; touch needed-list; \
+       files="$(LIBOBJS) $(EXTRA_OFILES)"; \
+       for f in $(NEEDED); do \
+         case "$$files" in \
+           *$$f*) echo $$f >> needed-list ;; \
+         esac; \
+       done
 
 # required-list was used when building a shared bfd/opcodes/libiberty
 # library.  I don't know if it used by anything currently.