aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-03-22 15:23:21 -0700
committerKhem Raj <raj.khem@gmail.com>2011-03-22 15:27:14 -0700
commit3aaa064fbbed5809aeac9373eeaab235712b6ae7 (patch)
treec4686b99f1d2b638dbe699d77e4309ea91598330
parenta2f8518e3f38f6533492865a3ed81deb5c26d75e (diff)
downloadopenembedded-3aaa064fbbed5809aeac9373eeaab235712b6ae7.tar.gz
fennec: Make it build on ARM eglibc/uclibc
This patchset enables fennec to build again Upgrades to latest release tag Bunch of patches to fix uclibc build Disable few options notably --disable-elf-hack Add -L<sysroot>/usr/lib to LDFLAGS otherwise make tried to find the libs in /usr/lib Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--classes/mozilla.bbclass16
-rw-r--r--recipes/mozilla/fennec/arm/mozconfig6
-rw-r--r--recipes/mozilla/fennec/cross-config.patch29
-rw-r--r--recipes/mozilla/fennec/fennec-uclibc.patch84
-rw-r--r--recipes/mozilla/fennec/jsautocfg-dontoverwrite.patch16
-rw-r--r--recipes/mozilla/fennec/libffi-arm-softfloat.patch290
-rw-r--r--recipes/mozilla/fennec/mozconfig6
-rw-r--r--recipes/mozilla/fennec/prune-lintl.patch33
-rw-r--r--recipes/mozilla/fennec/uclibc-isfinite.patch70
-rw-r--r--recipes/mozilla/fennec_hg.bb34
10 files changed, 558 insertions, 26 deletions
diff --git a/classes/mozilla.bbclass b/classes/mozilla.bbclass
index 2b2f770d58..6d9492cfd6 100644
--- a/classes/mozilla.bbclass
+++ b/classes/mozilla.bbclass
@@ -26,6 +26,14 @@ export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}"
export HOST_LDFLAGS = "${BUILD_LDFLAGS}"
export HOST_RANLIB = "${BUILD_RANLIB}"
export HOST_AR = "${BUILD_AR}"
+# Set the host libIDL stuff correctly.
+export HOST_LIBIDL_CONFIG="PKG_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/pkgconfig pkg-config libIDL-2.0"
+# Due to sysroot we need to sed out references to the target staging
+# when building the native version of xpidl Symptons of the failure
+# include "gthread.h:344: error: size of array 'type name' is negative"
+export HOST_LIBIDL_CFLAGS="`${HOST_LIBIDL_CONFIG} --cflags | sed -e s:${STAGING_DIR_TARGET}::g`"
+export HOST_LIBIDL_LIBS="`${HOST_LIBIDL_CONFIG} --libs`"
+
mozilla_do_configure() {
(
@@ -44,14 +52,6 @@ mozilla_do_configure() {
>> ${MOZCONFIG}
fi
- # Set the host libIDL stuff correctly.
- export HOST_LIBIDL_CONFIG="PKG_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/pkgconfig pkg-config libIDL-2.0"
- # Due to sysroot we need to sed out references to the target staging
- # when building the native version of xpidl Symptons of the failure
- # include "gthread.h:344: error: size of array 'type name' is negative"
- export HOST_LIBIDL_CFLAGS="`${HOST_LIBIDL_CONFIG} --cflags | sed -e s:${STAGING_DIR_TARGET}:${STAGING_DIR_NATIVE}:g`"
- export HOST_LIBIDL_LIBS="`${HOST_LIBIDL_CONFIG} --libs`"
-
if [ -e ${MOZ_OBJDIR}/Makefile ] ; then
oe_runmake -f client.mk ${MOZ_OBJDIR}/Makefile \
${MOZ_OBJDIR}/config.status
diff --git a/recipes/mozilla/fennec/arm/mozconfig b/recipes/mozilla/fennec/arm/mozconfig
index 926fa86041..a204891d4f 100644
--- a/recipes/mozilla/fennec/arm/mozconfig
+++ b/recipes/mozilla/fennec/arm/mozconfig
@@ -7,6 +7,12 @@ ac_add_options --disable-javaxpcom
ac_add_options --enable-system-cairo
ac_add_options --with-system-zlib
ac_add_options --with-system-jpeg
+ac_add_options --disable-necko-wifi
+ac_add_options --disable-maintainer-mode
+ac_add_options --disable-dependency-tracking
+ac_add_options --disable-silent-rules
+ac_add_options --disable-elf-dynstr-gc
+ac_add_options --disable-elf-hack
ac_add_app_options xulrunner --with-arm-kuser
ac_add_app_options xulrunner --enable-application=xulrunner
diff --git a/recipes/mozilla/fennec/cross-config.patch b/recipes/mozilla/fennec/cross-config.patch
new file mode 100644
index 0000000000..7eaba89c45
--- /dev/null
+++ b/recipes/mozilla/fennec/cross-config.patch
@@ -0,0 +1,29 @@
+We need to override setting variables so we check if the vars are already
+set then we do not reset them here
+
+-Khem
+
+Index: mozilla-central/build/autoconf/pkg.m4
+===================================================================
+--- mozilla-central.orig/build/autoconf/pkg.m4
++++ mozilla-central/build/autoconf/pkg.m4
+@@ -23,12 +23,16 @@ AC_DEFUN([PKG_CHECK_MODULES],
+ succeeded=yes
+
+ AC_MSG_CHECKING($1_CFLAGS)
+- $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
++ if test -z "$$1_CFLAGS"; then
++ $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
++ fi
+ AC_MSG_RESULT($$1_CFLAGS)
+
+ AC_MSG_CHECKING($1_LIBS)
+- ## Remove evil flags like -Wl,--export-dynamic
+- $1_LIBS="`$PKG_CONFIG --libs \"$2\" |sed s/-Wl,--export-dynamic//g`"
++ if test -z "$$1_LIBS"; then
++ ## Remove evil flags like -Wl,--export-dynamic
++ $1_LIBS="`$PKG_CONFIG --libs \"$2\" |sed s/-Wl,--export-dynamic//g`"
++ fi
+ AC_MSG_RESULT($$1_LIBS)
+ else
+ $1_CFLAGS=""
diff --git a/recipes/mozilla/fennec/fennec-uclibc.patch b/recipes/mozilla/fennec/fennec-uclibc.patch
new file mode 100644
index 0000000000..344aad3197
--- /dev/null
+++ b/recipes/mozilla/fennec/fennec-uclibc.patch
@@ -0,0 +1,84 @@
+uClibc does not have backtrace support and RTLD_NOLOAD support
+So we disable them for uClibc
+
+-Khem
+
+Index: mozilla-central/memory/mozalloc/mozalloc.cpp
+===================================================================
+--- mozilla-central.orig/memory/mozalloc/mozalloc.cpp
++++ mozilla-central/memory/mozalloc/mozalloc.cpp
+@@ -236,7 +236,7 @@ moz_malloc_usable_size(void *ptr)
+ if (!ptr)
+ return 0;
+
+-#if defined(MOZ_MEMORY)
++#if defined(MOZ_MEMORY) && !defined(__UCLIBC__)
+ return malloc_usable_size(ptr);
+ #elif defined(XP_MACOSX)
+ return malloc_size(ptr);
+Index: mozilla-central/xpcom/threads/nsThread.cpp
+===================================================================
+--- mozilla-central.orig/xpcom/threads/nsThread.cpp
++++ mozilla-central/xpcom/threads/nsThread.cpp
+@@ -52,9 +52,11 @@
+
+ #if defined(XP_UNIX) && !defined(ANDROID) && !defined(DEBUG) && HAVE_UALARM \
+ && defined(_GNU_SOURCE)
+-# define MOZ_CANARY
+ # include <unistd.h>
++#if !defined(__UCLIBC__)
++# define MOZ_CANARY
+ # include <execinfo.h>
++#endif
+ # include <signal.h>
+ # include <fcntl.h>
+ # include "nsXULAppAPI.h"
+Index: mozilla-central/ipc/chromium/src/base/debug_util_posix.cc
+===================================================================
+--- mozilla-central.orig/ipc/chromium/src/base/debug_util_posix.cc
++++ mozilla-central/ipc/chromium/src/base/debug_util_posix.cc
+@@ -11,7 +11,7 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+-#ifndef ANDROID
++#if !defined ANDROID && !defined __UCLIBC__
+ #include <execinfo.h>
+ #include <sys/sysctl.h>
+ #endif
+@@ -119,7 +119,7 @@ StackTrace::StackTrace() {
+ const int kMaxCallers = 256;
+
+ void* callers[kMaxCallers];
+-#ifndef ANDROID
++#if !defined ANDROID && !defined __UCLIBC__
+ int count = backtrace(callers, kMaxCallers);
+ #else
+ int count = 0;
+@@ -138,7 +138,7 @@ StackTrace::StackTrace() {
+
+ void StackTrace::PrintBacktrace() {
+ fflush(stderr);
+-#ifndef ANDROID
++#if !defined ANDROID && !defined __UCLIBC__
+ backtrace_symbols_fd(&trace_[0], trace_.size(), STDERR_FILENO);
+ #endif
+ }
+Index: mozilla-central/security/nss/lib/freebl/stubs.c
+===================================================================
+--- mozilla-central.orig/security/nss/lib/freebl/stubs.c
++++ mozilla-central/security/nss/lib/freebl/stubs.c
+@@ -538,8 +538,13 @@ freebl_InitNSSUtil(void *lib)
+ /*
+ * fetch the library if it's loaded. For NSS it should already be loaded
+ */
++#ifdef __UCLIBC__
++#define freebl_getLibrary(libName) \
++ dlopen (libName, RTLD_LAZY)
++#else
+ #define freebl_getLibrary(libName) \
+ dlopen (libName, RTLD_LAZY|RTLD_NOLOAD)
++#endif
+
+ #define freebl_releaseLibrary(lib) \
+ if (lib) dlclose(lib)
diff --git a/recipes/mozilla/fennec/jsautocfg-dontoverwrite.patch b/recipes/mozilla/fennec/jsautocfg-dontoverwrite.patch
index b3188de32f..c2bc964dd1 100644
--- a/recipes/mozilla/fennec/jsautocfg-dontoverwrite.patch
+++ b/recipes/mozilla/fennec/jsautocfg-dontoverwrite.patch
@@ -1,17 +1,19 @@
---- /tmp/Makefile.in 2009-03-20 10:34:54.000000000 +0100
-+++ mozilla-central/js/src/Makefile.in 2009-03-20 10:35:18.000000000 +0100
-@@ -507,20 +507,8 @@
+Index: mozilla-central/js/src/Makefile.in
+===================================================================
+--- mozilla-central.orig/js/src/Makefile.in
++++ mozilla-central/js/src/Makefile.in
+@@ -739,20 +739,8 @@ endif
export:: jsautocfg.h
-ifeq (,$(CROSS_COMPILE)$(GNU_CC)$(filter-out WINNT,$(OS_ARCH)))
--jsautocfg.h:
-- touch $@
--else
--ifeq ($(OS_ARCH),WINCE)
jsautocfg.h:
touch $@
-else
+-ifeq ($(OS_ARCH),WINCE)
+-jsautocfg.h:
+- touch $@
+-else
-jsautocfg.h: jscpucfg$(HOST_BIN_SUFFIX)
- @rm -f $@ jsautocfg.tmp
- ./jscpucfg > jsautocfg.tmp
diff --git a/recipes/mozilla/fennec/libffi-arm-softfloat.patch b/recipes/mozilla/fennec/libffi-arm-softfloat.patch
new file mode 100644
index 0000000000..b9f70cd3bf
--- /dev/null
+++ b/recipes/mozilla/fennec/libffi-arm-softfloat.patch
@@ -0,0 +1,290 @@
+This is a backport from upstream libffi so get it working on
+ARM with and without VFP
+
+-Khem
+
+Index: mozilla-central/js/src/ctypes/libffi/src/arm/sysv.S
+===================================================================
+--- mozilla-central.orig/js/src/ctypes/libffi/src/arm/sysv.S
++++ mozilla-central/js/src/ctypes/libffi/src/arm/sysv.S
+@@ -1,5 +1,6 @@
+ /* -----------------------------------------------------------------------
+- sysv.S - Copyright (c) 1998, 2008 Red Hat, Inc.
++ sysv.S - Copyright (c) 1998, 2008, 2011 Red Hat, Inc.
++ Copyright (c) 2011 Plausible Labs Cooperative, Inc.
+
+ ARM Foreign Function Interface
+
+@@ -39,7 +40,11 @@
+ #else
+ #define CNAME(x) x
+ #endif
++#ifdef __APPLE__
++#define ENTRY(x) .globl CNAME(x); CNAME(x):
++#else
+ #define ENTRY(x) .globl CNAME(x); .type CNAME(x),%function; CNAME(x):
++#endif /* __APPLE__ */
+ #endif
+
+ #ifdef __ELF__
+@@ -48,6 +53,12 @@
+ #define LSYM(x) x
+ #endif
+
++/* Use the SOFTFP return value ABI on Mac OS X, as per the iOS ABI
++ Function Call Guide */
++#ifdef __APPLE__
++#define __SOFTFP__
++#endif
++
+ /* We need a better way of testing for this, but for now, this is all
+ we can do. */
+ @ This selects the minimum architecture level required.
+@@ -105,21 +116,33 @@
+ .align 0
+ .thumb
+ .thumb_func
++#ifdef __APPLE__
++ ENTRY($0)
++#else
+ ENTRY(\name)
++#endif
+ bx pc
+ nop
+ .arm
+ UNWIND .fnstart
+ /* A hook to tell gdb that we've switched to ARM mode. Also used to call
+ directly from other local arm routines. */
+-_L__\name:
++#ifdef __APPLE__
++_L__$0:
++#else
++_L__\name:
++#endif
+ .endm
+ #else
+ .macro ARM_FUNC_START name
+ .text
+ .align 0
+ .arm
++#ifdef __APPLE__
++ ENTRY($0)
++#else
+ ENTRY(\name)
++#endif
+ UNWIND .fnstart
+ .endm
+ #endif
+@@ -141,8 +164,7 @@ _L__\name:
+ #endif
+ .endm
+
+-
+- @ r0: fn
++ @ r0: ffi_prep_args
+ @ r1: &ecif
+ @ r2: cif->bytes
+ @ r3: fig->flags
+@@ -222,12 +244,98 @@ ARM_FUNC_START ffi_call_SYSV
+ #endif
+
+ LSYM(Lepilogue):
+- RETLDM "r0-r3,fp"
++#if defined (__INTERWORKING__)
++ ldmia sp!, {r0-r3,fp, lr}
++ bx lr
++#else
++ ldmia sp!, {r0-r3,fp, pc}
++#endif
+
+ .ffi_call_SYSV_end:
+ UNWIND .fnend
++#ifdef __ELF__
+ .size CNAME(ffi_call_SYSV),.ffi_call_SYSV_end-CNAME(ffi_call_SYSV)
++#endif
++
++
++/*
++ unsigned int FFI_HIDDEN
++ ffi_closure_SYSV_inner (closure, respp, args)
++ ffi_closure *closure;
++ void **respp;
++ void *args;
++*/
++
++ARM_FUNC_START ffi_closure_SYSV
++ UNWIND .pad #16
++ add ip, sp, #16
++ stmfd sp!, {ip, lr}
++ UNWIND .save {r0, lr}
++ add r2, sp, #8
++ UNWIND .pad #16
++ sub sp, sp, #16
++ str sp, [sp, #8]
++ add r1, sp, #8
++ bl CNAME(ffi_closure_SYSV_inner)
++ cmp r0, #FFI_TYPE_INT
++ beq .Lretint
++
++ cmp r0, #FFI_TYPE_FLOAT
++#if defined(__SOFTFP__) || defined(__ARM_EABI__)
++ beq .Lretint
++#else
++ beq .Lretfloat
++#endif
++
++ cmp r0, #FFI_TYPE_DOUBLE
++#if defined(__SOFTFP__) || defined(__ARM_EABI__)
++ beq .Lretlonglong
++#else
++ beq .Lretdouble
++#endif
++
++ cmp r0, #FFI_TYPE_LONGDOUBLE
++#if defined(__SOFTFP__) || defined(__ARM_EABI__)
++ beq .Lretlonglong
++#else
++ beq .Lretlongdouble
++#endif
++
++ cmp r0, #FFI_TYPE_SINT64
++ beq .Lretlonglong
++.Lclosure_epilogue:
++ add sp, sp, #16
++ ldmfd sp, {sp, pc}
++.Lretint:
++ ldr r0, [sp]
++ b .Lclosure_epilogue
++.Lretlonglong:
++ ldr r0, [sp]
++ ldr r1, [sp, #4]
++ b .Lclosure_epilogue
+
++#if !defined(__SOFTFP__) && !defined(__ARM_EABI__)
++.Lretfloat:
++ ldfs f0, [sp]
++ b .Lclosure_epilogue
++.Lretdouble:
++ ldfd f0, [sp]
++ b .Lclosure_epilogue
++.Lretlongdouble:
++ ldfd f0, [sp]
++ b .Lclosure_epilogue
++#endif
++
++.ffi_closure_SYSV_end:
++ UNWIND .fnend
++#ifdef __ELF__
++ .size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV)
++#endif
++
++
++/* Below are VFP hard-float ABI call and closure implementations.
++ Add VFP FPU directive here. */
++ .fpu vfp
+
+ @ r0: fn
+ @ r1: &ecif
+@@ -294,7 +402,7 @@ LSYM(Lbase_args):
+ @ assume no return value.
+ cmp r2, #0
+ beq LSYM(Lepilogue_vfp)
+-
++
+ cmp r3, #FFI_TYPE_INT
+ streq r0, [r2]
+ beq LSYM(Lepilogue_vfp)
+@@ -321,79 +429,6 @@ LSYM(Lepilogue_vfp):
+ .ffi_call_VFP_end:
+ UNWIND .fnend
+ .size CNAME(ffi_call_VFP),.ffi_call_VFP_end-CNAME(ffi_call_VFP)
+-
+-
+-/*
+- unsigned int FFI_HIDDEN
+- ffi_closure_SYSV_inner (closure, respp, args)
+- ffi_closure *closure;
+- void **respp;
+- void *args;
+-*/
+-
+-ARM_FUNC_START ffi_closure_SYSV
+- UNWIND .pad #16
+- add ip, sp, #16
+- stmfd sp!, {ip, lr}
+- UNWIND .save {r0, lr}
+- add r2, sp, #8
+- .pad #16
+- sub sp, sp, #16
+- str sp, [sp, #8]
+- add r1, sp, #8
+- bl ffi_closure_SYSV_inner
+- cmp r0, #FFI_TYPE_INT
+- beq .Lretint
+-
+- cmp r0, #FFI_TYPE_FLOAT
+-#if defined(__SOFTFP__) || defined(__ARM_EABI__)
+- beq .Lretint
+-#else
+- beq .Lretfloat
+-#endif
+-
+- cmp r0, #FFI_TYPE_DOUBLE
+-#if defined(__SOFTFP__) || defined(__ARM_EABI__)
+- beq .Lretlonglong
+-#else
+- beq .Lretdouble
+-#endif
+-
+- cmp r0, #FFI_TYPE_LONGDOUBLE
+-#if defined(__SOFTFP__) || defined(__ARM_EABI__)
+- beq .Lretlonglong
+-#else
+- beq .Lretlongdouble
+-#endif
+-
+- cmp r0, #FFI_TYPE_SINT64
+- beq .Lretlonglong
+-.Lclosure_epilogue:
+- add sp, sp, #16
+- ldmfd sp, {sp, pc}
+-.Lretint:
+- ldr r0, [sp]
+- b .Lclosure_epilogue
+-.Lretlonglong:
+- ldr r0, [sp]
+- ldr r1, [sp, #4]
+- b .Lclosure_epilogue
+-
+-#if !defined(__SOFTFP__) && !defined(__ARM_EABI__)
+-.Lretfloat:
+- ldfs f0, [sp]
+- b .Lclosure_epilogue
+-.Lretdouble:
+- ldfd f0, [sp]
+- b .Lclosure_epilogue
+-.Lretlongdouble:
+- ldfd f0, [sp]
+- b .Lclosure_epilogue
+-#endif
+-
+-.ffi_closure_SYSV_end:
+- UNWIND .fnend
+- .size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV)
+
+
+ ARM_FUNC_START ffi_closure_VFP
+@@ -405,7 +440,7 @@ ARM_FUNC_START ffi_closure_VFP
+ UNWIND .save {r0, lr}
+ add r2, sp, #72
+ add r3, sp, #8
+- .pad #72
++ UNWIND .pad #72
+ sub sp, sp, #72
+ str sp, [sp, #64]
+ add r1, sp, #64
+@@ -460,3 +495,4 @@ ARM_FUNC_START ffi_closure_VFP
+ #if defined __ELF__ && defined __linux__
+ .section .note.GNU-stack,"",%progbits
+ #endif
++
diff --git a/recipes/mozilla/fennec/mozconfig b/recipes/mozilla/fennec/mozconfig
index 7696f78a9c..356cd35cec 100644
--- a/recipes/mozilla/fennec/mozconfig
+++ b/recipes/mozilla/fennec/mozconfig
@@ -8,6 +8,12 @@ ac_add_options --enable-system-cairo
ac_add_options --with-system-zlib
ac_add_options --with-system-bz2
ac_add_options --with-system-jpeg
+ac_add_options --disable-necko-wifi
+ac_add_options --disable-maintainer-mode
+ac_add_options --disable-dependency-tracking
+ac_add_options --disable-silent-rules
+ac_add_options --disable-elf-dynstr-gc
+ac_add_options --disable-elf-hack
ac_add_app_options xulrunner --enable-application=xulrunner
diff --git a/recipes/mozilla/fennec/prune-lintl.patch b/recipes/mozilla/fennec/prune-lintl.patch
new file mode 100644
index 0000000000..37ebb6cf51
--- /dev/null
+++ b/recipes/mozilla/fennec/prune-lintl.patch
@@ -0,0 +1,33 @@
+on uclibc we add -lintl and it will get into host libs too
+and on host machines based on glibc it will complain on linking
+host libraried. So we prune out -lintl
+
+-Khem
+
+Index: mozilla-central/build/autoconf/glib.m4
+===================================================================
+--- mozilla-central.orig/build/autoconf/glib.m4
++++ mozilla-central/build/autoconf/glib.m4
+@@ -53,7 +53,8 @@ AC_ARG_ENABLE(glibtest, [ --disable-gli
+ no_glib=yes
+ else
+ GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
+- GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
++ GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs | \
++ sed 's/\-lintl//g'`
+ glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
+Index: mozilla-central/configure.in
+===================================================================
+--- mozilla-central.orig/configure.in
++++ mozilla-central/configure.in
+@@ -8495,7 +8495,7 @@ then
+ else
+ AC_MSG_ERROR([Cannot find $_LIBIDL_PREFIX_DIR/lib/libidl-0.6.lib or $_LIBIDL_PREFIX_DIR/lib/libidl-0.6_s.lib])
+ fi
+- HOST_LIBIDL_LIBS="${HOST_LIBIDL_LIBS} ${GLIB_LIBS}"
++ HOST_LIBIDL_LIBS="`echo ${HOST_LIBIDL_LIBS} | sed -e s/\-lintl//g` ${GLIB_LIBS}"
+ _LIBIDL_FOUND=1
+ ;;
+ esac
diff --git a/recipes/mozilla/fennec/uclibc-isfinite.patch b/recipes/mozilla/fennec/uclibc-isfinite.patch
new file mode 100644
index 0000000000..c0f6696b33
--- /dev/null
+++ b/recipes/mozilla/fennec/uclibc-isfinite.patch
@@ -0,0 +1,70 @@
+finite() is obsolete and we should use isfinite() anyway
+may be submit it upstream
+
+-Khem
+
+Index: mozilla-central/js/src/jsnum.h
+===================================================================
+--- mozilla-central.orig/js/src/jsnum.h
++++ mozilla-central/js/src/jsnum.h
+@@ -101,7 +101,7 @@ JSDOUBLE_IS_FINITE(jsdouble d)
+ #ifdef WIN32
+ return _finite(d);
+ #else
+- return finite(d);
++ return isfinite(d);
+ #endif
+ }
+
+Index: mozilla-central/content/base/public/nsContentUtils.h
+===================================================================
+--- mozilla-central.orig/content/base/public/nsContentUtils.h
++++ mozilla-central/content/base/public/nsContentUtils.h
+@@ -1928,7 +1928,7 @@ inline NS_HIDDEN_(PRBool) NS_FloatIsFini
+ #ifdef WIN32
+ return _finite(f);
+ #else
+- return finite(f);
++ return isfinite(f);
+ #endif
+ }
+
+Index: mozilla-central/content/canvas/src/nsCanvasRenderingContext2D.cpp
+===================================================================
+--- mozilla-central.orig/content/canvas/src/nsCanvasRenderingContext2D.cpp
++++ mozilla-central/content/canvas/src/nsCanvasRenderingContext2D.cpp
+@@ -159,7 +159,7 @@ DoubleIsFinite(double d)
+ // NOTE: '!!' casts an int to bool without spamming MSVC warning C4800.
+ return !!_finite(d);
+ #else
+- return finite(d);
++ return isfinite(d);
+ #endif
+ }
+
+Index: mozilla-central/ipc/chromium/src/base/float_util.h
+===================================================================
+--- mozilla-central.orig/ipc/chromium/src/base/float_util.h
++++ mozilla-central/ipc/chromium/src/base/float_util.h
+@@ -14,7 +14,7 @@ namespace base {
+
+ inline bool IsFinite(const double& number) {
+ #if defined(OS_POSIX)
+- return finite(number) != 0;
++ return isfinite(number) != 0;
+ #elif defined(OS_WIN)
+ return _finite(number) != 0;
+ #endif
+Index: mozilla-central/js/src/ctypes/CTypes.cpp
+===================================================================
+--- mozilla-central.orig/js/src/ctypes/CTypes.cpp
++++ mozilla-central/js/src/ctypes/CTypes.cpp
+@@ -464,7 +464,7 @@ static inline bool FloatIsFinite(jsdoubl
+ #ifdef WIN32
+ return _finite(f) != 0;
+ #else
+- return finite(f);
++ return isfinite(f);
+ #endif
+ }
+
diff --git a/recipes/mozilla/fennec_hg.bb b/recipes/mozilla/fennec_hg.bb
index 5bfd0d31f7..7075fd9396 100644
--- a/recipes/mozilla/fennec_hg.bb
+++ b/recipes/mozilla/fennec_hg.bb
@@ -1,12 +1,16 @@
DESCRIPTION = "Mozilla Mobile browser"
PV = "2.0+${MOZPV}"
-MOZPV = "4.0b3pre"
+MOZPV = "4.0b5"
PR = "r0"
PE = "1"
-
-SRC_URI = "hg://hg.mozilla.org;module=mozilla-central;rev=e2bc7992d304 \
- hg://hg.mozilla.org;module=mobile-browser;rev=051c9709248b \
+SRCREV = "FENNEC_4_0b5_RELEASE"
+SRC_URI = "hg://hg.mozilla.org;module=mozilla-central;rev=${SRCREV} \
+ hg://hg.mozilla.org;module=mobile-browser;rev=${SRCREV} \
+ file://fennec-uclibc.patch \
+ file://libffi-arm-softfloat.patch \
+ file://uclibc-isfinite.patch \
+ file://cross-config.patch \
file://jsautocfg.h \
file://jsautocfg-dontoverwrite.patch \
"
@@ -16,13 +20,27 @@ S = "${WORKDIR}/mozilla-central"
inherit mozilla
require firefox.inc
-DEPENDS += "libnotify autoconf213-native cairo alsa-lib sqlite3"
+DEPENDS += "yasm-native libnotify autoconf213-native cairo alsa-lib sqlite3 mesa gconf"
FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2"
export LIBXUL_DIST="${S}/objdir/xulrunner/dist/"
+
CFLAGS_append = " -DMOZ_GFX_OPTIMIZE_MOBILE "
+# We need to append -L<sysroot>/usr/lib to LDFLAGS otherwise
+# it starts picking dependencies from /usr/lib if
+# EXTRA_DSO_LDOPTS contains libraries like -lgconf-2
+# then the make looks it up in VPATH and sysroot
+# does not appear in VPATH and it wont find it if
+# build host does not have a library in its /usr/lib
+#
+
+LDFLAGS += "-L${STAGING_LIBDIR}"
+#EXTRA_OEMAKE += "EXTRA_DSO_LDOPTS=-L${STAGING_LIBDIR}"
+
+EXTRA_OECONF_append_arm = " --with-cpu-arch=${BASE_PACKAGE_ARCH} "
+
do_configure_prepend() {
if [ -e ${WORKDIR}/mobile-browser ] ; then
mv ${WORKDIR}/mobile-browser ${S}/mobile
@@ -66,10 +84,4 @@ do_install() {
install -m 0644 ${WORKDIR}/mozilla-${PN}.png ${D}${datadir}/pixmaps/
}
-do_stage() {
- :
-}
-
-
FILES_${PN} += "${libdir}/fennec"
-