diff options
Diffstat (limited to 'newlib/README')
-rw-r--r-- | newlib/README | 51 |
1 files changed, 42 insertions, 9 deletions
diff --git a/newlib/README b/newlib/README index bfc6ee292..e07d29b9c 100644 --- a/newlib/README +++ b/newlib/README @@ -1,4 +1,4 @@ - README for newlib-1.9.0 release + README for newlib-1.10.0 release (mostly cribbed from the README in the gdb-4.13 release) This is `newlib', a simple ANSI C library, math library, and collection @@ -17,8 +17,8 @@ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Unpacking and Installation -- quick overview ========================== -When you unpack the newlib-1.9.0.tar.gz file, you'll find a directory -called `newlib-1.9.0', which contains: +When you unpack the newlib-1.10.0.tar.gz file, you'll find a directory +called `newlib-1.10.0', which contains: COPYING config/ install-sh* mpw-configure COPYING.LIB config-ml.in libgloss/ mpw-install @@ -94,13 +94,13 @@ directory. If the path to `configure' would be the same as the argument to `--srcdir', you can leave out the `--srcdir' option; it will be assumed.) - For example, with version 1.9.0, you can build NEWLIB in a separate + For example, with version 1.10.0, you can build NEWLIB in a separate directory for a Sun 4 cross m68k-aout environment like this: - cd newlib-1.9.0 + cd newlib-1.10.0 mkdir ../newlib-m68k-aout cd ../newlib-m68k-aout - ../newlib-1.9.0/configure --host=sun4 --target=m68k-aout + ../newlib-1.10.0/configure --host=sun4 --target=m68k-aout make When `configure' builds a configuration using a remote source @@ -116,8 +116,8 @@ called `configure' (or one of its subdirectories). The `Makefile' that `configure' generates in each source directory also runs recursively. If you type `make' in a source directory such -as `newlib-1.9.0' (or in a separate configured directory configured with -`--srcdir=PATH/newlib-1.9.0'), you will build all the required libraries. +as `newlib-1.10.0' (or in a separate configured directory configured with +`--srcdir=PATH/newlib-1.10.0'), you will build all the required libraries. When you have multiple hosts or targets configured in separate directories, you can run `make' on them in parallel (for example, if @@ -214,13 +214,46 @@ prefer; but you may abbreviate option names if you use `--'. There is no convenient way to generate a list of all available hosts. +Shared newlib +============= + +newlib now uses libtool when it is being compiled natively (with +--target=i[3456]86-pc-linux-gnu) on an i[3456]86-pc-linux-gnu host. This +allows newlib to be compiled as a shared library. + +To configure newlib, do the following from your build directory: + +$(source_dir)/src/configure --with-newlib --prefix=$(install_dir) + +configure will recognize that host == target == +i[3456]86-pc-linux-gnu, so it will tell newlib to compile itself using +libtool. By default, libtool will build shared and static versions of +newlib. + +To compile a program against shared newlib, do the following (where +target_install_dir = $(install_dir)/i[3456]86-pc-linux-gnu): + +gcc -nostdlib $(target_install_dir)/lib/crt0.o progname.c -I $(target_install_dir)/include -L $(target_install_dir)/lib -lc -lm -lgcc + +To run the program, make sure that $(target_install_dir)/lib is listed +in the LD_LIBRARY_PATH environment variable. + +To create a static binary linked against newlib, do the following: + +gcc -nostdlib -static $(target_install_dir)/lib/crt0.o progname.c -I $(target_install_dir)/include -L $(target_install_dir)/lib -lc -lm + +libtool can be instructed to produce only static libraries. To build +newlib as a static library only, do the following from your build +directory: + +$(source_dir)/src/configure --with-newlib --prefix=$(install_dir) --disable-shared Reporting Bugs ============== The correct address for reporting bugs found in NEWLIB is "newlib@sources.redhat.com". Please email all bug reports to that -address. Please include the NEWLIB version number (e.g., newlib-1.9.0), +address. Please include the NEWLIB version number (e.g., newlib-1.10.0), and how you configured it (e.g., "sun4 host and m68k-aout target"). Since NEWLIB supports many different configurations, it is important that you be precise about this. |