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