summaryrefslogtreecommitdiff
path: root/meta/recipes-support/nspr/files
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2012-03-27 17:37:17 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-27 13:25:09 +0100
commit1d8fea3b9c9dd8f3e2b72ee8c8a9b834f4a3d729 (patch)
tree979f25c93a53a07d600580987c024a992bfd430f /meta/recipes-support/nspr/files
parent674fa286d882ff94830cbf748e3f5abc63a5575a (diff)
downloadopenembedded-core-1d8fea3b9c9dd8f3e2b72ee8c8a9b834f4a3d729.tar.gz
openembedded-core-1d8fea3b9c9dd8f3e2b72ee8c8a9b834f4a3d729.tar.bz2
openembedded-core-1d8fea3b9c9dd8f3e2b72ee8c8a9b834f4a3d729.zip
nspr 4.8.9: failed to build on x86_64 board
nspr failed to build on x86_64 board(e.g., qemux86-64): x86_64-poky-linux-gcc -m64 ... -m32 ... ... fatal error: gnu/stubs-32.h: No such file or directory This is because there are both '-m64' and '-m32' in gcc's options, and the later one is used, but what we need is '-m64' since it is x86_64, this is caused by an incorrect logic in configure.in, we should assume that the pkg uses 64bit when target_cpu is x86_64 (it has two options: --enable-n32 and --enable-64bit, both of them are not set by default), we only can assume that the pkg uses 32bit when USE_N32 is set. But what it did was that assumed 32bit when target_cpu was x86_64 unless --enable-64bit was set, this seems unreasonable and caused the "gcc -m64 -m32" error. Some had noticed this error before: https://lists.yoctoproject.org/pipermail/poky/2011-May/005799.html NOTE: * Both fix configure and configure.in since we can't run the "autoreconf" for nsrp, please see more explanation in trickly-fix-build-on-x86_64.patch. * Also fixed powerpc64, this is just fixed by conclusion since we don't suport ppc64. [YOCTO #2179] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/nspr/files')
-rw-r--r--meta/recipes-support/nspr/files/fix-build-on-x86_64.patch51
-rw-r--r--meta/recipes-support/nspr/files/trickly-fix-build-on-x86_64.patch62
2 files changed, 113 insertions, 0 deletions
diff --git a/meta/recipes-support/nspr/files/fix-build-on-x86_64.patch b/meta/recipes-support/nspr/files/fix-build-on-x86_64.patch
new file mode 100644
index 0000000000..a6fa1ea607
--- /dev/null
+++ b/meta/recipes-support/nspr/files/fix-build-on-x86_64.patch
@@ -0,0 +1,51 @@
+Fix build failure on x86_64
+
+When the target_cpu is x86_64, we should assume that the pkg uses 64bit,
+only if USE_N32 is set, we can assume that the pkg uses 32bit. It used a
+opposite logic before.
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+Upstream-Status: Pending
+---
+ configure.in | 12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 39c96a3..99a03ac 100644
+--- a/configure.in
++++ b/configure.in
+@@ -1778,24 +1778,24 @@ tools are selected during the Xcode/Developer Tools installation.])
+ PR_MD_ASFILES=os_Linux_ia64.s
+ ;;
+ x86_64)
+- if test -n "$USE_64"; then
+- PR_MD_ASFILES=os_Linux_x86_64.s
+- else
++ if test -n "$USE_N32"; then
+ AC_DEFINE(i386)
+ PR_MD_ASFILES=os_Linux_x86.s
+ CC="$CC -m32"
+ CXX="$CXX -m32"
++ else
++ PR_MD_ASFILES=os_Linux_x86_64.s
+ fi
+ ;;
+ ppc|powerpc)
+ PR_MD_ASFILES=os_Linux_ppc.s
+ ;;
+ powerpc64)
+- if test -n "$USE_64"; then
++ if test -n "$USE_N32"; then
++ PR_MD_ASFILES=os_Linux_ppc.s
++ else
+ CC="$CC -m64"
+ CXX="$CXX -m64"
+- else
+- PR_MD_ASFILES=os_Linux_ppc.s
+ fi
+ ;;
+ m68k)
+--
+1.7.1
+
diff --git a/meta/recipes-support/nspr/files/trickly-fix-build-on-x86_64.patch b/meta/recipes-support/nspr/files/trickly-fix-build-on-x86_64.patch
new file mode 100644
index 0000000000..8ca51e4d1f
--- /dev/null
+++ b/meta/recipes-support/nspr/files/trickly-fix-build-on-x86_64.patch
@@ -0,0 +1,62 @@
+trickily fix build failure on x86_64
+
+It seems that we can not run the 'autoreconf -f -i' for the nspr, I met
+several strange problems while trying to do that, and the previous
+author seemed had noticed this, so he wrote:
+
+do_configure() {
+ oe_runconf
+}
+
+to avoid running the "autoreconf". But we must modify configure.in to
+fix the build failure on x86_64, so both modify configure and
+configure.in, once the "autoreconf" can work correctly, we can remove
+this patch.
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+Upstream-Status: Inappropriate [configuration]
+---
+ configure | 12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/configure b/configure
+--- a/configure
++++ b/configure
+@@ -4366,9 +4366,7 @@ EOF
+ PR_MD_ASFILES=os_Linux_ia64.s
+ ;;
+ x86_64)
+- if test -n "$USE_64"; then
+- PR_MD_ASFILES=os_Linux_x86_64.s
+- else
++ if test -n "$USE_N32"; then
+ cat >> confdefs.h <<\EOF
+ #define i386 1
+ EOF
+@@ -4376,17 +4374,19 @@ EOF
+ PR_MD_ASFILES=os_Linux_x86.s
+ CC="$CC -m32"
+ CXX="$CXX -m32"
++ else
++ PR_MD_ASFILES=os_Linux_x86_64.s
+ fi
+ ;;
+ ppc|powerpc)
+ PR_MD_ASFILES=os_Linux_ppc.s
+ ;;
+ powerpc64)
+- if test -n "$USE_64"; then
++ if test -n "$USE_N32"; then
++ PR_MD_ASFILES=os_Linux_ppc.s
++ else
+ CC="$CC -m64"
+ CXX="$CXX -m64"
+- else
+- PR_MD_ASFILES=os_Linux_ppc.s
+ fi
+ ;;
+ m68k)
+--
+1.7.1
+