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