-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhancement for Issue 3: Adding ARM build support (#4)
* Enhancement for Issue 3: Adding ARM build support authored-by: decidedlygray <[email protected]>
- Loading branch information
1 parent
266c8f9
commit 5af3a1a
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
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
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 $? |