Created
June 14, 2020 19:06
-
-
Save thewh1teagle/38a9cabe27716137c21826f5d79bcd6b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
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
This does not work if I want to build the shared library. Any idea how?