head	1.1;
branch	1.1.1;
access;
symbols
	RELENG_8_4:1.1.1.4.0.50
	RELENG_9_1_0_RELEASE:1.1.1.4
	RELENG_9_1:1.1.1.4.0.48
	RELENG_9_1_BP:1.1.1.4
	RELENG_8_3_0_RELEASE:1.1.1.4
	RELENG_8_3:1.1.1.4.0.46
	RELENG_8_3_BP:1.1.1.4
	RELENG_9_0_0_RELEASE:1.1.1.4
	RELENG_9_0:1.1.1.4.0.44
	RELENG_9_0_BP:1.1.1.4
	RELENG_9:1.1.1.4.0.42
	RELENG_9_BP:1.1.1.4
	RELENG_7_4_0_RELEASE:1.1.1.4
	RELENG_8_2_0_RELEASE:1.1.1.4
	RELENG_7_4:1.1.1.4.0.40
	RELENG_7_4_BP:1.1.1.4
	RELENG_8_2:1.1.1.4.0.38
	RELENG_8_2_BP:1.1.1.4
	RELENG_8_1_0_RELEASE:1.1.1.4
	RELENG_8_1:1.1.1.4.0.36
	RELENG_8_1_BP:1.1.1.4
	RELENG_7_3_0_RELEASE:1.1.1.4
	RELENG_7_3:1.1.1.4.0.34
	RELENG_7_3_BP:1.1.1.4
	RELENG_8_0_0_RELEASE:1.1.1.4
	RELENG_8_0:1.1.1.4.0.32
	RELENG_8_0_BP:1.1.1.4
	RELENG_8:1.1.1.4.0.30
	RELENG_8_BP:1.1.1.4
	RELENG_7_2_0_RELEASE:1.1.1.4
	RELENG_7_2:1.1.1.4.0.28
	RELENG_7_2_BP:1.1.1.4
	RELENG_7_1_0_RELEASE:1.1.1.4
	RELENG_6_4_0_RELEASE:1.1.1.4
	RELENG_7_1:1.1.1.4.0.26
	RELENG_7_1_BP:1.1.1.4
	RELENG_6_4:1.1.1.4.0.24
	RELENG_6_4_BP:1.1.1.4
	RELENG_7_0_0_RELEASE:1.1.1.4
	RELENG_6_3_0_RELEASE:1.1.1.4
	RELENG_7_0:1.1.1.4.0.22
	RELENG_7_0_BP:1.1.1.4
	RELENG_6_3:1.1.1.4.0.20
	RELENG_6_3_BP:1.1.1.4
	RELENG_7:1.1.1.4.0.18
	RELENG_7_BP:1.1.1.4
	RELENG_6_2_0_RELEASE:1.1.1.4
	RELENG_6_2:1.1.1.4.0.16
	RELENG_6_2_BP:1.1.1.4
	RELENG_5_5_0_RELEASE:1.1.1.4
	RELENG_5_5:1.1.1.4.0.14
	RELENG_5_5_BP:1.1.1.4
	RELENG_6_1_0_RELEASE:1.1.1.4
	RELENG_6_1:1.1.1.4.0.12
	RELENG_6_1_BP:1.1.1.4
	RELENG_6_0_0_RELEASE:1.1.1.4
	RELENG_6_0:1.1.1.4.0.10
	RELENG_6_0_BP:1.1.1.4
	RELENG_6:1.1.1.4.0.8
	RELENG_6_BP:1.1.1.4
	RELENG_5_4_0_RELEASE:1.1.1.4
	RELENG_5_4:1.1.1.4.0.6
	RELENG_5_4_BP:1.1.1.4
	RELENG_4_11_0_RELEASE:1.1.1.2.6.1
	RELENG_4_11:1.1.1.2.6.1.0.18
	RELENG_4_11_BP:1.1.1.2.6.1
	RELENG_5_3_0_RELEASE:1.1.1.4
	RELENG_5_3:1.1.1.4.0.4
	RELENG_5_3_BP:1.1.1.4
	RELENG_5:1.1.1.4.0.2
	RELENG_5_BP:1.1.1.4
	binutils_2_15_20040523:1.1.1.4
	RELENG_4_10_0_RELEASE:1.1.1.2.6.1
	RELENG_4_10:1.1.1.2.6.1.0.16
	RELENG_4_10_BP:1.1.1.2.6.1
	RELENG_5_2_1_RELEASE:1.1.1.3
	RELENG_5_2_0_RELEASE:1.1.1.3
	RELENG_5_2:1.1.1.3.0.6
	RELENG_5_2_BP:1.1.1.3
	RELENG_4_9_0_RELEASE:1.1.1.2.6.1
	RELENG_4_9:1.1.1.2.6.1.0.14
	RELENG_4_9_BP:1.1.1.2.6.1
	RELENG_5_1_0_RELEASE:1.1.1.3
	RELENG_5_1:1.1.1.3.0.4
	RELENG_5_1_BP:1.1.1.3
	RELENG_4_8_0_RELEASE:1.1.1.2.6.1
	RELENG_4_8:1.1.1.2.6.1.0.12
	RELENG_4_8_BP:1.1.1.2.6.1
	RELENG_5_0_0_RELEASE:1.1.1.3
	RELENG_5_0:1.1.1.3.0.2
	RELENG_5_0_BP:1.1.1.3
	binutils_2_13_2_20021127:1.1.1.3
	binutils_2_13_20021011:1.1.1.3
	RELENG_4_7_0_RELEASE:1.1.1.2.6.1
	RELENG_4_7:1.1.1.2.6.1.0.10
	RELENG_4_7_BP:1.1.1.2.6.1
	BEFORE_BU_2121__RELENG4:1.1.1.2.6.1
	binutils_2_12_20020720:1.1.1.3
	RELENG_4_6_2_RELEASE:1.1.1.2.6.1
	RELENG_4_6_1_RELEASE:1.1.1.2.6.1
	binutils_2_12_20020622:1.1.1.3
	RELENG_4_6_0_RELEASE:1.1.1.2.6.1
	RELENG_4_6:1.1.1.2.6.1.0.8
	RELENG_4_6_BP:1.1.1.2.6.1
	binutils_2_12_20020410:1.1.1.3
	BEFORE_BU_2_12:1.1.1.3
	binutils_2_12_anoncvs_20020320:1.1.1.3
	binutils_2_12_anoncvs_20020221:1.1.1.3
	RELENG_4_5_0_RELEASE:1.1.1.2.6.1
	binutils_anoncvs_20020127:1.1.1.3
	RELENG_4_5:1.1.1.2.6.1.0.6
	RELENG_4_5_BP:1.1.1.2.6.1
	binutils_2_11_cvs_20011031:1.1.1.3
	RELENG_4_4_0_RELEASE:1.1.1.2.6.1
	RELENG_4_4:1.1.1.2.6.1.0.4
	RELENG_4_4_BP:1.1.1.2.6.1
	BEFORE_BU_2112__RELENG4:1.1.1.2.6.1
	binutils_2_11_cvs_20010719:1.1.1.3
	binutils_2_11_2:1.1.1.3
	binutils_2_11_0:1.1.1.3
	BEFORE_BU_2110:1.1.1.3
	RELENG_4_3_0_RELEASE:1.1.1.2.6.1
	RELENG_4_3:1.1.1.2.6.1.0.2
	RELENG_4_3_BP:1.1.1.2.6.1
	RELENG_4_2_0_RELEASE:1.1.1.2.6.1
	binutils_2_10_1:1.1.1.3
	RELENG_4_1_1_RELEASE:1.1.1.2.6.1
	PRE_SMPNG:1.1.1.3
	RELENG_4_1_0_RELEASE:1.1.1.2.6.1
	RELENG_3_5_0_RELEASE:1.1.1.2
	binutils_2_10_0:1.1.1.3
	BEFORE_UPGRADING_2_9_1:1.1.1.2
	sourceware_binutils-2_10-branch_anoncvs_20000512:1.1.1.3
	RELENG_4_0_0_RELEASE:1.1.1.2
	RELENG_4:1.1.1.2.0.6
	RELENG_4_BP:1.1.1.2
	RELENG_3_4_0_RELEASE:1.1.1.2
	RELENG_3_3_0_RELEASE:1.1.1.2
	RELENG_3_2_PAO:1.1.1.2.0.4
	RELENG_3_2_PAO_BP:1.1.1.2
	RELENG_3_2_0_RELEASE:1.1.1.2
	RELENG_3_1_0_RELEASE:1.1.1.2
	RELENG_3:1.1.1.2.0.2
	RELENG_3_BP:1.1.1.2
	RELENG_3_0_0_RELEASE:1.1.1.2
	gnu_2_9_1:1.1.1.2
	gnu_2_8_1:1.1.1.1
	FSF:1.1.1;
locks; strict;
comment	@# @;


1.1
date	98.03.01.22.58.12;	author jdp;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	98.03.01.22.58.12;	author jdp;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	98.09.06.22.57.33;	author jdp;	state Exp;
branches
	1.1.1.2.6.1;
next	1.1.1.3;

1.1.1.3
date	2000.05.12.23.15.11;	author obrien;	state Exp;
branches;
next	1.1.1.4;

1.1.1.4
date	2004.06.16.05.45.01;	author obrien;	state Exp;
branches
	1.1.1.4.50.1;
next	;

1.1.1.2.6.1
date	2000.07.07.05.34.21;	author obrien;	state Exp;
branches;
next	;

1.1.1.4.50.1
date	2004.06.16.05.45.01;	author svnexp;	state dead;
branches;
next	1.1.1.4.50.2;

1.1.1.4.50.2
date	2013.03.28.13.00.37;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.1
log
@Initial revision
@
text
@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.

To build the library, do:

	./configure HOSTTYPE
	make

Please report bugs and fixes to "bug-gnu-utils@@prep.ai.mit.edu".  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 to add the source file
name to CFILES and the object file to REQUIRED_OFILES.

Adding a new optional file is more fragile.  As a general rule,
an optional file will be included in the library if it provides
functionality missing in the "standard" C library.
For most hosts, the Makefile automatically figures out which
functionality is missing by compiling and linking a dummy test
program, and examining the error messages.

So to get this to work, you should do the following:

1) Select one function defined in the file you're adding.
For example, the getcwd function.
2) Add that function to the list in the file functions.def.
3) The name of the new file must be the same as the function
you've chosen with the .c suffix added.  E.g. getcwd() must be
defined in getcwd.c.  (The file can define other functions as well.)
4) In Makefile.in, add the name of the source file (e.g. getcwd.c)
to CFILES.

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

HOW THE AUTOMATIC CONFIGURATION WORKS
=====================================

The libiberty.a target (in RULE1) depends on $(DO_ALSO).
For normal configurations, DO_ALSO=needed-list.

So needed-list is first made.  The needed-list rule compiles
dummy.c.  Because dummy.c includes functions.def, the
resulting object file will contain a call to each of the
optional functions (for simplicity assume each optional file
defines a single function).  This object file will be linked
against the standard libraries (as defined by using $(CC)
and various flags).  Any function missing will causes the
linker to emit an error message.  We assume the name
of the missing function(s) are in the error message(s).
The awk script find-needed.awk has been generated from
functions.def.  It is used to search the linker output
messages for words that match the functions listed in
functions.def.  The list of functions found is written
on a single line to the file needed-list.

After needed-list has been generated, the libiberty.a
target (in RULE1) just calls 'make' recursively.
It passes the contents of needed-list using the
definition (expanded) HOST_OFILES="`cat needed-list`".
It also tells the inferior 'make' to use RULE2.

The inferior 'make' is very conventional:  The main
rule is $(RULE2) (which is libiberty.a).  It depends
on a list of object files: $(REQUIRED_OFILES) $(HOST_OFILES)
(and $(EXTRA_OFILES), which is usually empty).  The superior
'make' passes in $(HOST_OFILES); the others are fixed
in the Makefile.

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.  Moreover,
when the dummy.c program is linked, it will be linked with
$(EXTRA_OFILES).  Therefore, if a function in functions.def
is defined by one of the EXTRA_OFILES, it will not be listed as
"needed".  Thus if your hal9000 host needs a special implementation
of getcwd, you can just create hal9000-getcwd.c, and define:
	EXTRA_OFILES=hal9000-getcwd.o
Or if you want to use the libiberty version of strstr(),
even though there is a version in the C library (it might be
buggy or slow), just define:
	EXTRA_OFILES=strstr.o

You can create a "manual" host configuration FOO with a file
config/mh-FOO.  In it, the HOST_OFILES macro should explicitly
list that subset of the optional files that should be in the
library.  You should also set:
	DO_ALSO =
This overrides all of the magic needed to automatically
determine which files are "needed."  However, keeping that list
up to date is another matter...

HOW THE MANUAL CONFIGURATION WORKS
==================================

This also uses a recursive make, but the superior make
does not do anything interesting - it just calls the
inferior make with HOST_OFILES defined as $(HOST_OFILES),
which is the list you created in your configuration.

You probably don't want to depend on manual configuration,
because keeping the HOST_OFILES list up-to-date will be a pain.
@


1.1.1.1
log
@Initial import of GNU binutils version 2.8.1.  Believe it or not,
this is heavily stripped down.
@
text
@@


1.1.1.2
log
@Import GNU binutils-2.9.1.  This will break things for a few minutes
until I've made the commits to resolve the conflicts.

Submitted by:	Doug Rabson <dfr>
@
text
@d14 4
a17 3
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.
@


1.1.1.2.6.1
log
@Upgrade to Binutils 2.10.0.
@
text
@d30 22
a51 4
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.
d53 2
a54 2
    * Add the function to name to the funcs shell variable in
      configure.in.
d56 2
a57 11
    * 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.
d59 27
a85 3
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.
d98 31
a128 1
regardless of whatever might be in the C library.
@


1.1.1.3
log
@Import of Binutils 2.10 snapshot.
@
text
@d30 22
a51 4
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.
d53 2
a54 2
    * Add the function to name to the funcs shell variable in
      configure.in.
d56 2
a57 11
    * 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.
d59 27
a85 3
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.
d98 31
a128 1
regardless of whatever might be in the C library.
@


1.1.1.4
log
@Import of Binutils from the FSF 2.15 branch (just post-.0 release).
These bits are taken from the FSF anoncvs repo on 23-May-2004 04:41:00 UTC.
@
text
@d18 1
a18 2
Please report bugs to "gcc-bugs@@gcc.gnu.org" and send fixes to
"gcc-patches@@gcc.gnu.org".  Thank you.
d36 1
a36 1
      configure.ac.
@


1.1.1.4.50.1
log
@file README was added on branch RELENG_8_4 on 2013-03-28 13:00:37 +0000
@
text
@d1 66
@


1.1.1.4.50.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 66
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 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.

    * 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.

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.
@


