klibc-bot for Ben Hutchings
2019-Feb-01 23:21 UTC
[klibc] [klibc:master] README.klibc: Replace list with sections and headings
Commit-ID: 72fea69b91bdc8981d958984bc78401a08f8aff5 Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=72fea69b91bdc8981d958984bc78401a08f8aff5 Author: Ben Hutchings <ben at decadent.org.uk> AuthorDate: Fri, 1 Feb 2019 16:00:20 +0000 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sat, 2 Feb 2019 00:09:23 +0100 [klibc] README.klibc: Replace list with sections and headings The current text talks about a build process, but then lists many things that are either optional or not related to the build process. Turn the list items (and the rest of the text) into multiple sections with headings. Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/klibc/README.klibc | 67 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 26 deletions(-) diff --git a/usr/klibc/README.klibc b/usr/klibc/README.klibc index 19f4010a..59ffd351 100644 --- a/usr/klibc/README.klibc +++ b/usr/klibc/README.klibc @@ -1,39 +1,49 @@ +Introduction +===========+ This is klibc, what is intended to be a minimalistic libc subset for use with initramfs. It is deliberately written for small size, minimal entanglement, and portability, not speed. It is definitely a work in progress, and a lot of things are still missing. +Building +======= The build procedure is not very polished yet, but it should work like this: -a) Extract a recent Linux kernel into a directory and run - "make headers_install". - Now enter the klibc dir and point KLIBCKERNELSRC to the - usr subdirectory of the configured linux tree - "make KLIBCKERNELSRC=`pwd`/../linux/usr/". +Extract a recent Linux kernel into a directory and run +"make headers_install". +Now enter the klibc dir and point KLIBCKERNELSRC to the +usr subdirectory of the configured linux tree +"make KLIBCKERNELSRC=`pwd`/../linux/usr/". + +It is also possible to install the kernel headers elsewhere and +point to them there. - It is also possible to install the kernel headers elsewhere and - point to them there. +Cross-compiling +--------------- +If you're cross-compiling, you need to set KLIBCARCH to the +appropriate architecture, and set CROSS_COMPILE to your toolchain +prefix. -b) If you're cross-compiling, you need to set KLIBCARCH to the - appropriate architecture, and set CROSS_COMPILE to your toolchain - prefix. +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 +build the 32-bit version: you need to set KLIBCARCH to the 32-bit +architecture as well as set up the linux/include/asm symlink to +point to the 32-bit architecture. Building the 32-bit architecture +usually (but not always) produces smaller binaries, and is likely +to be better tested. - 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 - build the 32-bit version: you need to set KLIBCARCH to the 32-bit - architecture as well as set up the linux/include/asm symlink to - point to the 32-bit architecture. Building the 32-bit architecture - usually (but not always) produces smaller binaries, and is likely - to be better tested. +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. - 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. +Architecture support +=================== - The following is the last known status of various architectures: +The following is the last known status of various architectures: alpha: Working arm-thumb: Untested @@ -62,13 +72,18 @@ b) If you're cross-compiling, you need to set KLIBCARCH to the x86-64: Working xtensa: Not yet ported - Shared library support requires recent binutils on many - architectures. +Shared library support requires recent binutils on many architectures. + +Note that even the "working" ones likely have bugs. Please report +them if you run into them. + +Testing +====== - Note that even the "working" ones likely have bugs. Please report - them if you run into them. +Try the test programs in the tests/ directory. They should run... -c) Try the test programs in the tests/ directory. They should run... +Contact +====== Contact the klibc mailing list: