gen-implib.sh 441 B

123456789101112131415161718
  1. #!/bin/bash
  2. set -e
  3. if [[ $# != 2 ]]; then
  4. echo "Invalid arguments"
  5. exit 1
  6. fi
  7. IN="$1"
  8. OUT="$2"
  9. TMPDIR="$(mktemp -d)"
  10. trap "rm -rf '$TMPDIR'" EXIT
  11. cd "$TMPDIR"
  12. set -x
  13. python3 /opt/implib/implib-gen.py --target aarch64-linux-gnu --dlopen --lazy-load --verbose "$IN"
  14. ${FFBUILD_CROSS_PREFIX}gcc $CFLAGS $STAGE_CFLAGS -Wa,--noexecstack -DIMPLIB_HIDDEN_SHIMS -c *.tramp.S *.init.c
  15. ${FFBUILD_CROSS_PREFIX}ar -rcs "$OUT" *.tramp.o *.init.o