New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure: add support of qemu #12387
Comments
From @fperradCreated by @fperradmy goal is the cross-compiling of Perl with Buildroot, So, Configure needs a support of qemu (user mode). Find below 3 patches against blead From 42abf7caea008ee7dc8a876d88e3dd4d7de3cc16 Mon Sep 17 00:00:00 2001 $targetrun contains something like : qemu-arm, qemu-i386, qemu-ppc, qemu-x86_64 Inline Patchdiff --git a/Configure b/Configure
index a1ba981..c78cf77 100755
--- a/Configure
+++ b/Configure
@@ -2911,6 +2911,14 @@ fi
$targetrun -l $targetuser $targethost "cd \$cwd && ./\$exe \$@"
EOF
;;
+ qemu*)
+ to=:
+ from=:
+ cat >$run <<EOF
+#!/bin/sh
+$targetrun -L $qemulib "\$@"
+EOF
+ ;;
*) echo "Unknown targetrun '$targetrun'" >&4
exit 1
;;
--
From f686dacad60a327728141efa38dee1614a875368 Mon Sep 17 00:00:00 2001 $run must be used Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Inline Patchdiff --git a/Configure b/Configure
index c78cf77..6cc87af 100755
--- a/Configure
+++ b/Configure
@@ -5059,7 +5059,7 @@ checkccflag='check=$1; flag=$2; callback=$3;
echo " ";
echo "Checking if your compiler accepts $flag" 2>&1;
echo "int main(void) { return 0; }" > gcctest.c;
-if $cc -O2 $flag -o gcctest gcctest.c 2>gcctest.out && ./gcctest; then
+if $cc -O2 $flag -o gcctest gcctest.c 2>gcctest.out && $run ./gcctest; then
echo "Yes, it does." 2>&1;
if $test -s gcctest.out ; then
echo "But your platform does not like it:";
--
From fc0278276b992191dd4d81a55a64f5b3b6922812 Mon Sep 17 00:00:00 2001 targethost is mandatory with a ssh connection, but useless with qemu Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Inline Patchdiff --git a/Configure b/Configure
index 6cc87af..ff81233 100755
--- a/Configure
+++ b/Configure
@@ -2840,6 +2840,9 @@ $define|true|[yY]*)
;;
*) echo "Using usrinc $usrinc." >&4 ;;
esac
+ case "$targetrun" in
+ qemu*) targethost=dummy ;;
+ esac
case "$targethost" in
'') echo "Targethost not defined." >&4; croak=y ;;
*) echo "Using targethost $targethost." >&4
--
1.7.9.5 Perl Info
|
From @TuxOn Sat, 08 Sep 2012 23:51:50 -0700, Francois PERRAD (via RT)
I'd like to hear jess' comments on this
-- |
The RT System itself - Status changed from 'new' to 'open' |
From castaway@desert-island.me.ukHi, I assume from your patches that you're just running a local compile, rather On Sat Sep 08 23:51:49 2012, fperrad wrote:
Silly reply-whatsit only lists one patch. The only question I'd have is what is $qemulib? Can an existing variable be The rest seems quite sane to me. Jes |
From @fperradOn Fri Oct 19 04:52:03 2012, JROBINSON wrote:
Yes, I do real cross-compilation, not remote-compilation :)
My needs have changed a bit. My use cases are now : So, I refactor my 3 patches without $qemulib. See them in attachment. Fran�ois
|
From @fperrad0002-fix-when-cross-devel.patchFrom 3bf60a97774a5a7a456eec2fb7ab8034b7efa65b Mon Sep 17 00:00:00 2001
From: Francois Perrad <francois.perrad@gadz.org>
Date: Fri, 19 Oct 2012 18:46:23 +0200
Subject: [PATCH 2/3] fix when cross-devel
$run must be used
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
Configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Configure b/Configure
index 3c2f8c7..1b84736 100755
--- a/Configure
+++ b/Configure
@@ -5059,7 +5059,7 @@ checkccflag='check=$1; flag=$2; callback=$3;
echo " ";
echo "Checking if your compiler accepts $flag" 2>&1;
echo "int main(void) { return 0; }" > gcctest.c;
-if $cc -O2 $flag -o gcctest gcctest.c 2>gcctest.out && ./gcctest; then
+if $cc -O2 $flag -o gcctest gcctest.c 2>gcctest.out && $run ./gcctest; then
echo "Yes, it does." 2>&1;
if $test -s gcctest.out ; then
echo "But your platform does not like it:";
--
1.7.9.5
|
From @fperrad0001-add-qemu-support.patchFrom 2e7c8c54ac20ea8d5a2330102372d57bb78ed3b2 Mon Sep 17 00:00:00 2001
From: Francois Perrad <francois.perrad@gadz.org>
Date: Fri, 19 Oct 2012 18:45:49 +0200
Subject: [PATCH 1/3] add qemu support
$targetrun = "qemu-arm -L path/to/cross-libs"
or $targetrun = "/my/home/built/qemu-arm"
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
Configure | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/Configure b/Configure
index a1bc835..3c2f8c7 100755
--- a/Configure
+++ b/Configure
@@ -2871,7 +2871,7 @@ $define|true|[yY]*)
case "$targetfrom" in
'') targetfrom=scp ;;
esac
- run=$run-$targetrun
+ run=$run-`basename \`echo "$targetrun" | sed -e 's/^\([^ \t]*\).*$/\1/'\``
to=$to-$targetto
from=$from-$targetfrom
case "$targetdir" in
@@ -2911,6 +2911,14 @@ fi
$targetrun -l $targetuser $targethost "cd \$cwd && ./\$exe \$@"
EOF
;;
+ *qemu*)
+ to=:
+ from=:
+ cat >$run <<EOF
+#!/bin/sh
+$targetrun "\$@"
+EOF
+ ;;
*) echo "Unknown targetrun '$targetrun'" >&4
exit 1
;;
--
1.7.9.5
|
From @fperrad0003-add-a-targethost-default-when-qemu.patchFrom 18c13c8ed59d8884f6507dbe555832b008fea99f Mon Sep 17 00:00:00 2001
From: Francois Perrad <francois.perrad@gadz.org>
Date: Fri, 19 Oct 2012 18:46:49 +0200
Subject: [PATCH 3/3] add a targethost default when qemu
targethost is mandatory with a ssh connection, but useless with qemu
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
Configure | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Configure b/Configure
index 1b84736..fec6dd0 100755
--- a/Configure
+++ b/Configure
@@ -2840,6 +2840,9 @@ $define|true|[yY]*)
;;
*) echo "Using usrinc $usrinc." >&4 ;;
esac
+ case "$targetrun" in
+ *qemu*) targethost=dummy ;;
+ esac
case "$targethost" in
'') echo "Targethost not defined." >&4; croak=y ;;
*) echo "Using targethost $targethost." >&4
--
1.7.9.5
|
From castaway@desert-island.me.ukGah, perlbug didn't notify me on updates, I've now added myself to the I'm just looking at this part myself. I think what I'd like to do is: b) Allow you to just provide your own value of "run", or for a hints I'm not quite sure I understand what your patch for run=`basename ... ` On Fri Oct 19 11:51:31 2012, fperrad wrote:
|
From @HugmeirOn Sun, Sep 9, 2012 at 3:51 AM, Francois PERRAD
Jumpstarting this ticket. Francois recently chimed in on another thread & That being said, I had a couple of problems along the way. First, for me cat >$run <<EOF With $qemuoptions being something like "-r 3.11". Moving on, I too am unsure about the `basename ...` line. The intent seems For 'make test', I had to basically replace ./perl with a script that Unrelated to this patch but in a similar vein, yesterday I pushed a branch [0] |
From @fperrad2014-01-31 Brian Fraser <fraserbn@gmail.com>:
The use of Qemu has some limitations : For testing purpose, I copy the whole build tree on the target François
|
From @jkeenanOn Sat, 01 Feb 2014 13:51:09 GMT, fperrad wrote:
François, are you still attempting this work for Buildroot? Do you still need modifications to Perl 5's Configure? Thank you very much. -- |
From @fperrad
No. François |
From @jkeenanOn Fri, 29 Dec 2017 17:49:35 GMT, fperrad wrote:
Thanks for your quick response. Closing this ticket. -- |
@jkeenan - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#114798 (status was 'resolved')
Searchable as RT114798$
The text was updated successfully, but these errors were encountered: