README 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. This directory contains the -liberty library of free software.
  2. It is a collection of subroutines used by various GNU programs.
  3. Current members include:
  4. getopt -- get options from command line
  5. obstack -- stacks of arbitrarily-sized objects
  6. strerror -- error message strings corresponding to errno
  7. strtol -- string-to-long conversion
  8. strtoul -- string-to-unsigned-long conversion
  9. We expect many of the GNU subroutines that are floating around to
  10. eventually arrive here.
  11. The library must be configured from the top source directory. Don't
  12. try to run configure in this directory. Follow the configuration
  13. instructions in ../README.
  14. Please report bugs to "gcc-bugs@gcc.gnu.org" and send fixes to
  15. "gcc-patches@gcc.gnu.org". Thank you.
  16. ADDING A NEW FILE
  17. =================
  18. There are two sets of files: Those that are "required" will be
  19. included in the library for all configurations, while those
  20. that are "optional" will be included in the library only if "needed."
  21. To add a new required file, edit Makefile.in to add the source file
  22. name to CFILES and the object file to REQUIRED_OFILES.
  23. To add a new optional file, it must provide a single function, and the
  24. name of the function must be the same as the name of the file.
  25. * Add the source file name to CFILES in Makefile.in and the object
  26. file to CONFIGURED_OFILES.
  27. * Add the function to name to the funcs shell variable in
  28. configure.ac.
  29. * Add the function to the AC_CHECK_FUNCS lists just after the
  30. setting of the funcs shell variable. These AC_CHECK_FUNCS calls
  31. are never executed; they are there to make autoheader work
  32. better.
  33. * Consider the special cases of building libiberty; as of this
  34. writing, the special cases are newlib and VxWorks. If a
  35. particular special case provides the function, you do not need
  36. to do anything. If it does not provide the function, add the
  37. object file to LIBOBJS, and add the function name to the case
  38. controlling whether to define HAVE_func.
  39. Finally, in the build directory of libiberty, configure with
  40. "--enable-maintainer-mode", run "make maint-deps" to update
  41. Makefile.in, and run 'make stamp-functions' to regenerate
  42. functions.texi.
  43. The optional file you've added (e.g. getcwd.c) should compile and work
  44. on all hosts where it is needed. It does not have to work or even
  45. compile on hosts where it is not needed.
  46. ADDING A NEW CONFIGURATION
  47. ==========================
  48. On most hosts you should be able to use the scheme for automatically
  49. figuring out which files are needed. In that case, you probably
  50. don't need a special Makefile stub for that configuration.
  51. If the fully automatic scheme doesn't work, you may be able to get
  52. by with defining EXTRA_OFILES in your Makefile stub. This is
  53. a list of object file names that should be treated as required
  54. for this configuration - they will be included in libiberty.a,
  55. regardless of whatever might be in the C library.