Federated blogging application, thanks to ActivityPub https://joinplu.me
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

50 lines
1.5 KiB

  1. #!/bin/bash
  2. ARCH=$(python <<EOF
  3. from __future__ import print_function
  4. import platform
  5. processor = platform.machine()
  6. architecture = platform.architecture()
  7. if processor == 'aarch64':
  8. # Mutli arch arm support is why this 32bit check is present
  9. if '32bit' in architecture:
  10. print('armv71', end='')
  11. else:
  12. print('aarch64', end='')
  13. elif processor == 'x86 64' or processor == 'x86_64':
  14. print('amd64', end='')
  15. elif processor == 'armv7l':
  16. print('armhf', end='')
  17. EOF
  18. )
  19. echo "Detected arch: $ARCH"
  20. if [ $ARCH == "aarch64" -o $ARCH == "armv71" ] ; then
  21. apt-get install -y --no-install-recommends build-essential subversion ninja-build cmake
  22. mkdir -p /scratch/src
  23. cd /scratch/src
  24. svn co http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_900/final/ llvm
  25. cd /scratch/src/llvm/tools
  26. svn co http://llvm.org/svn/llvm-project/lld/tags/RELEASE_900/final/ lld
  27. mkdir -p /scratch/build/arm
  28. cd /scratch/build/arm
  29. if [ "$ARCH" == "aarch64" ] ; then
  30. cmake -G Ninja /scratch/src/llvm \
  31. -DCMAKE_BUILD_TYPE=Release \
  32. -DCMAKE_INSTALL_PREFIX=/opt/local/llvm \
  33. -DLLVM_TARGETS_TO_BUILD="AArch64" \
  34. -DLLVM_TARGET_ARCH="AArch64"
  35. else
  36. cmake -G Ninja /scratch/src/llvm \
  37. -DCMAKE_BUILD_TYPE=Release \
  38. -DCMAKE_INSTALL_PREFIX=/opt/local/llvm \
  39. -DLLVM_TARGETS_TO_BUILD="ARM" \
  40. -DLLVM_TARGET_ARCH="ARM"
  41. fi
  42. ninja lld
  43. ninja install-lld
  44. cd ~
  45. rm -rf /scratch
  46. fi