diff options
-rw-r--r-- | meta/recipes-support/nspr/files/fix-build-on-x86_64.patch | 51 | ||||
-rw-r--r-- | meta/recipes-support/nspr/files/trickly-fix-build-on-x86_64.patch | 62 | ||||
-rw-r--r-- | meta/recipes-support/nspr/nspr_4.8.9.bb | 4 |
3 files changed, 116 insertions, 1 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 000000000..a6fa1ea60 --- /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 000000000..8ca51e4d1 --- /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 + diff --git a/meta/recipes-support/nspr/nspr_4.8.9.bb b/meta/recipes-support/nspr/nspr_4.8.9.bb index 8b840d9a7..f70c2c1e4 100644 --- a/meta/recipes-support/nspr/nspr_4.8.9.bb +++ b/meta/recipes-support/nspr/nspr_4.8.9.bb @@ -5,10 +5,12 @@ LIC_FILES_CHKSUM = "file://configure.in;beginline=3;endline=40;md5=99d4d7d68bbc4 file://Makefile.in;beginline=4;endline=38;md5=c2b512182a334e1bfa1edc4d1c84a298 " SECTION = "libs/network" -PR = "r2" +PR = "r3" SRC_URI = "ftp://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz \ file://remove-rpath-from-tests.patch \ + file://fix-build-on-x86_64.patch \ + file://trickly-fix-build-on-x86_64.patch \ " SRC_URI += "file://nspr.pc.in" |