Skip to content

Instantly share code, notes, and snippets.

@thewh1teagle
Created June 14, 2020 19:06
Show Gist options
  • Save thewh1teagle/38a9cabe27716137c21826f5d79bcd6b to your computer and use it in GitHub Desktop.
Save thewh1teagle/38a9cabe27716137c21826f5d79bcd6b to your computer and use it in GitHub Desktop.
#!/usr/bin/bash
# sudo apt install gcc-arm-linux-gnueabihf
VERSION=1.2.11
wget https://zlib.net/zlib-$VERSION.tar.gz
tar xf zlib-$VERSION.tar.gz && rm zlib-$VERSION.tar.gz
cd zlib-$VERSION
mkdir build
CHOST=arm CC=/usr/bin/arm-linux-gnueabihf-gcc \
AR=/usr/bin/arm-linux-gnueabihf-ar \
RANLIB=/usr/bin/arm-linux-gnueabihf-ranlib \
./configure --prefix=$(pwd)/build
make -j$(nproc) && make install
@ajebulon
Copy link

This does not work if I want to build the shared library. Any idea how?

@Loyolichoo
Copy link

This does not work if I want to build the shared library. Any idea how?

add an environment variable
export LDSHARED=$CC --shared

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment