Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: [PATCH] bash: Add fix for cross compile issues
Date: Tue, 13 Nov 2012 13:59:19 +0000	[thread overview]
Message-ID: <1352815159.24487.122.camel@ted> (raw)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/recipes-extended/bash/bash-4.2/crossfix.patch b/meta/recipes-extended/bash/bash-4.2/crossfix.patch
new file mode 100644
index 0000000..f587c34
--- a/dev/null
+++ b/meta/recipes-extended/bash/bash-4.2/crossfix.patch
@@ -0,0 +1,28 @@
+Adding @CROSS_COMPILE@ to CFLAGS_FOR_BUILD causes errors like:
+
+mkbuiltins.o: In function `open':
+/usr/include/x86_64-linux-gnu/bits/fcntl2.h:54: undefined reference to `xopen'
+mkbuiltins.o: In function `read':
+/usr/include/x86_64-linux-gnu/bits/unistd.h:45: undefined reference to `xread'
+collect2: ld returned 1 exit status
+
+when compiling on a 64 bit x86 build system for a 32 bit x86 target since
+config.h confuses the compiler about settings. By removing the option, config.h 
+isn't used and the compiler stops getting confused.
+
+Upstream-Status: Pending
+RP 2012/11/13
+
+Index: bash-4.2/builtins/Makefile.in
+===================================================================
+--- bash-4.2.orig/builtins/Makefile.in	2010-12-21 13:37:18.000000000 +0000
++++ bash-4.2/builtins/Makefile.in	2012-11-13 11:36:47.761417446 +0000
+@@ -56,7 +56,7 @@
+ 
+ PROFILE_FLAGS = @PROFILE_FLAGS@
+ CFLAGS = @CFLAGS@
+-CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ @CROSS_COMPILE@
++CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
+ CPPFLAGS = @CPPFLAGS@
+ CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
+ LOCAL_CFLAGS = @LOCAL_CFLAGS@ ${DEBUG}
diff --git a/meta/recipes-extended/bash/bash_4.2.bb b/meta/recipes-extended/bash/bash_4.2.bb
index 5a0f015..18ddc7e 100644
--- a/meta/recipes-extended/bash/bash_4.2.bb
+++ b/meta/recipes-extended/bash/bash_4.2.bb
@@ -4,7 +4,7 @@ require bash.inc
 LICENSE = "GPLv3+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
-PR = "r5"
+PR = "r6"
 
 SRC_URI = "${GNU_MIRROR}/bash/${BPN}-${PV}.tar.gz;name=tarball \
            ${GNU_MIRROR}/bash/bash-4.2-patches/bash42-001;apply=yes;striplevel=0;name=patch001 \
@@ -18,6 +18,7 @@ SRC_URI = "${GNU_MIRROR}/bash/${BPN}-${PV}.tar.gz;name=tarball \
            ${GNU_MIRROR}/bash/bash-4.2-patches/bash42-009;apply=yes;striplevel=0;name=patch009 \
            ${GNU_MIRROR}/bash/bash-4.2-patches/bash42-010;apply=yes;striplevel=0;name=patch010 \
            file://execute_cmd.patch;striplevel=0 \
+           file://crossfix.patch \
            "
 
 SRC_URI[tarball.md5sum] = "3fb927c7c33022f1c327f14a81c0d4b0"





             reply	other threads:[~2012-11-13 14:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-13 13:59 Richard Purdie [this message]
2012-11-13 23:42 ` [PATCH] bash: Add fix for cross compile issues Chris Larson
2012-11-14 13:01   ` Richard Purdie
2012-11-14 14:08     ` Chris Larson
2012-11-14 14:14       ` Richard Purdie
2012-11-14 12:30 ` Martin Jansa
2012-11-14 13:24   ` Richard Purdie
2012-11-14 13:30     ` Richard Purdie
2012-11-14 19:45       ` Michael Halstead
2012-11-14 21:07         ` Michael Halstead
2012-11-15 10:52           ` Richard Purdie
2012-11-14 14:06     ` Martin Jansa

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=1352815159.24487.122.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