LoginSignup
2
1

More than 5 years have passed since last update.

zlibのクロスコンパイル方法

Posted at

はじめに

ARMのターゲットデバイス上にLinuxルートファイルシステムを一から構築する機会があり、zlibを、x86_64のUbuntuホスト上でクロスコンパイルしました。本記事では、zlibをクロスコンパイルする手順をメモします。

前提

クロスコンパイルを行ったzlibのバージョンは、1.2.8です。

クロスコンパイラは、ホスト上の~/x-tools/bin/arm-linux-gnueabi-gccにインストールされているものとします。また、ターゲットデバイスのルートファイルシステムは、ホスト上の~/rootfsがルートであるとします。

クロスコンパイル方法

CC=~/x-tools/bin/arm-linux-gnueabi-gcc ./configure --prefix=~/rootfs/usr
make
make install

上記を実行すると、ルートファイルシステム~/rootfs/usr配下のincludeやlibディレクトリなどにzlibのファイルがインストールされます。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1