Home

Awesome

blink-isystem

This repository provides a subset of the Musl Libc and Linux Kernel headers, where APIs that are incompatible with the Blink Virtual Machine have been commented out. This will help you compile Linux programs from source that will stand a much better chance of being successfully emulated across platforms.

The recommended approach is to use GNU Autotools to build your project on the Alpine Linux distro. We prefer Alpine because it uses Musl Libc rather than Glibc. Musl works better with Blink right now, because Glibc uses a lot of esoteric system calls in its implementation details that are highly Linux-specific and currently not supported by Blink.

Usage

Clone this repository somewhere on your Alpine Linux machine:

cd $HOME
git clone https://github.com/jart/blink-isystem

Autotools projects can then be configured as follows:

./configure CFLAGS="-isystem $HOME/blink-isystem" \
            CXXFLAGS="-isystem $HOME/blink-isystem" \
            LDFLAGS="-static -Wl,-z,common-page-size=65536,-z,max-page-size=65536"
make -j

Using the above flag will cause the headers in this repository to be favored over the ones provided by Alpine, but only for Musl and Linux. That way, when autoconf looks for an unsupported interface (e.g. timer_create) it won't be able to find it, in which case the project should hopefully choose a better interface (e.g. setitimer) instead.

Removed APIs

See the commit log for the definitive information. At a high-level, a lot of the stuff that's been removed is: