Skip to content

Commit

Permalink
Enhancement for Issue 3: Adding ARM build support (#4)
Browse files Browse the repository at this point in the history
* Enhancement for Issue 3: Adding ARM build support

authored-by: decidedlygray <[email protected]>
  • Loading branch information
decidedlygray authored May 29, 2020
1 parent 266c8f9 commit 5af3a1a
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions buildarm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/bin/sh

export ARCH=arm
TARGET=$1

# Sets up toolchain environment variables for arm toolchain
# Tested against armv7-eabihf, glibc from toolchains.free-electrons.com

warn()
{
echo "$1" >&2
}

if [ ! -z $(which arm-linux-gcc) ];
then
export CC=$(which arm-linux-gcc)
else
warn "Not setting CC: can't locate arm-linux-gcc."
fi

if [ ! -z $(which arm-linux-ld) ];
then
export LD=$(which arm-linux-ld)
else
warn "Not setting LD: can't locate arm-linux-ld."
fi

if [ ! -z $(which arm-linux-ar) ];
then
export AR=$(which arm-linux-ar)
else
warn "Not setting AR: can't locate arm-linux-ar."
fi


if [ ! -z $(which arm-linux-strip) ];
then
export STRIP=$(which arm-linux-strip)
else
warn "Not setting STRIP: can't locate arm-linux-strip."
fi

if [ ! -z $(which arm-linux-nm) ];
then
export NM=$(which arm-linux-nm)
else
warn "Not setting NM: can't lcoate arm-linux-nm."
fi


make $TARGET || exit $?

0 comments on commit 5af3a1a

Please sign in to comment.