Created
February 24, 2018 17:09
-
-
Save Leandros/252e051ef30e8799e686d8cf8b4b6348 to your computer and use it in GitHub Desktop.
Compile NASM
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
#!/bin/bash | |
export PATH=$PATH:$HOME/x86_64-linux-musl/bin | |
export CC=x86_64-linux-musl-gcc | |
export CXX=x86_64-linux-musl-g++ | |
# If needed | |
export CC="$CC -static --static" | |
export CXX="$CXX -static --static" | |
function get { | |
local url=$1 | |
local suffix=$2 | |
local filename=$(basename $url) | |
local dirname=$(basename $filename $suffix) | |
wget -nc $url | |
rm -rf $dirname | |
tar xf $filename | |
pushd $dirname | |
} | |
get "http://www.nasm.us/pub/nasm/releasebuilds/2.13.03/nasm-2.13.03.tar.xz" ".tar.xz" | |
./configure \ | |
--prefix="$(realpath output)" | |
make -j$(nproc) | |
make install | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment