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