[klibc] [PATCH 0/1] Porting klibc to arm64

Thorsten Glaser tg at mirbsd.de
Wed Oct 9 03:44:27 PDT 2013


Anil Singhar dixit:

>Manual testing as provided within the package has been done with all tests
>passing. This includes the units tests available under usr/klibc/tests,
>usr/utils, usr/dash and usr/gzip. For dash and gzip, only sanity testing
>has been done.

It’s *massively* recommended to try to build mksh against klibc
then run mksh’s testsuite, since it’s proven, time and time again,
to be a decent toolchain exercise.

To do this:

$ export CC=/path/to/klcc  # can be cross-klcc too
$ export CFLAGS='-Os'      # can add -g3 for debugging
$ wget https://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R48b.tgz
$ tar xzf mksh-R48b.tgz
$ cd mksh
$ sh Build.sh -r 2>&1 | tee build.log

Then, if cross-compiling, transfer the following files to the
arm64 target system (or emulator):

check.pl check.t (from source)
mksh test.sh (generated)

Install /bin/ed on the arm64 system (or, otherwise, ignore the
three testsuite failures that result from missing it).

Install stuff like coreutils and perl on the arm64 system in
order to be able to actually run the testsuite.

Then, on the arm64 system, run
$ ./test.sh 2>&1 | tee test.log

The current path of the build directory is hardcoded in test.sh,
so you can also run this instead:
$ ./mksh test.sh -p $(pwd)/mksh 2>&1 | tee test.log

Then, send both build.log and test.log if I need to inspect any
failures.

For added fun, set CC='klcc -shared' and copy /lib/klibc-*.so
over, too. On at least one architecture (IA64 aka Itanic), the
dynamic version fails while the static (default) one works.

bye,
//mirabilos
-- 
> emacs als auch vi zum Kotzen finde (joe rules) und pine für den einzig
> bedienbaren textmode-mailclient halte (und ich hab sie alle ausprobiert). ;)
Hallooooo, ich bin der Holger ("Hallo Holger!"), und ich bin ebenfalls
... pine-User, und das auch noch gewohnheitsmäßig ("Oooooooohhh").  [aus dasr]



More information about the klibc mailing list