perl-configure-qemu.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. Add qemu support
  2. see https://rt.perl.org/rt3//Public/Bug/Display.html?id=114798
  3. Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
  4. Index: b/Configure
  5. ===================================================================
  6. --- a/Configure
  7. +++ b/Configure
  8. @@ -2837,6 +2837,9 @@
  9. ;;
  10. *) echo "Using usrinc $usrinc." >&4 ;;
  11. esac
  12. + case "$targetrun" in
  13. + *qemu*) targethost=dummy ;;
  14. + esac
  15. case "$targethost" in
  16. '') echo "Targethost not defined." >&4; croak=y ;;
  17. *) echo "Using targethost $targethost." >&4
  18. @@ -2868,7 +2871,7 @@
  19. case "$targetfrom" in
  20. '') targetfrom=scp ;;
  21. esac
  22. - run=$run-$targetrun
  23. + run=$run-`basename $targetrun`
  24. to=$to-$targetto
  25. from=$from-$targetfrom
  26. case "$targetdir" in
  27. @@ -2908,6 +2911,14 @@
  28. $targetrun -l $targetuser $targethost "cd \$cwd && ./\$exe \$@"
  29. EOF
  30. ;;
  31. + *qemu*)
  32. + to=:
  33. + from=:
  34. + cat >$run <<EOF
  35. +#!/bin/sh
  36. +$targetrun -L $qemulib "\$@"
  37. +EOF
  38. + ;;
  39. *) echo "Unknown targetrun '$targetrun'" >&4
  40. exit 1
  41. ;;
  42. @@ -5048,7 +5059,7 @@
  43. echo " ";
  44. echo "Checking if your compiler accepts $flag" 2>&1;
  45. echo "int main(void) { return 0; }" > gcctest.c;
  46. -if $cc -O2 $flag -o gcctest gcctest.c 2>gcctest.out && ./gcctest; then
  47. +if $cc -O2 $flag -o gcctest gcctest.c 2>gcctest.out && $run ./gcctest; then
  48. echo "Yes, it does." 2>&1;
  49. if $test -s gcctest.out ; then
  50. echo "But your platform does not like it:";