Patchwork [2/3] cpanminus: works with arm & mips

login
register
mail settings
Submitter Francois Perrad
Date March 2, 2013, 10:38 a.m.
Message ID <1362220740-17593-2-git-send-email-francois.perrad@gadz.org>
Download mbox | patch
Permalink /patch/224479/
State New
Headers show

Comments

Francois Perrad - March 2, 2013, 10:38 a.m.
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/cpanminus/Config.in    |   15 +++++++++++----
 package/cpanminus/cpanminus.mk |    2 +-
 2 files changed, 12 insertions(+), 5 deletions(-)
Thomas Petazzoni - March 2, 2013, 1:50 p.m.
Dear Francois Perrad,

On Sat,  2 Mar 2013 11:38:59 +0100, Francois Perrad wrote:
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
>  package/cpanminus/Config.in    |   15 +++++++++++----
>  package/cpanminus/cpanminus.mk |    2 +-
>  2 files changed, 12 insertions(+), 5 deletions(-)
> 
> diff --git a/package/cpanminus/Config.in b/package/cpanminus/Config.in
> index b10d211..cf93a7e 100644
> --- a/package/cpanminus/Config.in
> +++ b/package/cpanminus/Config.in
> @@ -1,9 +1,16 @@
>  config BR2_PACKAGE_CPANMINUS
>  	bool "cpanminus"
> -	# Requires host-qemu, which cannot work properly due to kernel
> -	# headers mismatch between the build environment and the
> -	# target.
> -	depends on BR2_BROKEN

Sorry, but I don't see where the problem mentioned in the comment here
has been solved. Anything using host-qemu to help in cross-compilation
cannot work: it is very likely that the kernel headers used to build
the target toolchain are much more recent than the kernel running on
the build machine. Since the Qemu user-mode emulation works by
converting the target syscall into host syscall, it cannot work when
kernel headers are more recent than the kernel version running on the
build machine.

I don't see how this can be solved, it is a fundamental problem in the
approach.

Thomas

Patch

diff --git a/package/cpanminus/Config.in b/package/cpanminus/Config.in
index b10d211..cf93a7e 100644
--- a/package/cpanminus/Config.in
+++ b/package/cpanminus/Config.in
@@ -1,9 +1,16 @@ 
 config BR2_PACKAGE_CPANMINUS
 	bool "cpanminus"
-	# Requires host-qemu, which cannot work properly due to kernel
-	# headers mismatch between the build environment and the
-	# target.
-	depends on BR2_BROKEN
+	# host-qemu doesn't work for the following platforms
+	depends on !BR2_avr32
+	depends on !BR2_bfin
+	depends on !BR2_sh2
+	depends on !BR2_sh2a
+	depends on !BR2_sh3
+	depends on !BR2_sh3eb
+	depends on !BR2_sh64
+	# host-qemu doesn't support system() on the following platforms
+	depends on !BR2_i386
+	depends on !BR2_x86_64
 	help
 	  cpanminus is a script to get, unpack, build and install Perl modules
 	  from CPAN.
diff --git a/package/cpanminus/cpanminus.mk b/package/cpanminus/cpanminus.mk
index e7e3f29..f815199 100644
--- a/package/cpanminus/cpanminus.mk
+++ b/package/cpanminus/cpanminus.mk
@@ -36,7 +36,7 @@  define CPANMINUS_INSTALL_TARGET_CMDS
 		--no-man-pages \
 		$(CPANMINUS_MIRROR) \
 		$(call qstrip,$(BR2_PACKAGE_CPANMINUS_MODULES))
-	-find $(CPANMINUS_PERL_SITEARCH) -type f -name *.bs -exec rm -f {} \;
+	-find $(CPANMINUS_PERL_SITELIB) -type f -name *.bs -exec rm -f {} \;
 endef
 else
 define CPANMINUS_INSTALL_TARGET_CMDS