From patchwork Tue Nov 13 13:59:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: bash: Add fix for cross compile issues Date: Tue, 13 Nov 2012 13:59:19 -0000 From: Richard Purdie X-Patchwork-Id: 38919 Message-Id: <1352815159.24487.122.camel@ted> To: openembedded-core Signed-off-by: Richard Purdie --- 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"