summaryrefslogtreecommitdiff
path: root/meta/packages
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages')
-rw-r--r--meta/packages/js/files/configure.ac28
-rw-r--r--meta/packages/js/files/jsautocfg.h104
-rw-r--r--meta/packages/js/js_1.7.0+1.8.0rc1.bb19
3 files changed, 102 insertions, 49 deletions
diff --git a/meta/packages/js/files/configure.ac b/meta/packages/js/files/configure.ac
new file mode 100644
index 000000000..41af29845
--- /dev/null
+++ b/meta/packages/js/files/configure.ac
@@ -0,0 +1,28 @@
+AC_INIT
+
+AC_CHECK_SIZEOF([char])
+AC_CHECK_SIZEOF([short])
+AC_CHECK_SIZEOF([int])
+AC_CHECK_SIZEOF([int64_t])
+AC_CHECK_SIZEOF([long])
+AC_CHECK_SIZEOF([long long])
+AC_CHECK_SIZEOF([int *])
+AC_CHECK_SIZEOF([float])
+AC_CHECK_SIZEOF([double])
+
+AC_CHECK_ALIGNOF([char])
+AC_CHECK_ALIGNOF([short])
+AC_CHECK_ALIGNOF([int])
+AC_CHECK_ALIGNOF([int64_t])
+AC_CHECK_ALIGNOF([long])
+AC_CHECK_ALIGNOF([long long])
+AC_CHECK_ALIGNOF([int *])
+AC_CHECK_ALIGNOF([float])
+AC_CHECK_ALIGNOF([double])
+
+AC_C_BIGENDIAN
+
+AC_TYPE_LONG_LONG_INT
+
+AC_CONFIG_HEADER([conf.h])
+AC_OUTPUT
diff --git a/meta/packages/js/files/jsautocfg.h b/meta/packages/js/files/jsautocfg.h
index efaf807ac..16e38bf8d 100644
--- a/meta/packages/js/files/jsautocfg.h
+++ b/meta/packages/js/files/jsautocfg.h
@@ -3,52 +3,72 @@
/* AUTOMATICALLY GENERATED - DO NOT EDIT */
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-
-#define JS_BYTES_PER_BYTE 1L
-#define JS_BYTES_PER_SHORT 2L
-#define JS_BYTES_PER_INT 4L
-#define JS_BYTES_PER_INT64 8L
-#define JS_BYTES_PER_LONG 8L
-#define JS_BYTES_PER_FLOAT 4L
-#define JS_BYTES_PER_DOUBLE 8L
-#define JS_BYTES_PER_WORD 4L
-#define JS_BYTES_PER_DWORD 8L
+#include "../conf.h"
+
+#ifdef WORDS_BIGENDIAN
+# undef IS_LITTLE_ENDIAN
+# define IS_BIG_ENDIAN 1
+#else
+# define IS_LITTLE_ENDIAN 1
+# undef IS_BIG_ENDIAN
+#endif
+
+#define __I_LOG2(n) ( \
+ ((n) == 1)? 0: \
+ ((n) == 2)? 1: \
+ ((n) == 4)? 2: \
+ ((n) == 8)? 3: \
+ ((n) == 16)? 4: \
+ ((n) == 32)? 5: \
+ ((n) == 64)? 6: \
+ ((n) == 128)? 7: \
+ -1)
+
+#define JS_BYTES_PER_BYTE SIZEOF_CHAR
+#define JS_BYTES_PER_SHORT SIZEOF_SHORT
+#define JS_BYTES_PER_INT SIZEOF_INT
+#define JS_BYTES_PER_INT64 SIZEOF_INT64_T
+#define JS_BYTES_PER_LONG SIZEOF_LONG
+#define JS_BYTES_PER_FLOAT SIZEOF_FLOAT
+#define JS_BYTES_PER_DOUBLE SIZEOF_DOUBLE
+#define JS_BYTES_PER_WORD SIZEOF_LONG
+#define JS_BYTES_PER_DWORD SIZEOF_LONG_LONG
#define JS_BITS_PER_BYTE 8L
-#define JS_BITS_PER_SHORT 16L
-#define JS_BITS_PER_INT 32L
-#define JS_BITS_PER_INT64 64L
-#define JS_BITS_PER_LONG 64L
-#define JS_BITS_PER_FLOAT 32L
-#define JS_BITS_PER_DOUBLE 64L
-#define JS_BITS_PER_WORD 32L
-
-#define JS_BITS_PER_BYTE_LOG2 3L
-#define JS_BITS_PER_SHORT_LOG2 4L
-#define JS_BITS_PER_INT_LOG2 5L
-#define JS_BITS_PER_INT64_LOG2 6L
-#define JS_BITS_PER_LONG_LOG2 6L
-#define JS_BITS_PER_FLOAT_LOG2 5L
-#define JS_BITS_PER_DOUBLE_LOG2 6L
-#define JS_BITS_PER_WORD_LOG2 3L
-
-#define JS_ALIGN_OF_SHORT 2L
-#define JS_ALIGN_OF_INT 4L
-#define JS_ALIGN_OF_LONG 8L
-#define JS_ALIGN_OF_INT64 8L
-#define JS_ALIGN_OF_FLOAT 4L
-#define JS_ALIGN_OF_DOUBLE 8L
-#define JS_ALIGN_OF_POINTER 8L
-#define JS_ALIGN_OF_WORD 4L
-
-#define JS_BYTES_PER_WORD_LOG2 2L
-#define JS_BYTES_PER_DWORD_LOG2 3L
-#define JS_WORDS_PER_DWORD_LOG2 0L
+#define JS_BITS_PER_SHORT (JS_BITS_PER_BYTE * JS_BYTES_PER_SHORT)
+#define JS_BITS_PER_INT (JS_BITS_PER_BYTE * JS_BYTES_PER_INT)
+#define JS_BITS_PER_INT64 (JS_BITS_PER_BYTE * JS_BYTES_PER_INT64)
+#define JS_BITS_PER_LONG (JS_BITS_PER_BYTE * JS_BYTES_PER_LONG)
+#define JS_BITS_PER_FLOAT (JS_BITS_PER_BYTE * JS_BYTES_PER_GLOAT)
+#define JS_BITS_PER_DOUBLE (JS_BITS_PER_BYTE * JS_BYTES_PER_DOUBLE)
+#define JS_BITS_PER_WORD (JS_BITS_PER_BYTE * JS_BYTES_PER_WORD)
+
+#define JS_BITS_PER_BYTE_LOG2 __I_LOG2(JS_BITS_PER_BYTE)
+#define JS_BITS_PER_SHORT_LOG2 __I_LOG2(JS_BITS_PER_BYTE)
+#define JS_BITS_PER_INT_LOG2 __I_LOG2(JS_BITS_PER_BYTE)
+#define JS_BITS_PER_INT64_LOG2 __I_LOG2(JS_BITS_PER_BYTE)
+#define JS_BITS_PER_LONG_LOG2 __I_LOG2(JS_BITS_PER_BYTE)
+#define JS_BITS_PER_FLOAT_LOG2 __I_LOG2(JS_BITS_PER_BYTE)
+#define JS_BITS_PER_DOUBLE_LOG2 __I_LOG2(JS_BITS_PER_BYTE)
+#define JS_BITS_PER_WORD_LOG2 __I_LOG2(JS_BITS_PER_BYTE)
+
+#define JS_ALIGN_OF_SHORT ALIGNOF_SHORT
+#define JS_ALIGN_OF_INT ALIGNOF_INT
+#define JS_ALIGN_OF_LONG ALIGNOF_LONG
+#define JS_ALIGN_OF_INT64 ALIGNOF_INT64_T
+#define JS_ALIGN_OF_FLOAT ALIGNOF_FLOAT
+#define JS_ALIGN_OF_DOUBLE ALIGNOF_DOUBLE
+#define JS_ALIGN_OF_POINTER ALIGNOF_INT_P
+#define JS_ALIGN_OF_WORD ALIGNOF_LONG
+
+#define JS_BYTES_PER_WORD_LOG2 __I_LOG2(JS_BYTES_PER_WORD)
+#define JS_BYTES_PER_DWORD_LOG2 __I_LOG2(JS_BYTES_PER_DWORDS)
+#define JS_WORDS_PER_DWORD_LOG2 __I_LOG2(JS_BYTES_PER_DWORDS / JS_BYTES_PER_WORD)
#define JS_STACK_GROWTH_DIRECTION (-1)
-#define JS_HAVE_LONG_LONG
+#ifdef HAVE_LONG_LONG_INT
+# define JS_HAVE_LONG_LONG
+#endif
#endif /* js_cpucfg___ */
diff --git a/meta/packages/js/js_1.7.0+1.8.0rc1.bb b/meta/packages/js/js_1.7.0+1.8.0rc1.bb
index 36ad11d1f..97cba90d0 100644
--- a/meta/packages/js/js_1.7.0+1.8.0rc1.bb
+++ b/meta/packages/js/js_1.7.0+1.8.0rc1.bb
@@ -5,26 +5,31 @@ SECTION = "libs"
# the package is licensed under either of the following
LICENSE = "MPL1.1 | GPLv2+ | LGPLv2.1+"
LIC_FILES_CHKSUM = "file://jsapi.c;beginline=4;endline=39;md5=347c6bbf4fb4547de1fa5ad830030063"
-PR = "r0"
+PR = "r1"
SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/js/js-1.8.0-rc1.tar.gz \
file://link_with_gcc.patch \
file://usepic.patch \
file://buildcc.patch;striplevel=2 \
- file://jsautocfg.h"
+ file://jsautocfg.h \
+ file://configure.ac"
S = "${WORKDIR}/js/src"
+# use local autoconf script to generate a usable jsautocfg.h
+# don't bother with automake
+inherit autotools
+
+do_configure_prepend() {
+ cp -f ${WORKDIR}/configure.ac ${S}
+ cp -f ${WORKDIR}/jsautocfg.h ${S}
+}
+
EXTRA_OEMAKE = "'CC=${CC}' 'LD=${LD}' 'XCFLAGS=${CFLAGS}' 'XLDFLAGS=${LDFLAGS} -Wl,-soname=libjs' \
'BUILD_CC=${BUILD_CC}' 'BUILD_CFLAGS=${BUILD_CFLAGS}' 'BUILD_LDFLAGS=${BUILD_LDFLAGS}'"
PARALLEL_MAKE = ""
-# XXX: this is only guaranteed to work for i386 targets!
-do_compile_prepend() {
- cp ${WORKDIR}/jsautocfg.h ${S}/
-}
-
do_compile() {
oe_runmake -f Makefile.ref JS_EDITLINE=1 PREBUILT_CPUCFG=1 BUILD_OPT=1
}