g-ir-scanner-qemuwrapper.in 778 B

1234567891011121314151617
  1. #!/usr/bin/env bash
  2. # Pass -r to qemu-user as to trick glibc into not errorings out if the host kernel
  3. # is older than the target kernel.
  4. # Use a modules directory which does not exist so we don't load random things
  5. # which may then get deleted (or their dependencies) and potentially segfault
  6. GIO_MODULE_DIR=$(dirname $0)/../lib/gio/modules-dummy \
  7. @QEMU_USER@ -r @TOOLCHAIN_HEADERS_VERSION@ \
  8. -L $(dirname $0)/../../ \
  9. -E LD_LIBRARY_PATH=${GIR_EXTRA_LIBS_PATH}:.libs:$(dirname $0)/../lib:$(dirname $0)/../../lib \
  10. "$@"
  11. if [[ $? -ne 0 ]]; then
  12. echo "If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the .mk file should help."
  13. echo 'Typically like this: PKG_MAKE_ENV += GIR_EXTRA_LIBS_PATH="$(@D)/.libs"'
  14. exit 1
  15. fi