build.sh 923 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/bash
  2. set -ex
  3. # debugging ...
  4. if [ -z "${RECIPE_DIR}" ]; then
  5. RECIPE_DIR=$PWD
  6. fi
  7. if [[ ${target_platform} =~ osx-.* ]]; then
  8. if [[ ! -f ${BUILD_PREFIX}/bin/llvm-objcopy ]]; then
  9. echo "no llvm-objcopy"
  10. exit 1
  11. fi
  12. ln -s ${BUILD_PREFIX}/bin/llvm-objcopy ${BUILD_PREFIX}/bin/x86_64-apple-darwin19.6.0-objcopy
  13. chmod +x ${BUILD_PREFIX}/bin/x86_64-apple-darwin19.6.0-objcopy
  14. ln -s ${BUILD_PREFIX}/bin/llvm-objcopy ${BUILD_PREFIX}/bin/objcopy
  15. chmod +x ${BUILD_PREFIX}/bin/objcopy
  16. unset CC CXX
  17. fi
  18. if [[ $(uname) == Linux ]]; then
  19. ulimit -s 32768 || true
  20. fi
  21. if [[ "${bootstrapping}" != "yes" ]]; then
  22. # Use own compilers instead of relying on ones from the docker image/system
  23. conda create -p $SRC_DIR/compilers gcc_${target_platform} gxx_${target_platform} binutils \
  24. make gawk sed libtool --yes --quiet
  25. fi
  26. ${RECIPE_DIR}/build_scripts/build.sh
  27. exit 0