1169695SkanThis directory contains the -liberty library of free software. 2169695SkanIt is a collection of subroutines used by various GNU programs. 3169695SkanCurrent members include: 4169695Skan 5169695Skan getopt -- get options from command line 6169695Skan obstack -- stacks of arbitrarily-sized objects 7169695Skan strerror -- error message strings corresponding to errno 8169695Skan strtol -- string-to-long conversion 9169695Skan strtoul -- string-to-unsigned-long conversion 10169695Skan 11169695SkanWe expect many of the GNU subroutines that are floating around to 12169695Skaneventually arrive here. 13169695Skan 14169695SkanThe library must be configured from the top source directory. Don't 15169695Skantry to run configure in this directory. Follow the configuration 16169695Skaninstructions in ../README. 17169695Skan 18169695SkanPlease report bugs to "gcc-bugs@gcc.gnu.org" and send fixes to 19169695Skan"gcc-patches@gcc.gnu.org". Thank you. 20169695Skan 21169695SkanADDING A NEW FILE 22169695Skan================= 23169695Skan 24169695SkanThere are two sets of files: Those that are "required" will be 25169695Skanincluded in the library for all configurations, while those 26169695Skanthat are "optional" will be included in the library only if "needed." 27169695Skan 28169695SkanTo add a new required file, edit Makefile to add the source file 29169695Skanname to CFILES and the object file to REQUIRED_OFILES. 30169695Skan 31169695SkanTo add a new optional file, it must provide a single function, and the 32169695Skanname of the function must be the same as the name of the file. 33169695Skan 34169695Skan * Add the source file name to CFILES. 35169695Skan 36169695Skan * Add the function to name to the funcs shell variable in 37169695Skan configure.ac. 38169695Skan 39169695Skan * Add the function to the AC_CHECK_FUNCS lists just after the 40169695Skan setting of the funcs shell variable. These AC_CHECK_FUNCS calls 41169695Skan are never executed; they are there to make autoheader work 42169695Skan better. 43169695Skan 44169695Skan * Consider the special cases of building libiberty; as of this 45169695Skan writing, the special cases are newlib and VxWorks. If a 46169695Skan particular special case provides the function, you do not need 47169695Skan to do anything. If it does not provide the function, add the 48169695Skan object file to LIBOBJS, and add the function name to the case 49169695Skan controlling whether to define HAVE_func. 50169695Skan 51169695SkanThe optional file you've added (e.g. getcwd.c) should compile and work 52169695Skanon all hosts where it is needed. It does not have to work or even 53169695Skancompile on hosts where it is not needed. 54169695Skan 55169695SkanADDING A NEW CONFIGURATION 56169695Skan========================== 57169695Skan 58169695SkanOn most hosts you should be able to use the scheme for automatically 59169695Skanfiguring out which files are needed. In that case, you probably 60169695Skandon't need a special Makefile stub for that configuration. 61169695Skan 62169695SkanIf the fully automatic scheme doesn't work, you may be able to get 63169695Skanby with defining EXTRA_OFILES in your Makefile stub. This is 64169695Skana list of object file names that should be treated as required 65169695Skanfor this configuration - they will be included in libiberty.a, 66169695Skanregardless of whatever might be in the C library. 67