libc for both hosted and freestanding environments
Go to file
Alex Kotov ea359a1795
Remove macros
2022-12-25 13:58:52 +04:00
.github Remove assertions 2022-12-25 13:57:12 +04:00
build Use the code from libkernaux 2022-12-25 12:58:00 +04:00
libc Use the code from libkernaux 2022-12-25 12:58:00 +04:00
m4 Use the code from libkernaux 2022-12-25 12:58:00 +04:00
make Remove Multiboot 2 2022-12-25 13:20:10 +04:00
pkgs/freebsd Remove macros 2022-12-25 13:58:52 +04:00
tests Remove runtime 2022-12-25 13:54:08 +04:00
.cirrus.yml Remove Python 2022-12-25 13:12:53 +04:00
.gitignore Remove examples 2022-12-25 13:16:21 +04:00
.gitmodules Use the code from libkernaux 2022-12-25 12:58:00 +04:00
.openbsd.yml Remove Python 2022-12-25 13:12:53 +04:00
AUTHORS Use the code from libkernaux 2022-12-25 12:58:00 +04:00
CONTRIBUTING.md Remove bindings 2022-12-25 13:00:20 +04:00
COPYING Use the code from libkernaux 2022-12-25 12:58:00 +04:00
ChangeLog Clean ChangeLog and NEWS.md 2022-12-25 13:05:26 +04:00
Makefile.am Remove assertions 2022-12-25 13:57:12 +04:00
NEWS Use the code from libkernaux 2022-12-25 12:58:00 +04:00
NEWS.md Clean ChangeLog and NEWS.md 2022-12-25 13:05:26 +04:00
README Use the code from libkernaux 2022-12-25 12:58:00 +04:00
README.md Remove macros 2022-12-25 13:58:52 +04:00
VERSION Use the code from libkernaux 2022-12-25 12:58:00 +04:00
VERSION_SO Use the code from libkernaux 2022-12-25 12:58:00 +04:00
autogen.sh Use the code from libkernaux 2022-12-25 12:58:00 +04:00
configure.ac Remove assertions 2022-12-25 13:57:12 +04:00
libkernaux.pc.in Use the code from libkernaux 2022-12-25 12:58:00 +04:00
sha256sums.txt Use the code from libkernaux 2022-12-25 12:58:00 +04:00

README.md

libkernaux

Build status Build status (FreeBSD)

Auxiliary library for kernel development.

Topic on OSDev.org forum.

Table of contents

API

Headers

We use semantic versioning for stable APIs. Stable APIs may only change when major version number is increased (or minor while major is zero). Work-in-progress APIs can change at any time.

Configuration

Because this library has no external dependencies, we use autoconf features to control behavior of the library, and packages to choose it's components. Configuration options also follow the semantic versioning scheme and are split into stable and work-in-progress ones. Here we cover only stable options.

Non-default options

Features

  • --enable-checks - enable usual tests
  • --enable-checks-all - enable all checks
  • --enable-checks-cppcheck - enable cppcheck Jinja2
  • --enable-pkg-config[=PATH] - install pkg-config files [PATH='${libdir}/pkgconfig']

Packages

  • --with-libc - provides the replacement for some standard C functions. Useful in freestanding environment, where no libc is present.

Default options

Features

  • --(enable|disable)-float - floating-point arithmetic
  • --(enable|disable)-werror - fail on warning (CFLAGS+='-Werror')

Tips

Installation

./autogen.sh # if present
./configure
make
sudo make install
sudo ldconfig # on GNU/Linux

This is just a usual library. You can use most of it's APIs in hosted environment.

Development

./autogen.sh # if present
./configure --enable-checks # or --enable-checks-all, but see prerequisites
make

You can test with make check.

See also

Cross

Create configuration script with ./autogen.sh (if present).

Let's assume that your target triplet is i386-elf. Configure with cross-compiler in $PATH to make without it in $PATH:

./configure \
  --host='i386-elf' \
  --disable-shared \
  --enable-freestanding \
  --with-libc \
  CC="$(which i386-elf-gcc)"

The variables include AR, AS, CC, CCAS, LD, NM, OBJDUMP, RANLIB, STRIP. See the generated config.log for more information.

To install into specific directory use full path: DESTDIR="$(pwd)/dest" make install instead of DESTDIR=dest make install.