徐启航 0ef513762e Init 2 years ago
..
config 0ef513762e Init 2 years ago
testsuite 0ef513762e Init 2 years ago
.gitignore 0ef513762e Init 2 years ago
COPYING.LIB 0ef513762e Init 2 years ago
ChangeLog 0ef513762e Init 2 years ago
ChangeLog.jit 0ef513762e Init 2 years ago
Makefile.in 0ef513762e Init 2 years ago
README 0ef513762e Init 2 years ago
_doprnt.c 0ef513762e Init 2 years ago
acinclude.m4 0ef513762e Init 2 years ago
aclocal.m4 0ef513762e Init 2 years ago
alloca.c 0ef513762e Init 2 years ago
argv.c 0ef513762e Init 2 years ago
asprintf.c 0ef513762e Init 2 years ago
at-file.texi 0ef513762e Init 2 years ago
atexit.c 0ef513762e Init 2 years ago
basename.c 0ef513762e Init 2 years ago
bcmp.c 0ef513762e Init 2 years ago
bcopy.c 0ef513762e Init 2 years ago
bsearch.c 0ef513762e Init 2 years ago
bsearch_r.c 0ef513762e Init 2 years ago
bzero.c 0ef513762e Init 2 years ago
calloc.c 0ef513762e Init 2 years ago
choose-temp.c 0ef513762e Init 2 years ago
clock.c 0ef513762e Init 2 years ago
concat.c 0ef513762e Init 2 years ago
config.h-vms 0ef513762e Init 2 years ago
config.in 0ef513762e Init 2 years ago
configure 0ef513762e Init 2 years ago
configure.ac 0ef513762e Init 2 years ago
configure.com 0ef513762e Init 2 years ago
copying-lib.texi 0ef513762e Init 2 years ago
copysign.c 0ef513762e Init 2 years ago
cp-demangle.c 0ef513762e Init 2 years ago
cp-demangle.h 0ef513762e Init 2 years ago
cp-demint.c 0ef513762e Init 2 years ago
cplus-dem.c 0ef513762e Init 2 years ago
crc32.c 0ef513762e Init 2 years ago
d-demangle.c 0ef513762e Init 2 years ago
dwarfnames.c 0ef513762e Init 2 years ago
dyn-string.c 0ef513762e Init 2 years ago
fdmatch.c 0ef513762e Init 2 years ago
ffs.c 0ef513762e Init 2 years ago
fibheap.c 0ef513762e Init 2 years ago
filedescriptor.c 0ef513762e Init 2 years ago
filename_cmp.c 0ef513762e Init 2 years ago
floatformat.c 0ef513762e Init 2 years ago
fnmatch.c 0ef513762e Init 2 years ago
fnmatch.txh 0ef513762e Init 2 years ago
fopen_unlocked.c 0ef513762e Init 2 years ago
functions.texi 0ef513762e Init 2 years ago
gather-docs 0ef513762e Init 2 years ago
getcwd.c 0ef513762e Init 2 years ago
getopt.c 0ef513762e Init 2 years ago
getopt1.c 0ef513762e Init 2 years ago
getpagesize.c 0ef513762e Init 2 years ago
getpwd.c 0ef513762e Init 2 years ago
getruntime.c 0ef513762e Init 2 years ago
gettimeofday.c 0ef513762e Init 2 years ago
hashtab.c 0ef513762e Init 2 years ago
hex.c 0ef513762e Init 2 years ago
index.c 0ef513762e Init 2 years ago
insque.c 0ef513762e Init 2 years ago
lbasename.c 0ef513762e Init 2 years ago
libiberty.texi 0ef513762e Init 2 years ago
lrealpath.c 0ef513762e Init 2 years ago
maint-tool 0ef513762e Init 2 years ago
make-relative-prefix.c 0ef513762e Init 2 years ago
make-temp-file.c 0ef513762e Init 2 years ago
makefile.vms 0ef513762e Init 2 years ago
md5.c 0ef513762e Init 2 years ago
memchr.c 0ef513762e Init 2 years ago
memcmp.c 0ef513762e Init 2 years ago
memcpy.c 0ef513762e Init 2 years ago
memmem.c 0ef513762e Init 2 years ago
memmove.c 0ef513762e Init 2 years ago
mempcpy.c 0ef513762e Init 2 years ago
memset.c 0ef513762e Init 2 years ago
mkstemps.c 0ef513762e Init 2 years ago
msdos.c 0ef513762e Init 2 years ago
objalloc.c 0ef513762e Init 2 years ago
obstack.c 0ef513762e Init 2 years ago
obstacks.texi 0ef513762e Init 2 years ago
partition.c 0ef513762e Init 2 years ago
pex-common.c 0ef513762e Init 2 years ago
pex-common.h 0ef513762e Init 2 years ago
pex-djgpp.c 0ef513762e Init 2 years ago
pex-msdos.c 0ef513762e Init 2 years ago
pex-one.c 0ef513762e Init 2 years ago
pex-unix.c 0ef513762e Init 2 years ago
pex-win32.c 0ef513762e Init 2 years ago
pexecute.c 0ef513762e Init 2 years ago
pexecute.txh 0ef513762e Init 2 years ago
physmem.c 0ef513762e Init 2 years ago
putenv.c 0ef513762e Init 2 years ago
random.c 0ef513762e Init 2 years ago
regex.c 0ef513762e Init 2 years ago
rename.c 0ef513762e Init 2 years ago
rindex.c 0ef513762e Init 2 years ago
rust-demangle.c 0ef513762e Init 2 years ago
safe-ctype.c 0ef513762e Init 2 years ago
setenv.c 0ef513762e Init 2 years ago
setproctitle.c 0ef513762e Init 2 years ago
sha1.c 0ef513762e Init 2 years ago
sigsetmask.c 0ef513762e Init 2 years ago
simple-object-coff.c 0ef513762e Init 2 years ago
simple-object-common.h 0ef513762e Init 2 years ago
simple-object-elf.c 0ef513762e Init 2 years ago
simple-object-mach-o.c 0ef513762e Init 2 years ago
simple-object-xcoff.c 0ef513762e Init 2 years ago
simple-object.c 0ef513762e Init 2 years ago
simple-object.txh 0ef513762e Init 2 years ago
snprintf.c 0ef513762e Init 2 years ago
sort.c 0ef513762e Init 2 years ago
spaces.c 0ef513762e Init 2 years ago
splay-tree.c 0ef513762e Init 2 years ago
stack-limit.c 0ef513762e Init 2 years ago
stpcpy.c 0ef513762e Init 2 years ago
stpncpy.c 0ef513762e Init 2 years ago
strcasecmp.c 0ef513762e Init 2 years ago
strchr.c 0ef513762e Init 2 years ago
strdup.c 0ef513762e Init 2 years ago
strerror.c 0ef513762e Init 2 years ago
strncasecmp.c 0ef513762e Init 2 years ago
strncmp.c 0ef513762e Init 2 years ago
strndup.c 0ef513762e Init 2 years ago
strnlen.c 0ef513762e Init 2 years ago
strrchr.c 0ef513762e Init 2 years ago
strsignal.c 0ef513762e Init 2 years ago
strstr.c 0ef513762e Init 2 years ago
strtod.c 0ef513762e Init 2 years ago
strtol.c 0ef513762e Init 2 years ago
strtoll.c 0ef513762e Init 2 years ago
strtoul.c 0ef513762e Init 2 years ago
strtoull.c 0ef513762e Init 2 years ago
strverscmp.c 0ef513762e Init 2 years ago
timeval-utils.c 0ef513762e Init 2 years ago
tmpnam.c 0ef513762e Init 2 years ago
unlink-if-ordinary.c 0ef513762e Init 2 years ago
vasprintf.c 0ef513762e Init 2 years ago
vfork.c 0ef513762e Init 2 years ago
vfprintf.c 0ef513762e Init 2 years ago
vprintf-support.c 0ef513762e Init 2 years ago
vprintf-support.h 0ef513762e Init 2 years ago
vprintf.c 0ef513762e Init 2 years ago
vsnprintf.c 0ef513762e Init 2 years ago
vsprintf.c 0ef513762e Init 2 years ago
waitpid.c 0ef513762e Init 2 years ago
xasprintf.c 0ef513762e Init 2 years ago
xatexit.c 0ef513762e Init 2 years ago
xexit.c 0ef513762e Init 2 years ago
xmalloc.c 0ef513762e Init 2 years ago
xmemdup.c 0ef513762e Init 2 years ago
xstrdup.c 0ef513762e Init 2 years ago
xstrerror.c 0ef513762e Init 2 years ago
xstrndup.c 0ef513762e Init 2 years ago
xvasprintf.c 0ef513762e Init 2 years ago

README

This directory contains the -liberty library of free software.
It is a collection of subroutines used by various GNU programs.
Current members include:

getopt -- get options from command line
obstack -- stacks of arbitrarily-sized objects
strerror -- error message strings corresponding to errno
strtol -- string-to-long conversion
strtoul -- string-to-unsigned-long conversion

We expect many of the GNU subroutines that are floating around to
eventually arrive here.

The library must be configured from the top source directory. Don't
try to run configure in this directory. Follow the configuration
instructions in ../README.

Please report bugs to "gcc-bugs@gcc.gnu.org" and send fixes to
"gcc-patches@gcc.gnu.org". Thank you.

ADDING A NEW FILE
=================

There are two sets of files: Those that are "required" will be
included in the library for all configurations, while those
that are "optional" will be included in the library only if "needed."

To add a new required file, edit Makefile.in to add the source file
name to CFILES and the object file to REQUIRED_OFILES.

To add a new optional file, it must provide a single function, and the
name of the function must be the same as the name of the file.

* Add the source file name to CFILES in Makefile.in and the object
file to CONFIGURED_OFILES.

* Add the function to name to the funcs shell variable in
configure.ac.

* Add the function to the AC_CHECK_FUNCS lists just after the
setting of the funcs shell variable. These AC_CHECK_FUNCS calls
are never executed; they are there to make autoheader work
better.

* Consider the special cases of building libiberty; as of this
writing, the special cases are newlib and VxWorks. If a
particular special case provides the function, you do not need
to do anything. If it does not provide the function, add the
object file to LIBOBJS, and add the function name to the case
controlling whether to define HAVE_func.

Finally, in the build directory of libiberty, configure with
"--enable-maintainer-mode", run "make maint-deps" to update
Makefile.in, and run 'make stamp-functions' to regenerate
functions.texi.

The optional file you've added (e.g. getcwd.c) should compile and work
on all hosts where it is needed. It does not have to work or even
compile on hosts where it is not needed.

ADDING A NEW CONFIGURATION
==========================

On most hosts you should be able to use the scheme for automatically
figuring out which files are needed. In that case, you probably
don't need a special Makefile stub for that configuration.

If the fully automatic scheme doesn't work, you may be able to get
by with defining EXTRA_OFILES in your Makefile stub. This is
a list of object file names that should be treated as required
for this configuration - they will be included in libiberty.a,
regardless of whatever might be in the C library.