From 800f4bd6f9fa18ed68f14f5e6e12be3499fb8038 Mon Sep 17 00:00:00 2001 From: Armin Kuster Date: Sat, 20 Oct 2018 15:07:23 +0100 Subject: nspr: Update to 4.20 RISC-v support now included in this release so drop patch. and refresh patches Signed-off-by: Armin Kuster --- .../nspr/nspr/0002-Add-nios2-support.patch | 25 ++- ...e-definitions-for-the-RISC-V-architecture.patch | 150 ---------------- .../nspr/nspr/remove-rpath-from-tests.patch | 2 +- meta/recipes-support/nspr/nspr_4.19.bb | 194 --------------------- meta/recipes-support/nspr/nspr_4.20.bb | 193 ++++++++++++++++++++ 5 files changed, 205 insertions(+), 359 deletions(-) delete mode 100644 meta/recipes-support/nspr/nspr/0003-Add-type-definitions-for-the-RISC-V-architecture.patch delete mode 100644 meta/recipes-support/nspr/nspr_4.19.bb create mode 100644 meta/recipes-support/nspr/nspr_4.20.bb (limited to 'meta/recipes-support') diff --git a/meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch b/meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch index 23228067ec..3a04d426a8 100644 --- a/meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch +++ b/meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch @@ -12,11 +12,11 @@ Upstream-Status: Submitted [ https://bugzilla.mozilla.org/show_bug.cgi?id=124442 nspr/pr/include/md/_linux.h | 14 ++++++++++++++ 2 files changed, 59 insertions(+) -diff --git a/pr/include/md/_linux.cfg b/nspr/pr/include/md/_linux.cfg -index 8cbf0cb..150676b 100644 ---- a/pr/include/md/_linux.cfg -+++ b/pr/include/md/_linux.cfg -@@ -972,6 +972,51 @@ +Index: nspr/pr/include/md/_linux.cfg +=================================================================== +--- nspr.orig/pr/include/md/_linux.cfg ++++ nspr/pr/include/md/_linux.cfg +@@ -975,6 +975,51 @@ #define PR_BYTES_PER_WORD_LOG2 2 #define PR_BYTES_PER_DWORD_LOG2 3 @@ -68,10 +68,10 @@ index 8cbf0cb..150676b 100644 #elif defined(__or1k__) #undef IS_LITTLE_ENDIAN -diff --git a/pr/include/md/_linux.h b/nspr/pr/include/md/_linux.h -index d378db5..18260be 100644 ---- a/pr/include/md/_linux.h -+++ b/pr/include/md/_linux.h +Index: nspr/pr/include/md/_linux.h +=================================================================== +--- nspr.orig/pr/include/md/_linux.h ++++ nspr/pr/include/md/_linux.h @@ -55,6 +55,8 @@ #define _PR_SI_ARCHITECTURE "avr32" #elif defined(__m32r__) @@ -80,8 +80,8 @@ index d378db5..18260be 100644 +#define _PR_SI_ARCHITECTURE "nios2" #elif defined(__or1k__) #define _PR_SI_ARCHITECTURE "or1k" - #else -@@ -125,6 +127,18 @@ extern PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval); + #elif defined(__riscv) && (__riscv_xlen == 32) +@@ -129,6 +131,18 @@ extern PRInt32 _PR_x86_64_AtomicSet(PRIn #define _MD_ATOMIC_SET _PR_x86_64_AtomicSet #endif @@ -100,6 +100,3 @@ index d378db5..18260be 100644 #if defined(__or1k__) #if defined(__GNUC__) /* Use GCC built-in functions */ --- -2.7.0.rc3 - diff --git a/meta/recipes-support/nspr/nspr/0003-Add-type-definitions-for-the-RISC-V-architecture.patch b/meta/recipes-support/nspr/nspr/0003-Add-type-definitions-for-the-RISC-V-architecture.patch deleted file mode 100644 index 47e1475e0e..0000000000 --- a/meta/recipes-support/nspr/nspr/0003-Add-type-definitions-for-the-RISC-V-architecture.patch +++ /dev/null @@ -1,150 +0,0 @@ -# HG changeset patch -# User Karsten Merker -# Date 1523974333 -7200 -# Node ID f47871e2aeb16b39d4f516690e25c81b04d6d05a -# Parent 776db96f834cb86e8863052201d55f60a2da91cb -Bug 1308584, Add type definitions for the RISC-V architecture, r=kaie - -Signed-off-by: Alistair Francis -[ Changes by AF: - - Rebase on other Yocto patches -] -Upstream-Status: Backport [ https://hg.mozilla.org/projects/nspr/rev/f47871e2aeb1 ] - -diff --git a/pr/include/md/_linux.cfg b/pr/include/md/_linux.cfg ---- a/pr/include/md/_linux.cfg -+++ b/pr/include/md/_linux.cfg -@@ -1015,16 +1015,108 @@ - #define PR_ALIGN_OF_FLOAT 4 - #define PR_ALIGN_OF_DOUBLE 4 - #define PR_ALIGN_OF_POINTER 4 - #define PR_ALIGN_OF_WORD 4 - - #define PR_BYTES_PER_WORD_LOG2 2 - #define PR_BYTES_PER_DWORD_LOG2 3 - -+#elif defined(__riscv) && (__riscv_xlen == 32) -+ -+#undef IS_BIG_ENDIAN -+#define IS_LITTLE_ENDIAN 1 -+#undef IS_64 -+ -+#define PR_BYTES_PER_BYTE 1 -+#define PR_BYTES_PER_SHORT 2 -+#define PR_BYTES_PER_INT 4 -+#define PR_BYTES_PER_INT64 8 -+#define PR_BYTES_PER_LONG 4 -+#define PR_BYTES_PER_FLOAT 4 -+#define PR_BYTES_PER_DOUBLE 8 -+#define PR_BYTES_PER_WORD 4 -+#define PR_BYTES_PER_DWORD 8 -+ -+#define PR_BITS_PER_BYTE 8 -+#define PR_BITS_PER_SHORT 16 -+#define PR_BITS_PER_INT 32 -+#define PR_BITS_PER_INT64 64 -+#define PR_BITS_PER_LONG 32 -+#define PR_BITS_PER_FLOAT 32 -+#define PR_BITS_PER_DOUBLE 64 -+#define PR_BITS_PER_WORD 32 -+ -+#define PR_BITS_PER_BYTE_LOG2 3 -+#define PR_BITS_PER_SHORT_LOG2 4 -+#define PR_BITS_PER_INT_LOG2 5 -+#define PR_BITS_PER_INT64_LOG2 6 -+#define PR_BITS_PER_LONG_LOG2 5 -+#define PR_BITS_PER_FLOAT_LOG2 5 -+#define PR_BITS_PER_DOUBLE_LOG2 6 -+#define PR_BITS_PER_WORD_LOG2 5 -+ -+#define PR_ALIGN_OF_SHORT 2 -+#define PR_ALIGN_OF_INT 4 -+#define PR_ALIGN_OF_LONG 4 -+#define PR_ALIGN_OF_INT64 8 -+#define PR_ALIGN_OF_FLOAT 4 -+#define PR_ALIGN_OF_DOUBLE 8 -+#define PR_ALIGN_OF_POINTER 4 -+#define PR_ALIGN_OF_WORD 4 -+ -+#define PR_BYTES_PER_WORD_LOG2 2 -+#define PR_BYTES_PER_DWORD_LOG2 3 -+ -+#elif defined(__riscv) && (__riscv_xlen == 64) -+ -+#undef IS_BIG_ENDIAN -+#define IS_LITTLE_ENDIAN 1 -+#define IS_64 -+ -+#define PR_BYTES_PER_BYTE 1 -+#define PR_BYTES_PER_SHORT 2 -+#define PR_BYTES_PER_INT 4 -+#define PR_BYTES_PER_INT64 8 -+#define PR_BYTES_PER_LONG 8 -+#define PR_BYTES_PER_FLOAT 4 -+#define PR_BYTES_PER_DOUBLE 8 -+#define PR_BYTES_PER_WORD 8 -+#define PR_BYTES_PER_DWORD 8 -+ -+#define PR_BITS_PER_BYTE 8 -+#define PR_BITS_PER_SHORT 16 -+#define PR_BITS_PER_INT 32 -+#define PR_BITS_PER_INT64 64 -+#define PR_BITS_PER_LONG 64 -+#define PR_BITS_PER_FLOAT 32 -+#define PR_BITS_PER_DOUBLE 64 -+#define PR_BITS_PER_WORD 64 -+ -+#define PR_BITS_PER_BYTE_LOG2 3 -+#define PR_BITS_PER_SHORT_LOG2 4 -+#define PR_BITS_PER_INT_LOG2 5 -+#define PR_BITS_PER_INT64_LOG2 6 -+#define PR_BITS_PER_LONG_LOG2 6 -+#define PR_BITS_PER_FLOAT_LOG2 5 -+#define PR_BITS_PER_DOUBLE_LOG2 6 -+#define PR_BITS_PER_WORD_LOG2 6 -+ -+#define PR_ALIGN_OF_SHORT 2 -+#define PR_ALIGN_OF_INT 4 -+#define PR_ALIGN_OF_LONG 8 -+#define PR_ALIGN_OF_INT64 8 -+#define PR_ALIGN_OF_FLOAT 4 -+#define PR_ALIGN_OF_DOUBLE 8 -+#define PR_ALIGN_OF_POINTER 8 -+#define PR_ALIGN_OF_WORD 8 -+ -+#define PR_BYTES_PER_WORD_LOG2 3 -+#define PR_BYTES_PER_DWORD_LOG2 3 -+ - #else - - #error "Unknown CPU architecture" - - #endif - - #ifndef HAVE_LONG_LONG - #define HAVE_LONG_LONG -diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h ---- a/pr/include/md/_linux.h -+++ b/pr/include/md/_linux.h -@@ -54,16 +54,20 @@ - #elif defined(__avr32__) - #define _PR_SI_ARCHITECTURE "avr32" - #elif defined(__m32r__) - #define _PR_SI_ARCHITECTURE "m32r" - #elif defined(__nios2__) - #define _PR_SI_ARCHITECTURE "nios2" - #elif defined(__or1k__) - #define _PR_SI_ARCHITECTURE "or1k" -+#elif defined(__riscv) && (__riscv_xlen == 32) -+#define _PR_SI_ARCHITECTURE "riscv32" -+#elif defined(__riscv) && (__riscv_xlen == 64) -+#define _PR_SI_ARCHITECTURE "riscv64" - #else - #error "Unknown CPU architecture" - #endif - #define PR_DLL_SUFFIX ".so" - - #define _PR_VMBASE 0x30000000 - #define _PR_STACK_VMBASE 0x50000000 - #define _MD_DEFAULT_STACK_SIZE 65536L - diff --git a/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch b/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch index ecc6d31874..7ba59ed644 100644 --- a/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch +++ b/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch @@ -15,7 +15,7 @@ Index: nspr/pr/tests/Makefile.in =================================================================== --- nspr.orig/pr/tests/Makefile.in +++ nspr/pr/tests/Makefile.in -@@ -315,7 +315,7 @@ ifeq ($(OS_ARCH), SunOS) +@@ -316,7 +316,7 @@ ifeq ($(OS_ARCH), SunOS) endif # SunOS ifeq (,$(filter-out Linux GNU GNU_%,$(OS_ARCH))) diff --git a/meta/recipes-support/nspr/nspr_4.19.bb b/meta/recipes-support/nspr/nspr_4.19.bb deleted file mode 100644 index 0212be7f40..0000000000 --- a/meta/recipes-support/nspr/nspr_4.19.bb +++ /dev/null @@ -1,194 +0,0 @@ -SUMMARY = "Netscape Portable Runtime Library" -HOMEPAGE = "http://www.mozilla.org/projects/nspr/" -LICENSE = "GPL-2.0 | MPL-2.0 | LGPL-2.1" -LIC_FILES_CHKSUM = "file://configure.in;beginline=3;endline=6;md5=90c2fdee38e45d6302abcfe475c8b5c5 \ - file://Makefile.in;beginline=4;endline=38;md5=beda1dbb98a515f557d3e58ef06bca99" -SECTION = "libs/network" - -SRC_URI = "http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz \ - file://remove-rpath-from-tests.patch \ - file://fix-build-on-x86_64.patch \ - file://remove-srcdir-from-configure-in.patch \ - file://0002-Add-nios2-support.patch \ - file://0001-md-Fix-build-with-musl.patch \ - file://0003-Add-type-definitions-for-the-RISC-V-architecture.patch \ - file://0004-Add-ARC-support.patch \ - file://nspr.pc.in \ -" - -CACHED_CONFIGUREVARS_append_libc-musl = " CFLAGS='${CFLAGS} -D_PR_POLL_AVAILABLE \ - -D_PR_HAVE_OFF64_T -D_PR_INET6 -D_PR_HAVE_INET_NTOP \ - -D_PR_HAVE_GETHOSTBYNAME2 -D_PR_HAVE_GETADDRINFO \ - -D_PR_INET6_PROBE -DNO_DLOPEN_NULL'" - -UPSTREAM_CHECK_URI = "http://ftp.mozilla.org/pub/nspr/releases/" -UPSTREAM_CHECK_REGEX = "v(?P\d+(\.\d+)+)/" - -SRC_URI[md5sum] = "e1d27282ad6286b69d6b9fd07201d3dd" -SRC_URI[sha256sum] = "2ed95917fa2277910d1d1cf36030607dccc0ba522bba08e2af13c113dcd8f729" - -CVE_PRODUCT = "netscape_portable_runtime" - -S = "${WORKDIR}/nspr-${PV}/nspr" - -RDEPENDS_${PN}-dev += "perl" -TARGET_CC_ARCH += "${LDFLAGS}" - -TESTS = " \ - accept \ - acceptread \ - acceptreademu \ - affinity \ - alarm \ - anonfm \ - atomic \ - attach \ - bigfile \ - cleanup \ - cltsrv \ - concur \ - cvar \ - cvar2 \ - dlltest \ - dtoa \ - errcodes \ - exit \ - fdcach \ - fileio \ - foreign \ - formattm \ - fsync \ - gethost \ - getproto \ - i2l \ - initclk \ - inrval \ - instrumt \ - intrio \ - intrupt \ - io_timeout \ - ioconthr \ - join \ - joinkk \ - joinku \ - joinuk \ - joinuu \ - layer \ - lazyinit \ - libfilename \ - lltest \ - lock \ - lockfile \ - logfile \ - logger \ - many_cv \ - multiwait \ - nameshm1 \ - nblayer \ - nonblock \ - ntioto \ - ntoh \ - op_2long \ - op_excl \ - op_filnf \ - op_filok \ - op_nofil \ - parent \ - parsetm \ - peek \ - perf \ - pipeping \ - pipeping2 \ - pipeself \ - poll_nm \ - poll_to \ - pollable \ - prftest \ - primblok \ - provider \ - prpollml \ - ranfile \ - randseed \ - reinit \ - rwlocktest \ - sel_spd \ - selct_er \ - selct_nm \ - selct_to \ - selintr \ - sema \ - semaerr \ - semaping \ - sendzlf \ - server_test \ - servr_kk \ - servr_uk \ - servr_ku \ - servr_uu \ - short_thread \ - sigpipe \ - socket \ - sockopt \ - sockping \ - sprintf \ - stack \ - stdio \ - str2addr \ - strod \ - switch \ - system \ - testbit \ - testfile \ - threads \ - timemac \ - timetest \ - tpd \ - udpsrv \ - vercheck \ - version \ - writev \ - xnotify \ - zerolen" - -inherit autotools multilib_script - -MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/nspr-config" - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," - -do_compile_prepend() { - oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX ${BUILD_CFLAGS}" LDFLAGS="" CC="${BUILD_CC}" -C config export -} - -do_compile_append() { - oe_runmake -C pr/tests -} - -do_install_append() { - install -D ${WORKDIR}/nspr.pc.in ${D}${libdir}/pkgconfig/nspr.pc - sed -i \ - -e 's:NSPRVERSION:${PV}:g' \ - -e 's:OEPREFIX:${prefix}:g' \ - -e 's:OELIBDIR:${libdir}:g' \ - -e 's:OEINCDIR:${includedir}:g' \ - -e 's:OEEXECPREFIX:${exec_prefix}:g' \ - ${D}${libdir}/pkgconfig/nspr.pc - - mkdir -p ${D}${libdir}/nspr/tests - install -m 0755 ${S}/pr/tests/runtests.pl ${D}${libdir}/nspr/tests - install -m 0755 ${S}/pr/tests/runtests.sh ${D}${libdir}/nspr/tests - cd ${B}/pr/tests - install -m 0755 ${TESTS} ${D}${libdir}/nspr/tests - - # delete compile-et.pl and perr.properties from ${bindir} because these are - # only used to generate prerr.c and prerr.h files from prerr.et at compile - # time - rm ${D}${bindir}/compile-et.pl ${D}${bindir}/prerr.properties -} - -FILES_${PN} = "${libdir}/lib*.so" -FILES_${PN}-dev = "${bindir}/* ${libdir}/nspr/tests/* ${libdir}/pkgconfig \ - ${includedir}/* ${datadir}/aclocal/* " - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-support/nspr/nspr_4.20.bb b/meta/recipes-support/nspr/nspr_4.20.bb new file mode 100644 index 0000000000..fe3b4bd2ed --- /dev/null +++ b/meta/recipes-support/nspr/nspr_4.20.bb @@ -0,0 +1,193 @@ +SUMMARY = "Netscape Portable Runtime Library" +HOMEPAGE = "http://www.mozilla.org/projects/nspr/" +LICENSE = "GPL-2.0 | MPL-2.0 | LGPL-2.1" +LIC_FILES_CHKSUM = "file://configure.in;beginline=3;endline=6;md5=90c2fdee38e45d6302abcfe475c8b5c5 \ + file://Makefile.in;beginline=4;endline=38;md5=beda1dbb98a515f557d3e58ef06bca99" +SECTION = "libs/network" + +SRC_URI = "http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz \ + file://remove-rpath-from-tests.patch \ + file://fix-build-on-x86_64.patch \ + file://remove-srcdir-from-configure-in.patch \ + file://0002-Add-nios2-support.patch \ + file://0001-md-Fix-build-with-musl.patch \ + file://0004-Add-ARC-support.patch \ + file://nspr.pc.in \ +" + +CACHED_CONFIGUREVARS_append_libc-musl = " CFLAGS='${CFLAGS} -D_PR_POLL_AVAILABLE \ + -D_PR_HAVE_OFF64_T -D_PR_INET6 -D_PR_HAVE_INET_NTOP \ + -D_PR_HAVE_GETHOSTBYNAME2 -D_PR_HAVE_GETADDRINFO \ + -D_PR_INET6_PROBE -DNO_DLOPEN_NULL'" + +UPSTREAM_CHECK_URI = "http://ftp.mozilla.org/pub/nspr/releases/" +UPSTREAM_CHECK_REGEX = "v(?P\d+(\.\d+)+)/" + +SRC_URI[md5sum] = "1c198c7e73f6b0e2bb9153a644ba246b" +SRC_URI[sha256sum] = "2c8964913da89ffbaf464d49ce44d79e8804e1794ef9a8c52a7bff7224d1556e" + +CVE_PRODUCT = "netscape_portable_runtime" + +S = "${WORKDIR}/nspr-${PV}/nspr" + +RDEPENDS_${PN}-dev += "perl" +TARGET_CC_ARCH += "${LDFLAGS}" + +TESTS = " \ + accept \ + acceptread \ + acceptreademu \ + affinity \ + alarm \ + anonfm \ + atomic \ + attach \ + bigfile \ + cleanup \ + cltsrv \ + concur \ + cvar \ + cvar2 \ + dlltest \ + dtoa \ + errcodes \ + exit \ + fdcach \ + fileio \ + foreign \ + formattm \ + fsync \ + gethost \ + getproto \ + i2l \ + initclk \ + inrval \ + instrumt \ + intrio \ + intrupt \ + io_timeout \ + ioconthr \ + join \ + joinkk \ + joinku \ + joinuk \ + joinuu \ + layer \ + lazyinit \ + libfilename \ + lltest \ + lock \ + lockfile \ + logfile \ + logger \ + many_cv \ + multiwait \ + nameshm1 \ + nblayer \ + nonblock \ + ntioto \ + ntoh \ + op_2long \ + op_excl \ + op_filnf \ + op_filok \ + op_nofil \ + parent \ + parsetm \ + peek \ + perf \ + pipeping \ + pipeping2 \ + pipeself \ + poll_nm \ + poll_to \ + pollable \ + prftest \ + primblok \ + provider \ + prpollml \ + ranfile \ + randseed \ + reinit \ + rwlocktest \ + sel_spd \ + selct_er \ + selct_nm \ + selct_to \ + selintr \ + sema \ + semaerr \ + semaping \ + sendzlf \ + server_test \ + servr_kk \ + servr_uk \ + servr_ku \ + servr_uu \ + short_thread \ + sigpipe \ + socket \ + sockopt \ + sockping \ + sprintf \ + stack \ + stdio \ + str2addr \ + strod \ + switch \ + system \ + testbit \ + testfile \ + threads \ + timemac \ + timetest \ + tpd \ + udpsrv \ + vercheck \ + version \ + writev \ + xnotify \ + zerolen" + +inherit autotools multilib_script + +MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/nspr-config" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," + +do_compile_prepend() { + oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX ${BUILD_CFLAGS}" LDFLAGS="" CC="${BUILD_CC}" -C config export +} + +do_compile_append() { + oe_runmake -C pr/tests +} + +do_install_append() { + install -D ${WORKDIR}/nspr.pc.in ${D}${libdir}/pkgconfig/nspr.pc + sed -i \ + -e 's:NSPRVERSION:${PV}:g' \ + -e 's:OEPREFIX:${prefix}:g' \ + -e 's:OELIBDIR:${libdir}:g' \ + -e 's:OEINCDIR:${includedir}:g' \ + -e 's:OEEXECPREFIX:${exec_prefix}:g' \ + ${D}${libdir}/pkgconfig/nspr.pc + + mkdir -p ${D}${libdir}/nspr/tests + install -m 0755 ${S}/pr/tests/runtests.pl ${D}${libdir}/nspr/tests + install -m 0755 ${S}/pr/tests/runtests.sh ${D}${libdir}/nspr/tests + cd ${B}/pr/tests + install -m 0755 ${TESTS} ${D}${libdir}/nspr/tests + + # delete compile-et.pl and perr.properties from ${bindir} because these are + # only used to generate prerr.c and prerr.h files from prerr.et at compile + # time + rm ${D}${bindir}/compile-et.pl ${D}${bindir}/prerr.properties +} + +FILES_${PN} = "${libdir}/lib*.so" +FILES_${PN}-dev = "${bindir}/* ${libdir}/nspr/tests/* ${libdir}/pkgconfig \ + ${includedir}/* ${datadir}/aclocal/* " + +BBCLASSEXTEND = "native nativesdk" -- cgit 1.2.3-korg