From: Graham Gower <graham.gower@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [PATCH] perl_5.8.8.bb, perl_5.10.1.bb: Fix build when DISTRO_FEATURES lacks largefile.
Date: Tue, 30 Nov 2010 15:23:42 +1030 [thread overview]
Message-ID: <4CF48356.2050501@gmail.com> (raw)
CCCMD = mipsel-oe-linux-uclibc-gcc -march=mips32 -DPERL_CORE -c -isystem/mnt/oe/tmp/sysroots/mipsel-oe-linux-uclibc/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -pipe -I/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -Wall
In file included from /mnt/oe/tmp/sysroots/mipsel-oe-linux-uclibc/include/sys/types.h:27:0,
from perl.h:420,
from miniperlmain.c:36:
/mnt/oe/tmp/sysroots/mipsel-oe-linux-uclibc/include/features.h:216:5: error: #error It appears you have defined _FILE_OFFSET_BITS=64. Unfortunately, uClibc was built without large file support enabled.
Signed-off-by: Graham Gower <graham.gower@gmail.com>
---
recipes/perl/perl_5.10.1.bb | 13 +++++++++++++
recipes/perl/perl_5.8.8.bb | 13 +++++++++++++
2 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/recipes/perl/perl_5.10.1.bb b/recipes/perl/perl_5.10.1.bb
index 9038b96..91434e2 100644
--- a/recipes/perl/perl_5.10.1.bb
+++ b/recipes/perl/perl_5.10.1.bb
@@ -97,6 +97,17 @@ export LDDLFLAGS = "${LDFLAGS} -shared"
# We're almost Debian, aren't we?
CFLAGS += "-DDEBIAN"
+do_nolargefile() {
+ sed -i -e "s,\(uselargefiles=\)'define',\1'undef',g" \
+ -e "s,\(d_readdir64_r=\)'define',\1'undef',g" \
+ -e "s,\(readdir64_r_proto=\)'\w+',\1'0',g" \
+ -e "/ccflags_uselargefiles/d" \
+ -e "s/-Duselargefiles//" \
+ -e "s/-D_FILE_OFFSET_BITS=64//" \
+ -e "s/-D_LARGEFILE_SOURCE//" \
+ ${S}/Cross/config.sh-${TARGET_ARCH}-${TARGET_OS}
+}
+
do_configure() {
# Make hostperl in build directory be the native perl
ln -sf ${HOSTPERL} hostperl
@@ -128,6 +139,8 @@ do_configure() {
config.sh-${TARGET_ARCH}-${TARGET_OS}
fi
+ ${@base_contains('DISTRO_FEATURES', 'largefile', '', 'do_nolargefile', d)}
+
# Update some paths in the configuration
sed -i -e 's,@DESTDIR@,${D},g' \
-e 's,@ARCH@,${TARGET_ARCH}-${TARGET_OS},g' \
diff --git a/recipes/perl/perl_5.8.8.bb b/recipes/perl/perl_5.8.8.bb
index a0fb21a..69078e8 100644
--- a/recipes/perl/perl_5.8.8.bb
+++ b/recipes/perl/perl_5.8.8.bb
@@ -52,6 +52,17 @@ export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl/${PV}/"
# LDFLAGS for shared libraries
export LDDLFLAGS = "${LDFLAGS} -shared"
+do_nolargefile() {
+ sed -i -e "s,\(uselargefiles=\)'define',\1'undef',g" \
+ -e "s,\(d_readdir64_r=\)'define',\1'undef',g" \
+ -e "s,\(readdir64_r_proto=\)'\w+',\1'0',g" \
+ -e "/ccflags_uselargefiles/d" \
+ -e "s/-Duselargefiles//" \
+ -e "s/-D_FILE_OFFSET_BITS=64//" \
+ -e "s/-D_LARGEFILE_SOURCE//" \
+ ${S}/Cross/config.sh-${TARGET_ARCH}-${TARGET_OS}
+}
+
do_configure() {
# Make hostperl in build directory be the native perl
ln -sf ${HOSTPERL} hostperl
@@ -83,6 +94,8 @@ do_configure() {
config.sh-${TARGET_ARCH}-${TARGET_OS}
fi
+ ${@base_contains('DISTRO_FEATURES', 'largefile', '', 'do_nolargefile', d)}
+
# Update some paths in the configuration
sed -i -e 's,@DESTDIR@,${D},g' \
-e 's,@ARCH@,${TARGET_ARCH}-${TARGET_OS},g' \
--
1.7.1
reply other threads:[~2010-11-30 4:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CF48356.2050501@gmail.com \
--to=graham.gower@gmail.com \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox