diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-04-25 11:37:10 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-04-25 11:37:10 +0100 |
commit | 38423c67c8a23f6a1bc42038193182e2da3116eb (patch) | |
tree | 04e2cf4bd43601b77daa79fe654e409187093c5e /dev-lang/spidermonkey | |
parent | 623ee73d661e5ed8475cb264511f683407d87365 (diff) |
gentoo resync : 25.04.2020
Diffstat (limited to 'dev-lang/spidermonkey')
3 files changed, 216 insertions, 0 deletions
diff --git a/dev-lang/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest index e765fd872b1d..648d621d831a 100644 --- a/dev-lang/spidermonkey/Manifest +++ b/dev-lang/spidermonkey/Manifest @@ -2,6 +2,7 @@ AUX moz38-dont-hardcode-libc-soname.patch 637 BLAKE2B d78f53814955c3e0842040f473 AUX spidermonkey-1.8.5-LTO.patch 1886 BLAKE2B 28559662306681570ed7b910190da9042a7724a5d9fda0960ebe36039e994b56b65f103095381a8838db54e2ebdd5b8bc3f0f7d500f338907624ca448695a2f1 SHA512 8c44683370f7a919a930dc505278240164b1bea35cd0408ce7d880f56603abde9799aea3bf35f05bd080b214d5d0b944dd004ef5e157607bbb3e679f3ff2c574 AUX spidermonkey-52.0-fix-alpha-bitness.patch 836 BLAKE2B bf89aadfdceab9d1460c31b496618dc19d2461d27e0713887d8c59b7a565a70d38cbaa2ca099b50555417beba54c2b207f80cf13ba633da35be7fab6b3c41faf SHA512 67ccafd8e2b84d59d13ff93bd12930b4804f8cf64cc896a4edf99c962481f583866ea6c4f84b3fd9d1093ad8ca7d23712615470dfadb57d293258754dd612484 AUX spidermonkey-52.0-gcc9-overflow.patch 821 BLAKE2B c35c5a37b40e86d1a23588aebd9b53e81e0a70b01e969bc54c24c68a8adef567d03833e1afa8a02d1659f373226958b8ef3ce84982a8ba24d18fa28a96aa6e40 SHA512 6173486c4d28cb727096a470b22b6b98c675ee355934bf134882a5d068ef492e4cd3519e7da293eae756d5b9cb9950ffd4b1723c6a47de6493491a4bc3573f3b +AUX spidermonkey-60.5.2-ia64-fix-virtual-address-length.patch 2554 BLAKE2B d5759da22c521e389b8633aa2aa75e0a300af76f431a53c0bd445781002b0b7dd93543657cdf53afb12d87e4be1464584d5c3ccb30a2c9acc608aaeb1b2eb34f SHA512 d767cb00988772a0e5789d5b27aaaf0c0cc0124f4dd78ba67d2c4b4587c26346b01fc5b3d29f346e931dcd037ecefc8cec0d5c48510726a1841a6b6396c5507c AUX spidermonkey-60.5.2-ia64-support.patch 1615 BLAKE2B bd2ae36194bdb6a17638ec500e5211abb9700f2b7c5056b5be51e8e54d59326a5c9f0cb6d2d6fa56dd946dba264635e6d75e9b4ed52103c7904df19d33257c7d SHA512 71f2a0f27910ae086910f6599985a32ad2fdedeffc9c4c6baa446f4856dee74051fa158cc0552a3f21210098e0d006a0b5d781437fded80969e1edf23c04b9e0 AUX spidermonkey-perl-defined-array-check.patch 341 BLAKE2B e11a74cc2afbea5e39ec5f3fb4c108278a8b71b57ce71644184bc4e19188059f6cb9c164ab87877605028241ed0b68a1447414f1aa0f5453fa26a603ecd4f6a6 SHA512 5d178b68cf0744da874624da79cd31555bd882aed205e697a3f0bfc3cb91a149d74da79b7af5883ea5a23e1d1692753ebfda0d83e7a25ac000105849db5c1548 DIST firefox-68.0-patches-12.tar.xz 17476 BLAKE2B bd788e24820f902f4ca908b0cf7a49a4c57e058915af1eb87233d19d91271092676c1ee4c67e88df2411ecccea47c4e735efdf95945954f2d9aac5cc2f9051f2 SHA512 8033a3c445eaddd28188b338534da16a4130b679a5f6673b3094524e47435890e6d454d7b67f81bbe21f80ef1b65fa7e6c27d71191ba70dd8ea87fc68463f9a7 @@ -32,5 +33,6 @@ EBUILD spidermonkey-52.9.1_pre1-r1.ebuild 4464 BLAKE2B 087b47427dc3bfe0703ef5e57 EBUILD spidermonkey-52.9.1_pre1.ebuild 4292 BLAKE2B 36bb6fb32b838f11a18ec536be7f09f45bb1d05cd18a3312eb38512c4c895a17bb2a92721b28eb2e8e937f6112531c3647de1d2dc62637291206367c26350757 SHA512 782df8fdff08dc0f6a984e46be564609fb189014353d18b0f0673000beaded9c5cdba1e63f484ae19f5f6571e66a70b55270adea8876cbcfb1e3d36e5cde285c EBUILD spidermonkey-60.5.2_p0-r2.ebuild 3865 BLAKE2B 81729b277561984a49c27c16c099c105863a6a61198cebe65686787ad180c0b03684398f2f3df31e44edce3e8d35723cc12bb89494ca4f76f76367964af040d7 SHA512 c6dec2360c7faf810b0235f7017a306e9f5a6c935ba081f9646e8195ed3b4aed67d26e8445187c5c3889c858a0ef56abaeecace1894733e589eba11f4769df01 EBUILD spidermonkey-60.5.2_p0-r3.ebuild 4045 BLAKE2B 23dcfb6f020e0b832fb8cb30455d6f2c9be52663961b7ffad74265064a09157dd6c39d2c8957ea57a937c94e3c9bc5623ba6e4d4d7a75073a482c357d4304a0f SHA512 6f7e821c23696220d67ae66a6e06f19b86eef30885909c0c7b6c817bfe412898825db7265b817d06b4d181c2ead503e710142728a1bc7fcdf741a073d94f2c2c +EBUILD spidermonkey-60.5.2_p0-r4.ebuild 4112 BLAKE2B 43f7b3cee1e47339d192fce4f74bac7cf3918ca7b9a0c5f4e2f5012ea43f7ed7faa24e8e69bbf2e4c323d191ed942d7ecd484180cafdde387048d0443a0ed2a0 SHA512 4ed6984e311863907d1af6c709bdd41542a52e2a6624a5dc630fb08f38e45cbf628acb16e465c2c73c95164cd399d410b993a22a3248a3d6ad7776a989068864 EBUILD spidermonkey-68.7.0.ebuild 5764 BLAKE2B 10992198135286158221c8c0c17b8247a9c21c26f5b1e4f8ee03f986ccd739186fa081d334bd5a9564e8e16c8d2bf829dbbb2674641c2fcdc0f92ccf72e28111 SHA512 d414774437072efd89fb70735ea5c6401ad16121ab2fa797948ee9e50b2bf3d22698a9105d47bb8a27454d8dd9d10327f906a1774c68954ce67fff90dd530e92 MISC metadata.xml 820 BLAKE2B a0f072d469695cbe2ed23e529104ba5871c9bdd17a64c741df8f9a7dc515a2c229982d8565aad8e8ce6189a8eae1ac84dbf396cacc552e3733b7cedf49171021 SHA512 ae5656ac496ce63a89adb716bc3b324cb91d64ecb4b9c0a2dfb38ec1447253313e7e92e3209faa2b8631c23ce9a7273cc383ab2654b9fba638358f54c34a2b00 diff --git a/dev-lang/spidermonkey/files/spidermonkey-60.5.2-ia64-fix-virtual-address-length.patch b/dev-lang/spidermonkey/files/spidermonkey-60.5.2-ia64-fix-virtual-address-length.patch new file mode 100644 index 000000000000..8b2245f1e353 --- /dev/null +++ b/dev-lang/spidermonkey/files/spidermonkey-60.5.2-ia64-fix-virtual-address-length.patch @@ -0,0 +1,59 @@ +From 8099213b51180254b322332ecd573239da4212c4 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <slyfox@gentoo.org> +Date: Thu, 23 Jan 2020 22:57:53 +0000 +Subject: [PATCH] ProcessExecutableMemory.cpp: fix virtual address length on + ia64 + +ia64's usable virtual address space is page dependent. For 16K +pages with 3 levels of page tables de can address only 44 bits +of virtual memory, not default 47. + +The change makes page size detection dynamic and adapts to +addressable bits. On ia64 it is '4 * log2(page_size/8)'. + +Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> +--- + js/src/jit/ProcessExecutableMemory.cpp | 25 +++++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + +diff --git a/js/src/jit/ProcessExecutableMemory.cpp b/js/src/jit/ProcessExecutableMemory.cpp +index 9e55c262..8581c150 100644 +--- a/js/src/jit/ProcessExecutableMemory.cpp ++++ b/js/src/jit/ProcessExecutableMemory.cpp + +@@ -248,7 +248,32 @@ static void* ComputeRandomAllocationAddress() { + // x64 CPUs have a 48-bit address space and on some platforms the OS will + // give us access to 47 bits, so to be safe we right shift by 18 to leave + // 46 bits. ++# ifdef __ia64__ ++ // On ia64 virtual address space looks like one of: ++ // virt_addr_64 = [ <63..61> | <unimplemented> | L3 | L2 | L1 | offset ] ++ // virt_addr_64 = [ <63..61> | <unimplemented> | L4 | L3 | L2 | L1 | offset ] ++ // where L{1..L4} are page tables. Each page table (except top-level L3 or L4) ++ // is itself a page-size entry and can store PageSize / 8 entries. Top-level ++ // entry is 1/8 of of L1/L2 (as 3 upper bits are part of <63..61> address part). ++ // Note: that makes addressable size directly depend on page size. ++ // ++ // We conservatively assume 3 levels of page tables here. This makes the ++ // following formula: ++ // L3 = log2(PAGE / 8 / 8) = log2(PAGE / 8) - 3 ++ // L2 = log2(PAGE / 8) ++ // L1 = log2(PAGE / 8) ++ // offset = log2(PAGE) = log2(PAGE / 8) + 3 ++ // thus ++ // L3 + L2 + L1 + offset = 4 * log2(PAGE / 8) ++ // For more details see http://www.ia64-linux.org/doc/IA64linuxkernel.PDF ++ // (slide 19: "user regions"). ++ static uint64_t ia64_virt_bits = std::min<uint64_t>( ++ 4 * (mozilla::FloorLog2(gc::SystemPageSize() / 8)), ++ 46); ++ rand >>= (64 - ia64_virt_bits); ++# else + rand >>= 18; ++# endif + #else + // On 32-bit, right shift by 34 to leave 30 bits, range [0, 1GiB). Then add + // 512MiB to get range [512MiB, 1.5GiB), or [0x20000000, 0x60000000). This +-- +2.25.0 + diff --git a/dev-lang/spidermonkey/spidermonkey-60.5.2_p0-r4.ebuild b/dev-lang/spidermonkey/spidermonkey-60.5.2_p0-r4.ebuild new file mode 100644 index 000000000000..74eadbfe98ab --- /dev/null +++ b/dev-lang/spidermonkey/spidermonkey-60.5.2_p0-r4.ebuild @@ -0,0 +1,155 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +WANT_AUTOCONF="2.1" +inherit autotools check-reqs toolchain-funcs pax-utils mozcoreconf-v5 + +MY_PN="mozjs" +MY_P="${MY_PN}-${PV/_rc/.rc}" +MY_P="${MY_P/_pre/pre}" +MY_P="${MY_P%_p[0-9]*}" +DESCRIPTION="Stand-alone JavaScript C++ library" +HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey" +#SRC_URI="https://archive.mozilla.org/pub/spidermonkey/prereleases/60/pre3/${MY_P}.tar.bz2 +SRC_URI="https://dev.gentoo.org/~axs/distfiles/${MY_P}.tar.bz2 + https://dev.gentoo.org/~anarchy/mozilla/patchsets/${PN}-60.0-patches-04.tar.xz" + +LICENSE="NPL-1.1" +SLOT="60" +KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86" +IUSE="debug +jit minimal +system-icu test" + +RESTRICT="!test? ( test ) ia64? ( test )" + +S="${WORKDIR}/${MY_P%.rc*}" + +BUILDDIR="${S}/jsobj" + +RDEPEND=">=dev-libs/nspr-4.13.1 + virtual/libffi + sys-libs/readline:0= + >=sys-libs/zlib-1.2.3:= + system-icu? ( >=dev-libs/icu-59.1:= )" +DEPEND="${RDEPEND}" + +pkg_pretend() { + CHECKREQS_DISK_BUILD="2G" + + check-reqs_pkg_setup +} +pkg_setup() { + [[ ${MERGE_TYPE} == "binary" ]] || \ + moz_pkgsetup + export SHELL="${EPREFIX}/bin/bash" +} + +src_prepare() { + eapply "${WORKDIR}/${PN}" + eapply "${FILESDIR}/${PN}-60.5.2-ia64-support.patch" + eapply "${FILESDIR}/${PN}-60.5.2-ia64-fix-virtual-address-length.patch" + + eapply_user + + if [[ ${CHOST} == *-freebsd* ]]; then + # Don't try to be smart, this does not work in cross-compile anyway + ln -sfn "${BUILDDIR}/config/Linux_All.mk" "${S}/config/$(uname -s)$(uname -r).mk" || die + fi + + cd "${S}/js/src" || die + eautoconf old-configure.in + eautoconf + + # remove options that are not correct from js-config + sed '/lib-filenames/d' -i "${S}"/js/src/build/js-config.in || die "failed to remove invalid option from js-config" + + # there is a default config.cache that messes everything up + rm -f "${S}/js/src"/config.cache || die + + mkdir -p "${BUILDDIR}" || die +} + +src_configure() { + cd "${BUILDDIR}" || die + + ECONF_SOURCE="${S}/js/src" \ + econf \ + --disable-jemalloc \ + --enable-readline \ + --with-system-nspr \ + --with-system-zlib \ + --disable-optimize \ + --with-intl-api \ + $(use_with system-icu) \ + $(use_enable debug) \ + $(use_enable jit ion) \ + $(use_enable test tests) \ + XARGS="/usr/bin/xargs" \ + CONFIG_SHELL="${EPREFIX}/bin/bash" \ + CC="${CC}" CXX="${CXX}" LD="${LD}" AR="${AR}" RANLIB="${RANLIB}" +} + +cross_make() { + emake \ + CFLAGS="${BUILD_CFLAGS}" \ + CXXFLAGS="${BUILD_CXXFLAGS}" \ + AR="${BUILD_AR}" \ + CC="${BUILD_CC}" \ + CXX="${BUILD_CXX}" \ + RANLIB="${BUILD_RANLIB}" \ + "$@" +} +src_compile() { + cd "${BUILDDIR}" || die + if tc-is-cross-compiler; then + tc-export_build_env BUILD_{AR,CC,CXX,RANLIB} + cross_make \ + MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" \ + HOST_OPTIMIZE_FLAGS="" MODULE_OPTIMIZE_FLAGS="" \ + MOZ_PGO_OPTIMIZE_FLAGS="" \ + host_jsoplengen host_jskwgen + cross_make \ + MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" HOST_OPTIMIZE_FLAGS="" \ + -C config nsinstall + mv {,native-}host_jskwgen || die + mv {,native-}host_jsoplengen || die + mv config/{,native-}nsinstall || die + sed -i \ + -e 's@./host_jskwgen@./native-host_jskwgen@' \ + -e 's@./host_jsoplengen@./native-host_jsoplengen@' \ + Makefile || die + sed -i -e 's@/nsinstall@/native-nsinstall@' config/config.mk || die + rm -f config/host_nsinstall.o \ + config/host_pathsub.o \ + host_jskwgen.o \ + host_jsoplengen.o || die + fi + + MOZ_MAKE_FLAGS="${MAKEOPTS}" \ + emake \ + MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" \ + HOST_OPTIMIZE_FLAGS="" MODULE_OPTIMIZE_FLAGS="" \ + MOZ_PGO_OPTIMIZE_FLAGS="" +} + +src_test() { + cd "${BUILDDIR}/js/src/jsapi-tests" || die + ./jsapi-tests || die +} + +src_install() { + cd "${BUILDDIR}" || die + emake DESTDIR="${D}" install + + if ! use minimal; then + if use jit; then + pax-mark m "${ED}"usr/bin/js${SLOT} + fi + else + rm -f "${ED}"usr/bin/js${SLOT} + fi + + # We can't actually disable building of static libraries + # They're used by the tests and in a few other places + find "${D}" -iname '*.a' -o -iname '*.ajs' -delete || die +} |