Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: perl: Fix various nativesdk build issues
Date: Thu, 30 Aug 2012 16:36:24 -0700	[thread overview]
Message-ID: <1346369784.16485.14.camel@ted> (raw)

The config.sh lists -fstack-protector but this isn't in LDFLAGS. This
can result in perl compilation failures due to the mismatch. Adding the
flag to LDFLAGS solves makes all the flags consistent and avoids build
failures from missing symbols.

It was also found that the path substitutions made by the sed statement
can conflict with each other and you can end up with $prefix$prefix type
expressions in config.sh-X which can break the build in unusual ways.
This patch anchors the expressions to ensure only true matches are
replaced.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/recipes-devtools/perl/perl_5.14.2.bb b/meta/recipes-devtools/perl/perl_5.14.2.bb
index 9db3805..8e7ab9e 100644
--- a/meta/recipes-devtools/perl/perl_5.14.2.bb
+++ b/meta/recipes-devtools/perl/perl_5.14.2.bb
@@ -90,6 +90,8 @@ export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${PV}/"
 # LDFLAGS for shared libraries
 export LDDLFLAGS = "${LDFLAGS} -shared"
 
+LDFLAGS_append = " -fstack-protector"
+
 # We're almost Debian, aren't we?
 CFLAGS += "-DDEBIAN"
 
@@ -148,10 +150,10 @@ do_configure() {
                -e 's,@ARCH@-thread-multi,,g' \
                -e 's,@ARCH@,${TARGET_ARCH}-${TARGET_OS},g' \
                -e 's,@STAGINGDIR@,${STAGING_DIR_HOST},g' \
-               -e "s%/usr/include%${STAGING_INCDIR}%g" \
-	       -e 's,/usr/lib/,${libdir}/,g' \
-	       -e 's,/usr/,${exec_prefix}/,g' \
-	       -e 's,/perl5,/perl,g' \
+               -e "s%\([ \"^\',=]\+\)/usr/include%\1${STAGING_INCDIR}%g" \
+	       -e "s%\([ \"^\',=]\+\)/usr/lib/%\1${libdir}/%g" \
+	       -e "s%\([ \"^\',=]\+\)/usr/%\1${exec_prefix}/%g" \
+	       -e "s%/perl5%/perl%g" \
             config.sh-${TARGET_ARCH}-${TARGET_OS}
 
 	case "${TARGET_ARCH}" in





             reply	other threads:[~2012-08-31  8:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-30 23:36 Richard Purdie [this message]
2012-08-31  8:42 ` perl: Fix various nativesdk build issues Koen Kooi

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=1346369784.16485.14.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@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