2
1

g-ir-scanner-qemuwrapper.in 950 B

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