Skip to content

Instantly share code, notes, and snippets.

@ljmccarthy
Created August 14, 2018 13:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ljmccarthy/8520690c171b2b538c8409ca7c37f14b to your computer and use it in GitHub Desktop.
Save ljmccarthy/8520690c171b2b538c8409ca7c37f14b to your computer and use it in GitHub Desktop.
Cross-compile musl libc for ARM Cortex A8
#!/bin/sh
export PM=$(grep -c processor /proc/cpuinfo)
# TODO compile LLVM compiler_rt for target
./configure \
--prefix=/ \
--target=armv7a-unknown-linux-eabi \
CC=clang \
CFLAGS="--target=armv7a-unknown-linux-eabi -mcpu=cortex-a8 -mfloat-abi=hard -mfpu=neon" \
LDFLAGS="-fuse-ld=lld" \
LIBCC="-lcompiler_rt" && \
make AR=llvm-ar RANLIB=llvm-ranlib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment