loader-cross.sh.in 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/bash
  2. #
  3. # StarPU --- Runtime system for heterogeneous multicore architectures.
  4. #
  5. # Copyright (C) 2013, 2015 Universite de Bordeaux
  6. # Copyright (C) 2015 CNRS
  7. #
  8. # StarPU is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU Lesser General Public License as published by
  10. # the Free Software Foundation; either version 2.1 of the License, or (at
  11. # your option) any later version.
  12. #
  13. # StarPU is distributed in the hope that it will be useful, but
  14. # WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  16. #
  17. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  18. top_srcdir="@top_srcdir@"
  19. export top_builddir="@top_builddir@"
  20. exec="$1"
  21. shift
  22. if test -z "$exec"
  23. then
  24. echo "[Error] Syntax: $0 <mic_executable> <args>"
  25. exit 1
  26. fi
  27. NATIVE=${PWD/\/build_mic\//\/build_host\/}
  28. DIR="$(dirname "$exec")"
  29. FILE="$(basename "$exec")"
  30. export SINK_LD_LIBRARY_PATH="$top_builddir/src/.libs:$SINK_LD_LIBRARY_PATH"
  31. export STARPU_MIC_SINK_PROGRAM_NAME="$exec"
  32. # in case libtool got into play
  33. [ -x "$DIR/.libs/$FILE" ] && STARPU_MIC_SINK_PROGRAM_NAME="$DIR/.libs/$FILE"
  34. $top_builddir/../build_host/tests/loader "$NATIVE/$exec" "$@"