diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2019-02-01 18:04:52 +0100 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2019-02-02 00:13:32 +0100 |
commit | 4876d484577d8a4d9ff7de437fcfa5cba7a7e748 (patch) | |
tree | dd23f98724b38eba7e768b0fc7a06ce7c154a3f2 | |
parent | b8fc25ef83f8fbf85c07a237f4d8a0af95ea88ad (diff) | |
download | klibc-4876d484577d8a4d9ff7de437fcfa5cba7a7e748.tar.gz |
[klibc] README.klibc: Document most of the build options
* Explicitly say where to set the cross-compilation variables
* Explain how to do an out-of-tree build
* Document all the configuration variables in defconfig
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | usr/klibc/README.klibc | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/usr/klibc/README.klibc b/usr/klibc/README.klibc index ea10c55fc52ae5..032d395904b406 100644 --- a/usr/klibc/README.klibc +++ b/usr/klibc/README.klibc @@ -22,7 +22,7 @@ Cross-compiling If you're cross-compiling, you need to set KLIBCARCH to the appropriate architecture, and set CROSS_COMPILE to your toolchain -prefix. +prefix, on the "make" command line IMPORTANT: if you're on a 64-bit machine with a 32-bit userland (ia64, mips64, ppc64 sparc64, s390x or x86_64), and you want to @@ -36,6 +36,51 @@ If you are on ARM, and want to build a thumb version of the library (this is supported), change OPTFLAGS in arch/arm/MCONFIG to build thumb code. +Out-of-tree builds +------------------ + +It is possible to use a separate build directory so that build +products are not created in source directories. To do this, +create the build directory and in that directory run: + make -f <source-dir>/Makefile KBUILD_SRC=<source-dir> + +Build configuration +------------------- + +The build configuration is defined in a ".config" file in the +build directory. If this file does not already exist, it is +created as a copy of the "defconfig" source file. + +The configuration variables are: + +* CONFIG_KLIBC_ERRLIST (bool): Include standard error strings for + strerror(). If disabled, strerror() returns the error number as a + string. +* CONFIG_KLIBC_ZLIB (bool): Include zlib decompression functions. If + disabled, kinit can only load uncompressed ramdisk images. +* CONFIG_KLIBC_ZIP (bool): Include compression support in the gzip + command. +* CONFIG_DEBUG_INFO (bool): Install all executables and the shared + library with debug information and build IDs included. If + disabled, the executables and shared library are stripped when + installed. + +For arm only: + +* CONFIG_KLIBC_THUMB (bool): Compile all code to Thumb instructions, + which should reduce code size slightly. If disabled, regular ARM + instructions are used. +* CONFIG_AEABI (bool): Compile ARM code to use the ARM EABI and the + "new" system call ABI. + +If both CONFIG_KLIBC_THUMB and CONFIG_AEABI are disabled, the GNU APCS +and the old system call ABI are used. + +For i386 only: + +* CONFIG_REGPARM (bool): Optimise function calls by passing the first + 3 function parameters in registers. + Building without kernel source ------------------------------ |