default_configure.sh 558 B

12345678910111213141516171819
  1. mkdir -p build
  2. mkdir -p install
  3. if [ -z "$ARCH" ] || [ "$ARCH" != "x86_64" ] && [ "$ARCH" != "riscv64" ] && [ "$ARCH" != "aarch64" ]; then
  4. echo "No ARCH specified, use x86_64 as default"
  5. export ARCH="x86_64"
  6. fi
  7. if [ "$ARCH" == "x86_64" ] || [ "$ARCH" == "riscv64" ] || [ "$ARCH" == "aarch64" ]; then
  8. export TRIPLET=${ARCH}-linux-gnu
  9. fi
  10. export BUILD=`uname -m`
  11. cd build
  12. ../configure \
  13. --prefix=/ \
  14. --host=${TRIPLET} \
  15. --build=${BUILD}-linux-gnu \
  16. CC="${TRIPLET}-gcc -m64" \
  17. CXX="${TRIPLET}-g++ -m64" \
  18. CFLAGS="-O2" \
  19. CXXFLAGS="-O2"