* [Buildroot] Autotest infrastructure (a bit of off-topic: git repo URL)
From: Peter Korsgaard @ 2012-11-09 12:13 UTC (permalink / raw)
To: buildroot
In-Reply-To: <20121109114750.6a4dc53a@skate>
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Hi,
Thomas> On a related topic (firmware upgrade), I have:
Thomas> https://gitorious.org/embedded-linux-firmware-upgrade-tool/embedded-linux-firmware-upgrade-tool
Thomas> It has a:
Thomas> * A host utility to prepare firmware images composed of multiple parts
Thomas> (usually a kernel image + root filesystem image, but there could be
Thomas> more)
Thomas> * A target utility that can run either on the command line or as a CGI
Thomas> script. This utility does the firmware upgrade itself by fiddling
Thomas> with the U-Boot environment.
Thomas> The tool assumes that the flash has two partitions for each component
Thomas> been upgraded (one active partition, one to upgrade).
Thomas> The documentation at
Thomas> https://gitorious.org/embedded-linux-firmware-upgrade-tool/embedded-linux-firmware-upgrade-tool/blobs/master/fwupgrade-doc.txt
Thomas> has a few details.
This is getting pretty offtopic, but from a quick look at it, it seems
nice, but:
- hardcoded for nand (E.G. uses nandwrite)
- non-atomic (E.G. uboot environment is handled per-part, so you can end
up with a halfway upgraded system if something goes wrong)
- fairly inflexible (hardcoded upgrade procedure, hw id handling, cgi)
I've solved it in the past by wrapping firmware upgrades in .deb files,
and used the depends on / conflicts stuff for hw id/version handling,
and the pre/post scripts to define the upgrade handling in the upgrade
itself. To ensure an atomic change between current and upgraded system I
key off the choice of kernel/rootfs from a single u-boot variable
(typically called boot=high|low) which is only changed at the very end.
Maybe we should do some more firmware upgrade talks at an upcoming
conference ;)
--
Bye, Peter Korsgaard
^ permalink raw reply
* [Buildroot] [PATCH] gnutls-2.12.20-glibc-2.16.patch glibc-2.16 and gnutls2 fix
From: Alexander Khryukin @ 2012-11-09 12:10 UTC (permalink / raw)
To: buildroot
---
package/gnutls/gnutls-2.12.20-glibc-2.16.patch | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 package/gnutls/gnutls-2.12.20-glibc-2.16.patch
diff --git a/package/gnutls/gnutls-2.12.20-glibc-2.16.patch b/package/gnutls/gnutls-2.12.20-glibc-2.16.patch
new file mode 100644
index 0000000..eaa050e
--- /dev/null
+++ b/package/gnutls/gnutls-2.12.20-glibc-2.16.patch
@@ -0,0 +1,26 @@
+-2.12.20/gl/stdio.in.h
++++ gnutls-2.12.20/gl/stdio.in.h
+@@ -714,8 +714,10 @@
+ /* It is very rare that the developer ever has full control of stdin,
+ so any use of gets warrants an unconditional warning. Assume it is
+ always declared, since it is required by C89. */
++#ifdef HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+ #endif
++#endif
+
+
+ #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
+--- gnutls-2.12.20/lib/gl/stdio.in.h
++++ gnutls-2.12.20/lib/gl/stdio.in.h
+@@ -714,8 +714,10 @@
+ /* It is very rare that the developer ever has full control of stdin,
+ so any use of gets warrants an unconditional warning. Assume it is
+ always declared, since it is required by C89. */
++#ifdef HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+ #endif
++#endif
+
+
+ #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
--
1.7.11.3
^ permalink raw reply related
* [Buildroot] [PATCH] autoconf: add license information
From: spdawson at gmail.com @ 2012-11-09 11:36 UTC (permalink / raw)
To: buildroot
From: Simon Dawson <spdawson@gmail.com>
Signed-off-by: Simon Dawson <spdawson@gmail.com>
---
package/autoconf/autoconf.mk | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/autoconf/autoconf.mk b/package/autoconf/autoconf.mk
index 0cb50db..9530ee6 100644
--- a/package/autoconf/autoconf.mk
+++ b/package/autoconf/autoconf.mk
@@ -6,6 +6,8 @@
AUTOCONF_VERSION = 2.68
AUTOCONF_SITE = $(BR2_GNU_MIRROR)/autoconf
+AUTOCONF_LICENSE = GPLv3+ with exceptions
+AUTOCONF_LICENSE_FILES = COPYINGv3 COPYING.EXCEPTION
AUTOCONF_CONF_ENV = EMACS="no" ac_cv_path_M4=$(HOST_DIR)/usr/bin/m4 \
ac_cv_prog_gnu_m4_gnu=no
--
1.7.10.4
^ permalink raw reply related
* [Buildroot] [PATCH] beecrypt: add license information
From: spdawson at gmail.com @ 2012-11-09 11:24 UTC (permalink / raw)
To: buildroot
From: Simon Dawson <spdawson@gmail.com>
Signed-off-by: Simon Dawson <spdawson@gmail.com>
---
package/beecrypt/beecrypt.mk | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/beecrypt/beecrypt.mk b/package/beecrypt/beecrypt.mk
index d165aee..a9cf133 100644
--- a/package/beecrypt/beecrypt.mk
+++ b/package/beecrypt/beecrypt.mk
@@ -7,6 +7,8 @@ BEECRYPT_VERSION = 4.2.1
BEECRYPT_SITE = http://downloads.sourceforge.net/project/beecrypt/beecrypt/$(BEECRYPT_VERSION)
BEECRYPT_AUTORECONF = YES
BEECRYPT_INSTALL_STAGING = YES
+BEECRYPT_LICENSE = LGPLv2.1+
+BEECRYPT_LICENSE_FILES = COPYING.LIB
# beecrypt contains C++ code that g++ 4.7 doesn't really
# like. Upstream does not seem to be really active, so workaround this
--
1.7.10.4
^ permalink raw reply related
* [Buildroot] [PATCH] argus: add license information
From: spdawson at gmail.com @ 2012-11-09 11:18 UTC (permalink / raw)
To: buildroot
From: Simon Dawson <spdawson@gmail.com>
Signed-off-by: Simon Dawson <spdawson@gmail.com>
---
package/argus/argus.mk | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/argus/argus.mk b/package/argus/argus.mk
index da7ecac..a4b5330 100644
--- a/package/argus/argus.mk
+++ b/package/argus/argus.mk
@@ -8,6 +8,8 @@ ARGUS_SOURCE:=argus_$(ARGUS_VERSION).orig.tar.gz
ARGUS_PATCH:=argus_$(ARGUS_VERSION)-1.diff.gz
ARGUS_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/a/argus/
ARGUS_DEPENDENCIES=libpcap
+ARGUS_LICENSE = GPLv2+
+ARGUS_LICENSE_FILES = COPYING
define ARGUS_DEBIAN_PATCH_APPLY
if [ -d $(@D)/debian/patches ]; then \
--
1.7.10.4
^ permalink raw reply related
* [Buildroot] [PATCH] acpid: add license information
From: spdawson at gmail.com @ 2012-11-09 11:13 UTC (permalink / raw)
To: buildroot
From: Simon Dawson <spdawson@gmail.com>
Signed-off-by: Simon Dawson <spdawson@gmail.com>
---
package/acpid/acpid.mk | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/acpid/acpid.mk b/package/acpid/acpid.mk
index 56f671d..b024e94 100644
--- a/package/acpid/acpid.mk
+++ b/package/acpid/acpid.mk
@@ -6,6 +6,8 @@
ACPID_VERSION = 2.0.11
ACPID_SOURCE = acpid_$(ACPID_VERSION).orig.tar.gz
ACPID_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/a/acpid
+ACPID_LICENSE = GPLv2
+ACPID_LICENSE_FILES = COPYING
define ACPID_BUILD_CMDS
$(MAKE) CC="$(TARGET_CC)" -C $(@D)
--
1.7.10.4
^ permalink raw reply related
* [Buildroot] [PATCH 2/2] neardal: new package
From: spdawson at gmail.com @ 2012-11-09 11:05 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1352459105-13590-1-git-send-email-spdawson@gmail.com>
From: Simon Dawson <spdawson@gmail.com>
Signed-off-by: Simon Dawson <spdawson@gmail.com>
---
package/Config.in | 1 +
package/neardal/Config.in | 11 +++++++++++
package/neardal/neardal.mk | 16 ++++++++++++++++
3 files changed, 28 insertions(+)
create mode 100644 package/neardal/Config.in
create mode 100644 package/neardal/neardal.mk
diff --git a/package/Config.in b/package/Config.in
index ffc08ab..965830d 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -418,6 +418,7 @@ source "package/libusb/Config.in"
source "package/libusb-compat/Config.in"
source "package/libv4l/Config.in"
source "package/mtdev/Config.in"
+source "package/neardal/Config.in"
source "package/pcsc-lite/Config.in"
endmenu
diff --git a/package/neardal/Config.in b/package/neardal/Config.in
new file mode 100644
index 0000000..258a223
--- /dev/null
+++ b/package/neardal/Config.in
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_NEARDAL
+ bool "neardal"
+ depends on BR2_PACKAGE_NEARD
+ select BR2_PACKAGE_DBUS_GLIB
+ help
+ Provides a simple C API to exchange data with the neard NFC manager daemon.
+
+ https://github.com/connectivity/neardal
+
+comment "neardal requires neard"
+ depends on !BR2_PACKAGE_NEARD
diff --git a/package/neardal/neardal.mk b/package/neardal/neardal.mk
new file mode 100644
index 0000000..3479afd
--- /dev/null
+++ b/package/neardal/neardal.mk
@@ -0,0 +1,16 @@
+#############################################################
+#
+# neardal
+#
+#############################################################
+NEARDAL_VERSION = 0.7
+NEARDAL_SITE = http://github.com/connectivity/neardal/tarball/$(NEARDAL_VERSION)
+NEARDAL_SOURCE = connectivity-neardal-$(NEARDAL_VERSION).tar.gz
+NEARDAL_INSTALL_STAGING = YES
+NEARDAL_LICENSE = GPLv2
+NEARDAL_LICENSE_FILES = COPYING
+
+NEARDAL_DEPENDENCIES = neard dbus-glib
+NEARDAL_AUTORECONF = YES
+
+$(eval $(autotools-package))
--
1.7.10.4
^ permalink raw reply related
* [Buildroot] [PATCH 1/2] neard: new package
From: spdawson at gmail.com @ 2012-11-09 11:05 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1352459105-13590-1-git-send-email-spdawson@gmail.com>
From: Simon Dawson <spdawson@gmail.com>
Signed-off-by: Simon Dawson <spdawson@gmail.com>
---
package/Config.in | 1 +
package/neard/Config.in | 15 +++++++++++++++
package/neard/neard.mk | 16 ++++++++++++++++
3 files changed, 32 insertions(+)
create mode 100644 package/neard/Config.in
create mode 100644 package/neard/neard.mk
diff --git a/package/Config.in b/package/Config.in
index 2ab6b6e..ffc08ab 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -236,6 +236,7 @@ source "package/mdadm/Config.in"
source "package/memtester/Config.in"
source "package/minicom/Config.in"
source "package/nanocom/Config.in"
+source "package/neard/Config.in"
source "package/ofono/Config.in"
source "package/open2300/Config.in"
source "package/openocd/Config.in"
diff --git a/package/neard/Config.in b/package/neard/Config.in
new file mode 100644
index 0000000..f973fdd
--- /dev/null
+++ b/package/neard/Config.in
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_NEARD
+ bool "neard"
+ depends on BR2_LINUX_KERNEL
+ select BR2_PACKAGE_DBUS
+ select BR2_PACKAGE_LIBGLIB2
+ select BR2_PACKAGE_LIBNL
+ help
+ Near Field Communication (NFC) manager
+
+ http://git.kernel.org/?p=network/nfc/neard.git;a=summary
+
+ https://01.org/linux-nfc/documentation/how-start-linux-nfc-code...
+
+comment "neard requires a Linux kernel"
+ depends on !BR2_LINUX_KERNEL
diff --git a/package/neard/neard.mk b/package/neard/neard.mk
new file mode 100644
index 0000000..3d73932
--- /dev/null
+++ b/package/neard/neard.mk
@@ -0,0 +1,16 @@
+#############################################################
+#
+# neard
+#
+#############################################################
+NEARD_VERSION = 0.7
+NEARD_SITE = $(BR2_KERNEL_MIRROR)/linux/network/nfc
+NEARD_INSTALL_STAGING = YES
+NEARD_LICENSE = GPLv2
+NEARD_LICENSE_FILES = COPYING
+
+NEARD_DEPENDENCIES = linux dbus libglib2 libnl
+NEARD_AUTORECONF = YES
+NEARD_CONF_OPT = --disable-traces
+
+$(eval $(autotools-package))
--
1.7.10.4
^ permalink raw reply related
* [Buildroot] [PATCH 0/2] Add neard and neardal packages
From: spdawson at gmail.com @ 2012-11-09 11:05 UTC (permalink / raw)
To: buildroot
From: Simon Dawson <spdawson@gmail.com>
This patch set adds the neard and neardal packages for linux-nfc support.
Simon Dawson (2):
neard: new package
neardal: new package
package/Config.in | 2 ++
package/neard/Config.in | 15 +++++++++++++++
package/neard/neard.mk | 16 ++++++++++++++++
package/neardal/Config.in | 11 +++++++++++
package/neardal/neardal.mk | 16 ++++++++++++++++
5 files changed, 60 insertions(+)
create mode 100644 package/neard/Config.in
create mode 100644 package/neard/neard.mk
create mode 100644 package/neardal/Config.in
create mode 100644 package/neardal/neardal.mk
--
1.7.10.4
^ permalink raw reply
* [Buildroot] Autotest infrastructure (a bit of off-topic: git repo URL)
From: Thomas Petazzoni @ 2012-11-09 10:47 UTC (permalink / raw)
To: buildroot
In-Reply-To: <509C224B.8000405@mind.be>
Hello,
On Thu, 08 Nov 2012 22:21:15 +0100, Arnout Vandecappelle wrote:
> Pretty off-topic indeed... but I don't mind :-)
>
> On 11/08/12 17:21, Javier Viguera wrote:
> > I attended the other day to your talk on "upgrading without bricking" (congrats for that, i learned a lot) and you
> > mentioned a repo where you have started collecting some tools/scripts to do the job.
> >
> > Could you remind me that repo URL? I shouldn't have trust i would remember it some days after.
>
> https://gitorious.org/gupies
>
> But as I mentioned, it's still pretty empty... I expect to really start
> committing something in a week or two.
>
> I've also created a mailing list, but it's on google groups which sucks
> somewhat: https://groups.google.com/group/gupies/subscribe
> If you have a better idea, I'd welcome that.
On a related topic (firmware upgrade), I have:
https://gitorious.org/embedded-linux-firmware-upgrade-tool/embedded-linux-firmware-upgrade-tool
It has a:
* A host utility to prepare firmware images composed of multiple parts
(usually a kernel image + root filesystem image, but there could be
more)
* A target utility that can run either on the command line or as a CGI
script. This utility does the firmware upgrade itself by fiddling
with the U-Boot environment.
The tool assumes that the flash has two partitions for each component
been upgraded (one active partition, one to upgrade).
The documentation at
https://gitorious.org/embedded-linux-firmware-upgrade-tool/embedded-linux-firmware-upgrade-tool/blobs/master/fwupgrade-doc.txt
has a few details.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply
* [Buildroot] [PATCH] perl: build with perlcross instead of qemu
From: Arnout Vandecappelle @ 2012-11-09 10:36 UTC (permalink / raw)
To: buildroot
In-Reply-To: <20121109113112.1a7606ff@skate>
On 11/09/12 11:31, Thomas Petazzoni wrote:
> This patch unfortunately breaks the build of cpanminus, which
> apparently still requires qemu:
Of course, I didn't think of that... The solution is to install miniperl and
its wrapper in the host directory.
I'll try to take a look at it later.
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286540
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply
* [Buildroot] [PATCH] perl: build with perlcross instead of qemu
From: Thomas Petazzoni @ 2012-11-09 10:31 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1352425626-10628-1-git-send-email-arnout@mind.be>
Arnout,
On Fri, 9 Nov 2012 02:47:05 +0100, Arnout Vandecappelle
(Essensium/Mind) wrote:
> This is still a bit RFC. I've tested in on a glibc x86_64, on a
> minimal internal powerpc and a glibc ARM. I haven't tested with any
> of the autobuilder configurations, but I expect it will at least be
> better than what we get now...
>
> Francois, can you check if it also runs? I've only done build tests.
>
> Peter, if Francois confirms that the perl binary actually runs and if
> he has no other concerns, then I'd commit this patch quickly and wait
> for the autobuilder fallout.
This patch unfortunately breaks the build of cpanminus, which
apparently still requires qemu:
>>> cpanminus 1.5018 Configuring
>>> cpanminus 1.5018 Building
/bin/bash: /home/thomas/projets/buildroot/output/host/usr/bin/qemu-arm: Aucun fichier ou dossier de ce type
/bin/bash: /home/thomas/projets/buildroot/output/host/usr/bin/qemu-arm: Aucun fichier ou dossier de ce type
/bin/bash: /home/thomas/projets/buildroot/output/host/usr/bin/qemu-arm: Aucun fichier ou dossier de ce type
/bin/bash: /home/thomas/projets/buildroot/output/host/usr/bin/qemu-arm: Aucun fichier ou dossier de ce type
/bin/bash: /home/thomas/projets/buildroot/output/host/usr/bin/qemu-arm: Aucun fichier ou dossier de ce type
/bin/bash: /home/thomas/projets/buildroot/output/host/usr/bin/qemu-arm: Aucun fichier ou dossier de ce type
>>> cpanminus 1.5018 Installing to target
echo "#!/bin/sh" > /home/thomas/projets/buildroot/output/build/cpanminus-1.5018/run_perl
echo "PERL5LIB=/home/thomas/projets/buildroot/output/target/usr/lib/perl5/site_perl/5.16.1/:/home/thomas/projets/buildroot/output/target/usr/lib/perl5/site_perl/5.16.1:/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib/perl5/5.16.1/:/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib/perl5/5.16.1 /home/thomas/projets/buildroot/output/host/usr/bin/qemu-arm /home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/bin/perl \"\$@\"" >>/home/thomas/projets/buildroot/output/build/cpanminus-1.5018/run_perl
chmod +x /home/thomas/projets/buildroot/output/build/cpanminus-1.5018/run_perl
PERL5LIB=/home/thomas/projets/buildroot/output/target/usr/lib/perl5/site_perl/5.16.1/:/home/thomas/projets/buildroot/output/target/usr/lib/perl5/site_perl/5.16.1:/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib/perl5/5.16.1/:/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib/perl5/5.16.1 PERL_MM_OPT="DESTDIR=/home/thomas/projets/buildroot/output/target PERL=/home/thomas/projets/buildroot/output/build/cpanminus-1.5018/run_perl PERL_LIB=/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib/perl5/5.16.1 PERL_ARCHLIB=/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib/perl5/5.16.1/" PERL_MB_OPT="--destdir /home/thomas/projets/buildroot/output/target" RUN_PERL="/home/thomas/projets/buildroot/output/build/cpanminus-1.5018/run_perl" /home/thomas/projets/buildroot/output/host/usr/bin/qemu-arm /home/thomas/projets/buildroot/outpu
t/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/bin/perl /home/thomas/projets/buildroot/output/build/cpanminus-1.5018/cpanm --perl=/home/thomas/projets/buildroot/output/build/cpanminus-1.5018/run_perl --notest --no-man-pages Curses::UI
/bin/bash: /home/thomas/projets/buildroot/output/host/usr/bin/qemu-arm: Aucun fichier ou dossier de ce type
make: *** [/home/thomas/projets/buildroot/output/build/cpanminus-1.5018/.stamp_target_installed] Erreur 127
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply
* [Buildroot] [PATCH] perl: fix build
From: Thomas Petazzoni @ 2012-11-09 10:10 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1352455441-4836-1-git-send-email-francois.perrad@gadz.org>
Dear Francois Perrad,
On Fri, 9 Nov 2012 11:04:01 +0100, Francois Perrad wrote:
> qemu-i386 & qemu-x86_64 cannot run properly miniperl with system(),
> see https://bugs.launchpad.net/qemu/+bug/1076445
>
> replace qemu/miniperl by host-perl.
>
> qemu is still used during the configure step (and cpanminus).
>
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
This cannot apply: Arnout's patch that removes the dependency on qemu
has been applied.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply
* [Buildroot] [PATCH] perl: fix build
From: Francois Perrad @ 2012-11-09 10:04 UTC (permalink / raw)
To: buildroot
qemu-i386 & qemu-x86_64 cannot run properly miniperl with system(),
see https://bugs.launchpad.net/qemu/+bug/1076445
replace qemu/miniperl by host-perl.
qemu is still used during the configure step (and cpanminus).
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
package/cpanminus/Config.in | 1 +
package/perl/perl-add-patch-Makefile-SH.patch | 82 +++++++++++++++++++++
package/perl/perl-configure-qemu.patch | 4 +-
package/perl/perl-fix-Module-Build.patch | 16 ----
package/perl/perl-fix-installperl.patch | 25 +++++++
package/perl/perl-mkppport.patch | 37 ----------
package/perl/perl-run-perl-lib.patch | 98 +++++++++++++++++++++++++
package/perl/perl.mk | 50 ++++++++++---
8 files changed, 249 insertions(+), 64 deletions(-)
create mode 100644 package/perl/perl-add-patch-Makefile-SH.patch
delete mode 100644 package/perl/perl-fix-Module-Build.patch
create mode 100644 package/perl/perl-fix-installperl.patch
delete mode 100644 package/perl/perl-mkppport.patch
create mode 100644 package/perl/perl-run-perl-lib.patch
diff --git a/package/cpanminus/Config.in b/package/cpanminus/Config.in
index b8b39dc..e8c1aad 100644
--- a/package/cpanminus/Config.in
+++ b/package/cpanminus/Config.in
@@ -1,5 +1,6 @@
config BR2_PACKAGE_CPANMINUS
bool "cpanminus"
+ depends on !BR2_i386 && !BR2_x86_64
help
cpanminus is a script to get, unpack, build and install Perl modules
from CPAN.
diff --git a/package/perl/perl-add-patch-Makefile-SH.patch b/package/perl/perl-add-patch-Makefile-SH.patch
new file mode 100644
index 0000000..ba49be7
--- /dev/null
+++ b/package/perl/perl-add-patch-Makefile-SH.patch
@@ -0,0 +1,82 @@
+add a patch which must applied only for perl (not for host-perl)
+
+Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
+
+Index: b/Cross/Makefile-buildroot-SH.patch
+===================================================================
+--- /dev/null
++++ b/Cross/Makefile-buildroot-SH.patch
+@@ -0,0 +1,73 @@
++remove rules for miniperl & generates_uudmap which come from host-perl
++
++Index: b/Makefile.SH
++===================================================================
++--- a/Makefile.SH
+++++ b/Makefile.SH
++@@ -654,10 +654,7 @@
++ bitcount.h: generate_uudmap$(HOST_EXE_EXT)
++ $(RUN) ./generate_uudmap$(HOST_EXE_EXT) $(generated_headers)
++
++-generate_uudmap$(OBJ_EXT): mg_raw.h
++-
++-generate_uudmap$(HOST_EXE_EXT): generate_uudmap$(OBJ_EXT)
++- $(CC) -o generate_uudmap$(EXE_EXT) $(LDFLAGS) generate_uudmap$(OBJ_EXT) $(libs)
+++# generate_uudmap$(HOST_EXE_EXT) comes from host-perl
++
++ miniperlmain$(OBJ_EXT): miniperlmain.c patchlevel.h
++ $(CCCMD) $(PLDLFLAGS) $*.c
++@@ -829,52 +826,9 @@
++
++ !NO!SUBS!
++
++- case "${osname}${osvers}" in
++- aix*|beos*)
++- $spitshell >>$Makefile <<'!NO!SUBS!'
++-$(MINIPERL_EXE): $& $(mini_obj)
++- $(CC) -o $(MINIPERL_EXE) $(CLDFLAGS) $(mini_obj) $(libs)
++- $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
++-!NO!SUBS!
++- ;;
++- next4*)
++- $spitshell >>$Makefile <<'!NO!SUBS!'
++-$(MINIPERL_EXE): $& $(mini_obj)
++- $(CC) -o $(MINIPERL_EXE) $(mini_obj) $(libs)
++- $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
++-!NO!SUBS!
++- ;;
++- darwin*)
++- case "$osvers" in
++- [1-6].*) ;;
++- *) case "$ldflags" in
++- *"-flat_namespace"*) ;;
++- *) # to allow opmini.o to override stuff in libperl.dylib
++- $spitshell >>$Makefile <<!NO!SUBS!
++-NAMESPACEFLAGS = -force_flat_namespace
++-!NO!SUBS!
++- ;;
++- esac
++- ;;
++- esac
++- $spitshell >>$Makefile <<'!NO!SUBS!'
++-$(MINIPERL_EXE): $& $(mini_obj)
++- -@rm -f miniperl.xok
++- $(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
++- $(mini_obj) $(libs)
++- $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
++-!NO!SUBS!
++- ;;
++- *)
++- $spitshell >>$Makefile <<'!NO!SUBS!'
++-$(MINIPERL_EXE): $& $(mini_obj)
++- -@rm -f miniperl.xok
++- $(LDLIBPTH) $(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \
++- $(mini_obj) $(libs)
++- $(LDLIBPTH) $(RUN) ./miniperl$(HOST_EXE_EXT) -w -Ilib -MExporter -e '<?>' || $(MAKE) minitest
+++ $spitshell >>$Makefile <<'!NO!SUBS!'
+++# $(MINIPERL_EXE) comes from host-perl
++ !NO!SUBS!
++- ;;
++- esac
++
++ $spitshell >>$Makefile <<'!NO!SUBS!'
++
diff --git a/package/perl/perl-configure-qemu.patch b/package/perl/perl-configure-qemu.patch
index c2d6b92..ddd53ae 100644
--- a/package/perl/perl-configure-qemu.patch
+++ b/package/perl/perl-configure-qemu.patch
@@ -23,7 +23,7 @@ Index: b/Configure
'') targetfrom=scp ;;
esac
- run=$run-$targetrun
-+ run=$run-`basename $targetrun`
++ run=$run-`basename \`echo "$targetrun" | sed -e 's/^\([^ \t]*\).*$/\1/'\``
to=$to-$targetto
from=$from-$targetfrom
case "$targetdir" in
@@ -36,7 +36,7 @@ Index: b/Configure
+ from=:
+ cat >$run <<EOF
+#!/bin/sh
-+$targetrun -L $qemulib "\$@"
++$targetrun "\$@"
+EOF
+ ;;
*) echo "Unknown targetrun '$targetrun'" >&4
diff --git a/package/perl/perl-fix-Module-Build.patch b/package/perl/perl-fix-Module-Build.patch
deleted file mode 100644
index 26b15e4..0000000
--- a/package/perl/perl-fix-Module-Build.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-
-Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
-
-Index: b/cpan/Module-Build/lib/Module/Build/Base.pm
-===================================================================
---- a/cpan/Module-Build/lib/Module/Build/Base.pm
-+++ b/cpan/Module-Build/lib/Module/Build/Base.pm
-@@ -456,7 +456,7 @@
- my $proto = shift;
- my $c = ref($proto) ? $proto->{config} : 'Module::Build::Config';
-
-- my $perl = $^X;
-+ my $perl = $ENV{RUN_PERL} || $^X;
- my $perl_basename = File::Basename::basename($perl);
-
- my @potential_perls;
diff --git a/package/perl/perl-fix-installperl.patch b/package/perl/perl-fix-installperl.patch
new file mode 100644
index 0000000..e9a9f81
--- /dev/null
+++ b/package/perl/perl-fix-installperl.patch
@@ -0,0 +1,25 @@
+
+Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
+
+Index: b/installperl
+===================================================================
+--- a/installperl
++++ b/installperl
+@@ -3,11 +3,17 @@
+ BEGIN {
+ require 5.004;
+ chdir '..' if !-d 'lib' and -d '../lib';
++
++ my @sav = @INC;
++ my $sav = $ENV{PERL5LIB};
+ @INC = 'lib';
+ $ENV{PERL5LIB} = 'lib';
+
+ # This needs to be at BEGIN time, before any use of Config
+ require './install_lib.pl';
++
++ @INC = @sav;
++ $ENV{PERL5LIB} = $sav;
+ }
+
+ use strict;
diff --git a/package/perl/perl-mkppport.patch b/package/perl/perl-mkppport.patch
deleted file mode 100644
index 97f27a2..0000000
--- a/package/perl/perl-mkppport.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Add RUN
-
-Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
-
-Index: b/mkppport
-===================================================================
---- a/mkppport
-+++ b/mkppport
-@@ -1,6 +1,7 @@
- use strict;
- use warnings;
-
-+use Config;
- use Getopt::Long;
- use File::Spec;
- use File::Compare qw( compare );
-@@ -136,14 +137,18 @@
- #----------------------------------------------
- sub run
- {
-+ my @run = $Config{run};
-+ @run = () if not defined $run[0] or $run[0] eq '';
- my @args = ("-I" . File::Spec->catdir((File::Spec->updir) x 2, 'lib'), @_);
- my $run = $perl =~ m/\s/ ? qq("$perl") : $perl;
- for (@args) {
- $_ = qq("$_") if $^O eq 'VMS' && /^[^"]/;
- $run .= " $_";
- }
-- print "running $run\n";
-- system $run and die "$run failed: $?\n";
-+# print "running $run\n";
-+# system $run and die "$run failed: $?\n";
-+ print "running ", join(' ', @run, $run), "\n";
-+ system join(' ', @run, $run) and die "@run $run failed: $?\n";
- }
-
- __END__
diff --git a/package/perl/perl-run-perl-lib.patch b/package/perl/perl-run-perl-lib.patch
new file mode 100644
index 0000000..2a4be0d
--- /dev/null
+++ b/package/perl/perl-run-perl-lib.patch
@@ -0,0 +1,98 @@
+RUN_PERL is overloaded by host-perl which cannot use target libraries
+
+Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
+
+Index: b/Makefile.SH
+===================================================================
+--- a/Makefile.SH
++++ b/Makefile.SH
+@@ -309,7 +309,7 @@
+
+ # Macros to invoke a copy of our fully operational perl during the build.
+ PERL_EXE = perl\$(EXE_EXT)
+-RUN_PERL = \$(LDLIBPTH) \$(RUN) ./perl\$(EXE_EXT)
++RUN_PERL = \$(LDLIBPTH) \$(RUN) ./perl\$(EXE_EXT) -Ilib
+
+ # Macros to run our tests
+ RUN_TESTS = \$(LDLIBPTH) ./runtests
+@@ -1048,7 +1048,7 @@
+ # But also this ensures that all extensions are built before we try to scan
+ # them, which picks up Devel::PPPort's documentation.
+ pod/perltoc.pod: $(perltoc_pod_prereqs) $(PERL_EXE) $(ext) pod/buildtoc
+- $(RUN_PERL) -f -Ilib pod/buildtoc -q
++ $(RUN_PERL) -f pod/buildtoc -q
+
+ pod/perlapi.pod: pod/perlintern.pod
+
+@@ -1071,13 +1071,13 @@
+ done
+
+ extras.make: $(PERL_EXE)
+- - at test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) -Ilib -MCPAN -e '@ARGV&&make(@ARGV)' `cat extras.lst`
++ - at test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) -MCPAN -e '@ARGV&&make(@ARGV)' `cat extras.lst`
+
+ extras.test: $(PERL_EXE)
+- - at test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) -Ilib -MCPAN -e '@ARGV&&test(@ARGV)' `cat extras.lst`
++ - at test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) -MCPAN -e '@ARGV&&test(@ARGV)' `cat extras.lst`
+
+ extras.install: $(PERL_EXE)
+- - at test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) -Ilib -MCPAN -e '@ARGV&&install(@ARGV)' `cat extras.lst`
++ - at test ! -s extras.lst || PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) -MCPAN -e '@ARGV&&install(@ARGV)' `cat extras.lst`
+
+ .PHONY: install install-strip install-all install-verbose install-silent \
+ no-install install.perl install.man install.html
+@@ -1180,7 +1180,7 @@
+ regen_meta regen-meta: META.yml
+
+ META.yml: FORCE
+- PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) -Ilib Porting/makemeta
++ PATH="`pwd`:${PATH}" PERL5LIB="`pwd`/lib" $(RUN_PERL) Porting/makemeta
+
+
+ regen_all regen-all: regen regen_meta
+@@ -1225,7 +1225,7 @@
+
+ .PHONY: printconfig
+ printconfig:
+- @eval `$(RUN_PERL) -Ilib -V:$(CONFIGVAR)`; echo $$$(CONFIGVAR)
++ @eval `$(RUN_PERL) -V:$(CONFIGVAR)`; echo $$$(CONFIGVAR)
+
+ .PHONY: clean _tidy _mopup _cleaner1 _cleaner2 \
+ realclean _realcleaner clobber _clobber \
+@@ -1540,28 +1540,28 @@
+ .PHONY: ok okfile oknack okfilenack nok nokfile noknack nokfilenack
+
+ ok: utilities
+- $(RUN_PERL) -Ilib utils/perlbug -ok -s '(UNINSTALLED)'
++ $(RUN_PERL) utils/perlbug -ok -s '(UNINSTALLED)'
+
+ okfile: utilities
+- $(RUN_PERL) -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok
++ $(RUN_PERL) utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok
+
+ oknack: utilities
+- $(RUN_PERL) -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -A
++ $(RUN_PERL) utils/perlbug -ok -s '(UNINSTALLED)' -A
+
+ okfilenack: utilities
+- $(RUN_PERL) -Ilib utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok -A
++ $(RUN_PERL) utils/perlbug -ok -s '(UNINSTALLED)' -F perl.ok -A
+
+ nok: utilities
+- $(RUN_PERL) -Ilib utils/perlbug -nok -s '(UNINSTALLED)'
++ $(RUN_PERL) utils/perlbug -nok -s '(UNINSTALLED)'
+
+ nokfile: utilities
+- $(RUN_PERL) -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok
++ $(RUN_PERL) utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok
+
+ noknack: utilities
+- $(RUN_PERL) -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -A
++ $(RUN_PERL) utils/perlbug -nok -s '(UNINSTALLED)' -A
+
+ nokfilenack: utilities
+- $(RUN_PERL) -Ilib utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok -A
++ $(RUN_PERL) utils/perlbug -nok -s '(UNINSTALLED)' -F perl.nok -A
+
+ .PHONY: clist hlist shlist
+
diff --git a/package/perl/perl.mk b/package/perl/perl.mk
index 81dff04..b96ba77 100644
--- a/package/perl/perl.mk
+++ b/package/perl/perl.mk
@@ -12,18 +12,18 @@ PERL_LICENSE = Artistic
PERL_LICENSE_FILES = Artistic
PERL_INSTALL_STAGING = YES
-PERL_DEPENDENCIES = host-qemu
+PERL_DEPENDENCIES = host-qemu host-perl
ifeq ($(BR2_PACKAGE_BERKELEYDB),y)
PERL_DEPENDENCIES += berkeleydb
endif
ifeq ($(BR2_PACKAGE_GDBM),y)
PERL_DEPENDENCIES += gdbm
endif
+HOST_PERL_DEPENDENCIES =
PERL_CONF_OPT = -des \
-Dusecrosscompile \
-Dtargetrun=$(QEMU_USER) \
- -Dqemulib=$(STAGING_DIR) \
-Dar="$(TARGET_AR)" \
-Dcc="$(TARGET_CC)" \
-Dcpp="$(TARGET_CC)" \
@@ -38,15 +38,41 @@ PERL_CONF_OPT = -des \
-Dprefix=/usr \
-Uoptimize
+HOST_PERL_CONF_OPT = -des \
+ -Dcc="$(HOSTCC)" \
+ -Dprefix="$(HOST_DIR)/usr"
+
ifeq ($(shell expr $(PERL_VERSION_MAJOR) % 2), 1)
PERL_CONF_OPT += -Dusedevel
+ HOST_PERL_CONF_OPT += -Dusedevel
endif
ifneq ($(BR2_LARGEFILE),y)
PERL_CONF_OPT += -Uuselargefiles
endif
+
+define HOST_PERL_CONFIGURE_CMDS
+ (cd $(@D); ./Configure $(HOST_PERL_CONF_OPT))
+endef
+
+define HOST_PERL_BUILD_CMDS
+ $(MAKE) -C $(@D) all
+endef
+
+define HOST_PERL_INSTALL_CMDS
+ $(MAKE) INSTALL_DEPENDENCE= \
+ -C $(@D) install
+ $(INSTALL) -m 755 $(@D)/miniperl $(HOST_DIR)/usr/bin/miniperl
+ $(INSTALL) -m 755 $(@D)/generate_uudmap $(HOST_DIR)/usr/bin/generate_uudmap
+endef
+
+define HOST_PERL_CLEAN_CMDS
+ -$(MAKE) -C $(@D) clean
+endef
+
define PERL_CONFIGURE_CMDS
+ (cd $(@D); patch -p1 < Cross/Makefile-buildroot-SH.patch)
rm -f $(@D)/config.sh
(cd $(@D); ./Configure $(PERL_CONF_OPT))
echo "# patched values" >>$(@D)/config.sh
@@ -57,6 +83,7 @@ define PERL_CONFIGURE_CMDS
-e '/^osname=/d' \
-e '/^osvers=/d' \
-e '/^perladmin=/d' \
+ -e '/^run=/d' \
$(@D)/config.sh
echo "myarchname='$(GNU_TARGET_NAME)'" >>$(@D)/config.sh
echo "mydomain=''" >>$(@D)/config.sh
@@ -65,21 +92,24 @@ define PERL_CONFIGURE_CMDS
echo "osname='linux'" >>$(@D)/config.sh
echo "osvers='$(BR2_LINUX_KERNEL_VERSION)'" >>$(@D)/config.sh
echo "perladmin='root'" >>$(@D)/config.sh
+ echo "run=''" >>$(@D)/config.sh
(cd $(@D); ./Configure -S)
cp $(@D)/config.h $(@D)/xconfig.h
$(SED) 's/UNKNOWN-/Buildroot $(BR2_VERSION_FULL) /' $(@D)/patchlevel.h
endef
define PERL_BUILD_CMDS
- echo "#!/bin/sh" > $(@D)/Cross/miniperl
- echo "$(QEMU_USER) $(@D)/miniperl \"\$$@\"" >>$(@D)/Cross/miniperl
- chmod +x $(@D)/Cross/miniperl
- PERL_MM_OPT="PERL=$(@D)/Cross/miniperl" \
- $(MAKE) -C $(@D) all
+ rm -f $(@D)/miniperl
+ ln -s $(HOST_DIR)/usr/bin/miniperl $(@D)/miniperl
+ rm -f $(@D)/generate_uudmap
+ ln -s $(HOST_DIR)/usr/bin/generate_uudmap $(@D)/generate_uudmap
+ $(MAKE) RUN_PERL=$(HOST_DIR)/usr/bin/perl \
+ -C $(@D) all
endef
define PERL_INSTALL_STAGING_CMDS
- $(MAKE) INSTALL_DEPENDENCE= \
+ $(MAKE) RUN_PERL=$(HOST_DIR)/usr/bin/perl \
+ INSTALL_DEPENDENCE= \
INSTALLFLAGS= \
DESTDIR="$(STAGING_DIR)" \
-C $(@D) install.perl
@@ -122,7 +152,8 @@ define PERL_INSTALL_TARGET_CMDS
endef
else
define PERL_INSTALL_TARGET_CMDS
- $(MAKE) INSTALL_DEPENDENCE= \
+ $(MAKE) RUN_PERL=$(HOST_DIR)/usr/bin/perl \
+ INSTALL_DEPENDENCE= \
INSTALLFLAGS=-p \
DESTDIR="$(TARGET_DIR)" \
-C $(@D) install.perl
@@ -136,3 +167,4 @@ define PERL_CLEAN_CMDS
endef
$(eval $(generic-package))
+$(eval $(host-generic-package))
--
1.7.9.5
^ permalink raw reply related
* [Buildroot] [PATCH 1/2 v2] xtensa: add support for the Xtensa architecture
From: Thomas Petazzoni @ 2012-11-09 9:34 UTC (permalink / raw)
To: buildroot
In-Reply-To: <20121109101959.70d640d5@skate>
Hello,
On Fri, 9 Nov 2012 10:19:59 +0100, Thomas Petazzoni wrote:
> Is it that the pthread support for Xtensa is not available in uClibc?
And if I disable threads support, it fails later during the uClibc
build:
CC libc/misc/dirent/alphasort.os
CC libc/misc/dirent/closedir.os
libc/misc/dirent/closedir.c: In function 'closedir':
libc/misc/dirent/closedir.c:35:2: warning: implicit declaration of function 'INLINE_SYSCALL' [-Wimplicit-function-declaration]
CC libc/misc/dirent/dirfd.os
CC libc/misc/dirent/opendir.os
libc/misc/dirent/opendir.c: In function 'opendir':
libc/misc/dirent/opendir.c:85:2: warning: implicit declaration of function 'INLINE_SYSCALL' [-Wimplicit-function-declaration]
libc/misc/dirent/opendir.c:97:3: warning: implicit declaration of function 'INTERNAL_SYSCALL_DECL' [-Wimplicit-function-declaration]
libc/misc/dirent/opendir.c:97:3: error: 'err' undeclared (first use in this function)
libc/misc/dirent/opendir.c:97:3: note: each undeclared identifier is reported only once for each function it appears in
libc/misc/dirent/opendir.c:97:3: warning: implicit declaration of function 'INTERNAL_SYSCALL' [-Wimplicit-function-declaration]
make[2]: *** [libc/misc/dirent/opendir.os] Error 1
make[1]: *** [/home/test/outputs/xtensa/toolchain/uClibc-0.9.33.2/lib/libc.a] Error 2
make: *** [all] Error 2
My defconfig is:
BR2_xtensa=y
BR2_PTHREADS_NONE=y
BR2_PACKAGE_LUA=y
BR2_PACKAGE_LUA_INTERPRETER=y
BR2_PACKAGE_AVAHI=y
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply
* [Buildroot] [PATCH] perl: build with perlcross instead of qemu
From: Arnout Vandecappelle @ 2012-11-09 9:27 UTC (permalink / raw)
To: buildroot
In-Reply-To: <509C71ED.9010906@ethertek.ca>
On 11/09/12 04:01, Dan Pattison wrote:
> In the perlcross Makefile, if you change perl5160delta.pod to perl5162delta.pod in three places then you can compile
> the newest perl-5.16.2. Tested for arm, confirmed working.
Thanks, I'll try that later.
Regards,
Arnout
PS Dan, if you reply to such a long mail, it helps if you strip away some of
the quoted text. Saves people with simple mail readers a lot of scrolling.
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286540
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply
* [Buildroot] [PATCH] perl: build with perlcross instead of qemu
From: Peter Korsgaard @ 2012-11-09 9:25 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1352425626-10628-1-git-send-email-arnout@mind.be>
>>>>> "Arnout" == Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> writes:
Arnout> The perlcross project makes it possible to properly cross-compile
Arnout> perl. It creates a host-miniperl that is configured for the target
Arnout> and uses that to cross-compile the perl modules.
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply
* [Buildroot] [PATCH] perl: build with perlcross instead of qemu
From: Peter Korsgaard @ 2012-11-09 9:23 UTC (permalink / raw)
To: buildroot
In-Reply-To: <509CCAFB.2030808@mind.be>
>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:
Hi,
Arnout> BTW, please everybody do review this patch even after it's
Arnout> committed - there could very well be some things that I missed
Arnout> and that can be caught with visual review. (Just look at the
Arnout> time that I sent the patch to know why :-)
Yeah, I noticed ;) Thanks for doing it.
--
Bye, Peter Korsgaard
^ permalink raw reply
* [Buildroot] [PATCH] perl: build with perlcross instead of qemu
From: Arnout Vandecappelle @ 2012-11-09 9:22 UTC (permalink / raw)
To: buildroot
In-Reply-To: <20121109101810.6f61c6a9@skate>
On 11/09/12 10:18, Thomas Petazzoni wrote:
>
> On Fri, 09 Nov 2012 10:15:06 +0100, Arnout Vandecappelle wrote:
>
>> Doesn't make sense. perlcross has to be extracted over the perl source: it
>> replaces a few configuration scripts and creates a few more. There is nothing
>> in there to install on the host or on the target.
>
> First of all, thanks a lot for doing this work.
>
> Do you have details on how perl-cross is maintained with regard to
> perl? I.e, is it kept reasonably updated with new perl versions, or is
> it a hack that works on a single perl version that will force us to
> stay with only this version of perl?
There are about 12 versions on the download site, one per major perl. I guess
it doesn't make much difference which perl patchlevel it is applied to (this one
is actually for perl-5.16.0 but it work fine on our perl-5.16.1).
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286540
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply
* [Buildroot] [PATCH] perl: build with perlcross instead of qemu
From: Arnout Vandecappelle @ 2012-11-09 9:20 UTC (permalink / raw)
To: buildroot
In-Reply-To: <87pq3n6stb.fsf@dell.be.48ers.dk>
On 11/09/12 10:15, Peter Korsgaard wrote:
>>>>>> "Alexander" == Alexander Khryukin<alexander@mezon.ru> writes:
>
> Hi,
>
> Alexander> How about to include perl-cross into buildroot packages?
>
> I'm doing a test build right now, and will commit if that works. Perhaps
> it isn't perfect yet, but certainly better than all the qemu issues
> we're seing right now.
BTW, please everybody do review this patch even after it's committed - there
could very well be some things that I missed and that can be caught with visual
review. (Just look at the time that I sent the patch to know why :-)
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286540
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply
* [Buildroot] [PATCH 1/2 v2] xtensa: add support for the Xtensa architecture
From: Thomas Petazzoni @ 2012-11-09 9:19 UTC (permalink / raw)
To: buildroot
In-Reply-To: <509ca3b9.e9c5440a.24b8.24a1@mx.google.com>
Dear Chris Zankel,
On Thu, 08 Nov 2012 22:33:28 -0800, Chris Zankel wrote:
> The Xtensa architecture had been removed because it required special
> handling and depended on additional directories and files that became
> obsolete over time. This change is more aligned to other architectures.
>
> Signed-off-by: Chris Zankel <chris@zankel.net>
Unfortunately, the default toolchain configuration for Xtensa doesn't.
I.e, I tried to build the minimal configuration:
BR2_xtensa=y
BR2_PACKAGE_LUA=y
BR2_PACKAGE_LUA_INTERPRETER=y
BR2_PACKAGE_AVAHI=y
And the build of gcc intermediate fails horribly with pthread errors:
xtensa-buildroot-linux-uclibc/bin/ -B/home/test/outputs/xtensa/host/usr/xtensa-buildroot-linux-uclibc/lib/ -isystem /home/test/outputs/xtensa/host/usr/xtensa-buildroot-linux-u
clibc/include -isystem /home/test/outputs/xtensa/host/usr/xtensa-buildroot-linux-uclibc/sys-include -g -Os -O2 -g -Os -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrit
e-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -
fno-stack-protector -I. -I. -I../.././gcc -I/home/test/outputs/xtensa/toolchain/gcc-4.6.3/libgcc -I/home/test/outputs/xtensa/toolchain/gcc-4.6.3/libgcc/. -I/home/test/output
s/xtensa/toolchain/gcc-4.6.3/libgcc/../gcc -I/home/test/outputs/xtensa/toolchain/gcc-4.6.3/libgcc/../include -DHAVE_CC_TLS -o _negdi2.o -MT _negdi2.o -MD -MP -MF _negdi2.dep
-DL_negdi2 -c /home/test/outputs/xtensa/toolchain/gcc-4.6.3/libgcc/../gcc/libgcc2.c \
-fvisibility=hidden -DHIDE_EXPORTS
In file included from /home/test/outputs/xtensa/toolchain/uClibc_dev//usr/include/stdio.h:72:0,
from /home/test/outputs/xtensa/toolchain/gcc-4.6.3/libgcc/../gcc/tsystem.h:87,
from /home/test/outputs/xtensa/toolchain/gcc-4.6.3/libgcc/../gcc/libgcc2.c:29:
/home/test/outputs/xtensa/toolchain/uClibc_dev//usr/include/bits/uClibc_stdio.h:274:2: error: unknown type name 'pthread_mutex_t'
In file included from /home/test/outputs/xtensa/toolchain/uClibc_dev//usr/include/bits/uClibc_mutex.h:15:0,
from /home/test/outputs/xtensa/toolchain/uClibc_dev//usr/include/bits/uClibc_stdio.h:107,
from /home/test/outputs/xtensa/toolchain/uClibc_dev//usr/include/stdio.h:72,
from /home/test/outputs/xtensa/toolchain/gcc-4.6.3/libgcc/../gcc/tsystem.h:87,
from /home/test/outputs/xtensa/toolchain/gcc-4.6.3/libgcc/../gcc/libgcc2.c:29:
/home/test/outputs/xtensa/toolchain/uClibc_dev//usr/include/pthread.h:227:28: error: unknown type name 'pthread_t'
/home/test/outputs/xtensa/toolchain/uClibc_dev//usr/include/pthread.h:228:7: error: unknown type name 'pthread_attr_t'
/home/test/outputs/xtensa/toolchain/uClibc_dev//usr/include/pthread.h:244:26: error: unknown type name 'pthread_t'
/home/test/outputs/xtensa/toolchain/uClibc_dev//usr/include/pthread.h:249:32: error: unknown type name 'pthread_t'
/home/test/outputs/xtensa/toolchain/uClibc_dev//usr/include/pthread.h:257:34: error: unknown type name 'pthread_t'
/home/test/outputs/xtensa/toolchain/uClibc_dev//usr/include/pthread.h:265:28: error: unknown type name 'pthread_t'
/home/test/outputs/xtensa/toolchain/uClibc_dev//usr/include/pthread.h:269:1: error: unknown type name 'pthread_t'
/home/test/outputs/xtensa/toolchain/uClibc_dev//usr/include/pthread.h:272:27: error: unknown type name 'pthread_t'
/home/test/outputs/xtensa/toolchain/uClibc_dev//usr/include/pthread.h:272:48: error: unknown type name 'pthread_t'
/home/test/outputs/xtensa/toolchain/uClibc_dev//usr/include/pthread.h:280:31: error: unknown type name 'pthread_attr_t'
/home/test/outputs/xtensa/toolchain/uClibc_dev//usr/include/pthread.h:283:34: error: unknown type name 'pthread_attr_t'
/home/test/outputs/xtensa/toolchain/uClibc_dev//usr/include/pthread.h:287:1: error: unknown type name 'pthread_attr_t'
/home/test/outputs/xtensa/toolchain/uClibc_dev//usr/include/pthread.h:292:41: error: unknown type name 'pthread_attr_t'
/home/test/outputs/xtensa/toolchain/uClibc_dev//usr/include/pthread.h:298:1: error: unknown type name 'pthread_attr_t'
[... many more ...]
In file included from /home/test/outputs/xtensa/toolchain/uClibc_dev//usr/include/stdio.h:72:0,
from /home/test/outputs/xtensa/toolchain/gcc-4.6.3/libgcc/../gcc/tsystem.h:87,
from /home/test/outputs/xtensa/toolchain/gcc-4.6.3/libgcc/../gcc/libgcc2.c:29:
/home/test/outputs/xtensa/toolchain/uClibc_dev//usr/include/bits/uClibc_stdio.h:274:2: error: unknown type name 'pthread_mutex_t'
make[3]: *** [_muldi3.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [_negdi2.o] Error 1
make[2]: *** [all-target-libgcc] Error 2
make[1]: *** [/home/test/outputs/xtensa/toolchain/gcc-4.6.3-intermediate/.compiled] Error 2
make: *** [all] Error 2
Is it that the pthread support for Xtensa is not available in uClibc?
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply
* [Buildroot] [PATCH] perl: build with perlcross instead of qemu
From: Thomas Petazzoni @ 2012-11-09 9:18 UTC (permalink / raw)
To: buildroot
In-Reply-To: <509CC99A.4010700@mind.be>
On Fri, 09 Nov 2012 10:15:06 +0100, Arnout Vandecappelle wrote:
> Doesn't make sense. perlcross has to be extracted over the perl source: it
> replaces a few configuration scripts and creates a few more. There is nothing
> in there to install on the host or on the target.
First of all, thanks a lot for doing this work.
Do you have details on how perl-cross is maintained with regard to
perl? I.e, is it kept reasonably updated with new perl versions, or is
it a hack that works on a single perl version that will force us to
stay with only this version of perl?
Thanks!
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply
* [Buildroot] [PATCH] perl: build with perlcross instead of qemu
From: Peter Korsgaard @ 2012-11-09 9:15 UTC (permalink / raw)
To: buildroot
In-Reply-To: <CABtOAfzb9n8HQ9Xbk1+1KnmTh7hHyxiQvD_7vPw5afs3YDyZMg@mail.gmail.com>
>>>>> "Alexander" == Alexander Khryukin <alexander@mezon.ru> writes:
Hi,
Alexander> How about to include perl-cross into buildroot packages?
I'm doing a test build right now, and will commit if that works. Perhaps
it isn't perfect yet, but certainly better than all the qemu issues
we're seing right now.
--
Bye, Peter Korsgaard
^ permalink raw reply
* [Buildroot] [PATCH] perl: build with perlcross instead of qemu
From: Arnout Vandecappelle @ 2012-11-09 9:15 UTC (permalink / raw)
To: buildroot
In-Reply-To: <CABtOAfzb9n8HQ9Xbk1+1KnmTh7hHyxiQvD_7vPw5afs3YDyZMg@mail.gmail.com>
On 11/09/12 09:58, Alexander Khryukin wrote:
>
>
> 2012/11/9 Peter Korsgaard <jacmet at uclibc.org <mailto:jacmet@uclibc.org>>
>
> > >>>> "Arnout" == Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be <mailto:arnout@mind.be>> writes:
>
> Hi,
>
> Arnout> Peter, if Francois confirms that the perl binary actually runs
> Arnout> and if he has no other concerns, then I'd commit this patch
> Arnout> quickly and wait for the autobuilder fallout.
>
> I completely agree, thanks for doing this!
>
> How about to include perl-cross into buildroot packages?
Doesn't make sense. perlcross has to be extracted over the perl source: it
replaces a few configuration scripts and creates a few more. There is nothing
in there to install on the host or on the target.
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286540
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply
* [Buildroot] [git commit] perl: build with perlcross instead of qemu
From: Peter Korsgaard @ 2012-11-09 9:04 UTC (permalink / raw)
To: buildroot
commit: http://git.buildroot.net/buildroot/commit/?id=234fe4433489bca81b79311239569525cc008d9d
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master
The perlcross project makes it possible to properly cross-compile
perl. It creates a host-miniperl that is configured for the target
and uses that to cross-compile the perl modules.
Unfortunately there are still a few hacks needed to make it work.
Proper fixes can be developed and upstreamed later.
Since there is no longer a dependency on qemu, it works on all
architectures again.
Also removed some config options:
- BR2_PACKAGE_PERL_CUSTOM_INSTALL just allows a selection of modules;
this can also be encoded by an empty BR2_PACKAGE_PERL_MODULES.
- BR2_PACKAGE_PERL_DB_FILE and BR2_PACKAGE_PERL_GDBM_FILE can be
derived automatically from the package configs.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
package/perl/Config.in | 40 +++----------
package/perl/perl.mk | 153 ++++++++++++++++++++----------------------------
2 files changed, 71 insertions(+), 122 deletions(-)
diff --git a/package/perl/Config.in b/package/perl/Config.in
index 0642deb..b2991b0 100644
--- a/package/perl/Config.in
+++ b/package/perl/Config.in
@@ -1,12 +1,5 @@
config BR2_PACKAGE_PERL
bool "perl"
- 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
help
Larry Wall's Practical Extraction and Report Language
An interpreted scripting language, known among some as "Unix's Swiss
@@ -16,35 +9,18 @@ config BR2_PACKAGE_PERL
if BR2_PACKAGE_PERL
-config BR2_PACKAGE_PERL_CUSTOM_INSTALL
- bool "custom install"
- help
- Don't use the full install target
- Install only a selection of modules (like microperl).
-
config BR2_PACKAGE_PERL_MODULES
- string "additional modules"
- depends on BR2_PACKAGE_PERL_CUSTOM_INSTALL
+ string "custom module selection"
help
- List of space-separated perl modules to copy to the rootfs.
-
- Examples: constant.pm Getopt/Std.pm Time/Local.pm
+ List of space-separated perl modules (without .pm) to copy to the
+ rootfs.
- Module dependencies are not automatic so check your needs.
+ Examples: constant Getopt/Std Time/Local
-config BR2_PACKAGE_PERL_DB_FILE
- bool "DB_File"
- select BR2_PACKAGE_BERKELEYDB
- help
- Build the DB_File module.
+ Module dependencies on external libraries are not automatic so
+ check your needs.
-config BR2_PACKAGE_PERL_GDBM_FILE
- bool "GDBM_File"
- select BR2_PACKAGE_GDBM
- help
- Build the GDBM_File module.
+ Leave empty for all modules (as far as the external libraries
+ are available).
endif
-
-comment "perl requires an architecture supported by qemu"
- depends on BR2_avr32 || BR2_bfin || BR2_sh2 || BR2_sh2a || BR2_sh3 || BR2_sh3eb || BR2_sh64
diff --git a/package/perl/perl.mk b/package/perl/perl.mk
index 81dff04..f3c73dd 100644
--- a/package/perl/perl.mk
+++ b/package/perl/perl.mk
@@ -12,7 +12,26 @@ PERL_LICENSE = Artistic
PERL_LICENSE_FILES = Artistic
PERL_INSTALL_STAGING = YES
-PERL_DEPENDENCIES = host-qemu
+PERL_CROSS_VERSION = 0.7
+PERL_CROSS_SITE = http://download.berlios.de/perlcross
+PERL_CROSS_SOURCE = perl-5.$(PERL_VERSION_MAJOR).0-cross-$(PERL_CROSS_VERSION).tar.gz
+
+# We use the perlcross hack to cross-compile perl. It should
+# be extracted over the perl sources, so we don't define that
+# as a separate package. Instead, it is downloaded and extracted
+# together with perl
+
+define PERL_CROSS_DOWNLOAD
+ $(call DOWNLOAD,$(PERL_CROSS_SITE)/$(PERL_CROSS_SOURCE))
+endef
+PERL_POST_DOWNLOAD_HOOKS += PERL_CROSS_DOWNLOAD
+
+define PERL_CROSS_EXTRACT
+ $(INFLATE$(suffix $(PERL_CROSS_SOURCE))) $(DL_DIR)/$(PERL_CROSS_SOURCE) | \
+ $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -
+endef
+PERL_POST_EXTRACT_HOOKS += PERL_CROSS_EXTRACT
+
ifeq ($(BR2_PACKAGE_BERKELEYDB),y)
PERL_DEPENDENCIES += berkeleydb
endif
@@ -20,23 +39,31 @@ ifeq ($(BR2_PACKAGE_GDBM),y)
PERL_DEPENDENCIES += gdbm
endif
-PERL_CONF_OPT = -des \
- -Dusecrosscompile \
- -Dtargetrun=$(QEMU_USER) \
- -Dqemulib=$(STAGING_DIR) \
- -Dar="$(TARGET_AR)" \
- -Dcc="$(TARGET_CC)" \
- -Dcpp="$(TARGET_CC)" \
- -Dld="$(TARGET_LD)" \
- -Dnm="$(TARGET_NM)" \
- -Dranlib="$(TARGET_RANLIB)" \
- -Dccflags="$(TARGET_CFLAGS)" \
- -Dldflags="$(TARGET_LDFLAGS) -lgcc_s -lm" \
- -Dlddlflags="-shared" \
- -Dlibc=$(STAGING_DIR)/lib/libc.so \
- -Duseshrplib \
- -Dprefix=/usr \
- -Uoptimize
+# Normally, --mode=cross should automatically do the two steps
+# below, but it doesn't work for some reason.
+PERL_HOST_CONF_OPT = \
+ --mode=buildmini \
+ --target=$(GNU_TARGET_NAME) \
+ --target-arch=$(GNU_TARGET_NAME) \
+ --set-target-name=$(GNU_TARGET_NAME)
+
+# We have to override LD, because an external multilib toolchain ld is not
+# wrapped to provide the required sysroot options. We also can't use ccache
+# because the configure script doesn't support it.
+PERL_CONF_OPT = \
+ --mode=target \
+ --target=$(GNU_TARGET_NAME) \
+ --target-tools-prefix=$(TARGET_CROSS) \
+ --prefix=/usr \
+ -Dld="$(TARGET_CC_NOCCACHE)" \
+ -A ccflags="$(TARGET_CFLAGS)" \
+ -A ldflags="$(TARGET_LDFLAGS) -lm" \
+ -A mydomain="" \
+ -A myhostname="$(BR2_TARGET_GENERIC_HOSTNAME)" \
+ -A myuname="Buildroot $(BR2_VERSION_FULL)" \
+ -A osname=linux \
+ -A osvers=$(LINUX_VERSION) \
+ -A perlamdin=root
ifeq ($(shell expr $(PERL_VERSION_MAJOR) % 2), 1)
PERL_CONF_OPT += -Dusedevel
@@ -46,93 +73,39 @@ ifneq ($(BR2_LARGEFILE),y)
PERL_CONF_OPT += -Uuselargefiles
endif
+PERL_MODULES = $(call qstrip,$(BR2_PACKAGE_PERL_MODULES))
+ifneq ($(PERL_MODULES),)
+PERL_CONF_OPT += --only-mod=$(subst $(space),$(comma),$(PERL_MODULES))
+endif
+
define PERL_CONFIGURE_CMDS
- rm -f $(@D)/config.sh
- (cd $(@D); ./Configure $(PERL_CONF_OPT))
- echo "# patched values" >>$(@D)/config.sh
- $(SED) '/^myarchname=/d' \
- -e '/^mydomain=/d' \
- -e '/^myhostname=/d' \
- -e '/^myuname=/d' \
- -e '/^osname=/d' \
- -e '/^osvers=/d' \
- -e '/^perladmin=/d' \
- $(@D)/config.sh
- echo "myarchname='$(GNU_TARGET_NAME)'" >>$(@D)/config.sh
- echo "mydomain=''" >>$(@D)/config.sh
- echo "myhostname='$(BR2_TARGET_GENERIC_HOSTNAME)'" >>$(@D)/config.sh
- echo "myuname='Buildroot $(BR2_VERSION_FULL)'" >>$(@D)/config.sh
- echo "osname='linux'" >>$(@D)/config.sh
- echo "osvers='$(BR2_LINUX_KERNEL_VERSION)'" >>$(@D)/config.sh
- echo "perladmin='root'" >>$(@D)/config.sh
- (cd $(@D); ./Configure -S)
- cp $(@D)/config.h $(@D)/xconfig.h
+ (cd $(@D); HOSTCC='$(HOSTCC_NOCACHE)' ./configure $(PERL_HOST_CONF_OPT))
+ (cd $(@D); ./configure $(PERL_CONF_OPT))
$(SED) 's/UNKNOWN-/Buildroot $(BR2_VERSION_FULL) /' $(@D)/patchlevel.h
endef
+# perlcross's miniperl_top forgets base, which is required by mktables.
+# Instead of patching, it's easier to just set PERL5LIB
define PERL_BUILD_CMDS
- echo "#!/bin/sh" > $(@D)/Cross/miniperl
- echo "$(QEMU_USER) $(@D)/miniperl \"\$$@\"" >>$(@D)/Cross/miniperl
- chmod +x $(@D)/Cross/miniperl
- PERL_MM_OPT="PERL=$(@D)/Cross/miniperl" \
- $(MAKE) -C $(@D) all
+ PERL5LIB=$(@D)/dist/base/lib $(MAKE1) -C $(@D) perl modules
endef
define PERL_INSTALL_STAGING_CMDS
- $(MAKE) INSTALL_DEPENDENCE= \
- INSTALLFLAGS= \
- DESTDIR="$(STAGING_DIR)" \
- -C $(@D) install.perl
+ PERL5LIB=$(@D)/dist/base/lib $(MAKE1) -C $(@D) DESTDIR="$(STAGING_DIR)" install.perl
endef
-PERL_RUN_PERL = $(QEMU_USER) $(@D)/perl -Ilib
-PERL_ARCHNAME = $(shell $(PERL_RUN_PERL) -MConfig -e "print Config->{archname}")
-PERL_LIB = $(TARGET_DIR)/usr/lib/perl5/$(PERL_VERSION)
-PERL_ARCHLIB = $(PERL_LIB)/$(PERL_ARCHNAME)
-PERL_MODS = $(call qstrip,$(BR2_PACKAGE_PERL_MODULES))
-# Minimal set of modules required for 'perl -V' to work
-PERL_ARCH_MODS = Config.pm Config_git.pl Config_heavy.pl
-PERL_BASE_MODS = strict.pm vars.pm warnings.pm warnings/register.pm
-
-define PERL_INSTALL_MODULES
- for i in $(PERL_ARCH_MODS); do \
- $(INSTALL) -m 0644 -D $(@D)/lib/$$i $(PERL_ARCHLIB)/$$i; \
- done
- for i in $(PERL_BASE_MODS); do \
- $(INSTALL) -m 0644 -D $(@D)/lib/$$i $(PERL_LIB)/$$i; \
- done
- for i in $(PERL_MODS); do \
- j=`echo $$i|cut -d : -f 1` ; \
- if [ -d $(@D)/lib/$$j ] ; then \
- cp -af $(@D)/lib/$$j $(PERL_LIB) ; \
- fi ; \
- if [ -f $(@D)/lib/$$i ] ; then \
- $(INSTALL) -m 0644 -D $(@D)/lib/$$i $(PERL_LIB)/$$i; \
- fi ; \
- done
- # Remove test files
- find $(PERL_LIB) -type f -name *.t -exec rm -f {} \;
-endef
+PERL_INSTALL_TARGET_GOALS = install.perl
+ifeq ($(BR2_HAVE_DOCUMENTATION),y)
+PERL_INSTALL_TARGET_GOALS += install.man
+endif
+
-ifeq ($(BR2_PACKAGE_PERL_CUSTOM_INSTALL),y)
-define PERL_INSTALL_TARGET_CMDS
- $(INSTALL) -m 0755 -D $(@D)/perl $(TARGET_DIR)/usr/bin/perl
- $(INSTALL) -m 0755 -D $(@D)/libperl.so $(PERL_ARCHLIB)/CORE/libperl.so
- $(PERL_INSTALL_MODULES)
-endef
-else
define PERL_INSTALL_TARGET_CMDS
- $(MAKE) INSTALL_DEPENDENCE= \
- INSTALLFLAGS=-p \
- DESTDIR="$(TARGET_DIR)" \
- -C $(@D) install.perl
- rm -f $(PERL_ARCHLIB)/CORE/*.h
- find $(PERL_ARCHLIB) -type f -name *.bs -exec rm -f {} \;
+ PERL5LIB=$(@D)/dist/base/lib $(MAKE1) -C $(@D) DESTDIR="$(TARGET_DIR)" $(PERL_INSTALL_TARGET_GOALS)
endef
-endif
define PERL_CLEAN_CMDS
- -$(MAKE) -C $(@D) clean
+ -$(MAKE1) -C $(@D) clean
endef
$(eval $(generic-package))
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox