Сравнение spidermonkey-102.15.0 с spidermonkey-115.2.0

/usr/portage/dev-lang/spidermonkey/spidermonkey-115.2.0.ebuild 2023-10-09 14:52:29.480368350 +0300
4 4
EAPI="8"
5 5

  
6 6
# Patch version
7
FIREFOX_PATCHSET="firefox-102esr-patches-13.tar.xz"
8
SPIDERMONKEY_PATCHSET="spidermonkey-102-patches-05j.tar.xz"
7
FIREFOX_PATCHSET="firefox-115esr-patches-05.tar.xz"
8
SPIDERMONKEY_PATCHSET="spidermonkey-115-patches-01.tar.xz"
9 9

  
10 10
LLVM_MAX_SLOT=16
11 11

  
12 12
PYTHON_COMPAT=( python3_{10..11} )
13
PYTHON_REQ_USE="ssl,xml(+)"
13
PYTHON_REQ_USE="ncurses,ssl,xml(+)"
14 14

  
15 15
WANT_AUTOCONF="2.1"
16 16

  
......
51 51
fi
52 52

  
53 53
PATCH_URIS=(
54
	https://dev.gentoo.org/~{juippis,whissi}/mozilla/patchsets/${FIREFOX_PATCHSET}
55
	https://dev.gentoo.org/~{juippis,whissi}/mozilla/patchsets/${SPIDERMONKEY_PATCHSET}
54
	https://dev.gentoo.org/~juippis/mozilla/patchsets/${FIREFOX_PATCHSET}
55
	https://dev.gentoo.org/~juippis/mozilla/patchsets/${SPIDERMONKEY_PATCHSET}
56 56
)
57 57

  
58 58
SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> ${MOZ_P_DISTFILES}.source.tar.xz
......
75 75
		(
76 76
			sys-devel/llvm:16
77 77
			clang? (
78
				sys-devel/clang:16
79 78
				sys-devel/lld:16
79
				sys-devel/clang:16
80 80
				virtual/rust:0/llvm-16
81 81
			)
82 82
		)
83 83
		(
84 84
			sys-devel/llvm:15
85 85
			clang? (
86
				sys-devel/lld:15
86 87
				sys-devel/clang:15
87 88
				virtual/rust:0/llvm-15
88
				lto? ( sys-devel/lld:15 )
89
			)
90
		)
91
		(
92
			sys-devel/llvm:14
93
			clang? (
94
				sys-devel/clang:14
95
				virtual/rust:0/llvm-14
96
				lto? ( sys-devel/lld:14 )
97 89
			)
98 90
		)
99 91
	)
......
102 94
	test? (
103 95
		$(python_gen_any_dep 'dev-python/six[${PYTHON_USEDEP}]')
104 96
	)"
105
DEPEND=">=dev-libs/icu-71.1:=
97
DEPEND=">=dev-libs/icu-73.1:=
106 98
	dev-libs/nspr
107 99
	sys-libs/readline:0=
108 100
	sys-libs/zlib"
......
127 119
			return 1
128 120
		fi
129 121

  
130
		if use lto ; then
122
		if ! tc-ld-is-mold ; then
131 123
			if ! has_version -b "sys-devel/lld:${LLVM_SLOT}" ; then
132 124
				einfo "sys-devel/lld:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
133 125
				return 1
......
144 136
	fi
145 137
}
146 138

  
139
# This is a straight copypaste from toolchain-funcs.eclass's 'tc-ld-is-lld', and is temporarily
140
# placed here until toolchain-funcs.eclass gets an official support for mold linker.
141
# Please see:
142
# https://github.com/gentoo/gentoo/pull/28366 ||
143
# https://github.com/gentoo/gentoo/pull/28355
144
tc-ld-is-mold() {
145
	local out
146

  
147
	# Ensure ld output is in English.
148
	local -x LC_ALL=C
149

  
150
	# First check the linker directly.
151
	out=$($(tc-getLD "$@") --version 2>&1)
152
	if [[ ${out} == *"mold"* ]] ; then
153
		return 0
154
	fi
155

  
156
	# Then see if they're selecting mold via compiler flags.
157
	# Note: We're assuming they're using LDFLAGS to hold the
158
	# options and not CFLAGS/CXXFLAGS.
159
	local base="${T}/test-tc-linker"
160
	cat <<-EOF > "${base}.c"
161
	int main() { return 0; }
162
	EOF
163
	out=$($(tc-getCC "$@") ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -Wl,--version "${base}.c" -o "${base}" 2>&1)
164
	rm -f "${base}"*
165
	if [[ ${out} == *"mold"* ]] ; then
166
		return 0
167
	fi
168

  
169
	# No mold here!
170
	return 1
171
}
172

  
147 173
pkg_pretend() {
148 174
	if use test ; then
149 175
		CHECKREQS_DISK_BUILD="4000M"
......
166 192

  
167 193
		llvm_pkg_setup
168 194

  
169
		if use clang && use lto ; then
195
		if use clang && use lto && tc-ld-is-lld ; then
170 196
			local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }')
171 197
			[[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}")
172 198
			[[ -z ${version_lld} ]] && die "Failed to read ld.lld version!"
......
208 234

  
209 235
	use lto && rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch
210 236

  
237
	if ! use ppc64; then
238
		rm -v "${WORKDIR}"/firefox-patches/*ppc64*.patch || die
239
	fi
240

  
211 241
	eapply "${WORKDIR}"/firefox-patches
212 242
	eapply "${WORKDIR}"/spidermonkey-patches
213 243

  
......
232 262
	mkdir "${MOZJS_BUILDDIR}" || die
233 263

  
234 264
	popd &>/dev/null || die
235
	eautoconf
236 265
}
237 266

  
238 267
src_configure() {
......
246 275
	if use clang; then
247 276
		# Force clang
248 277
		einfo "Enforcing the use of clang due to USE=clang ..."
278

  
279
		local version_clang=$(clang --version 2>/dev/null | grep -F -- 'clang version' | awk '{ print $3 }')
280
		[[ -n ${version_clang} ]] && version_clang=$(ver_cut 1 "${version_clang}")
281
		[[ -z ${version_clang} ]] && die "Failed to read clang version!"
282

  
249 283
		if tc-is-gcc; then
250 284
			have_switched_compiler=yes
251 285
		fi
252 286
		AR=llvm-ar
253
		CC=${CHOST}-clang
254
		CXX=${CHOST}-clang++
287
		CC=${CHOST}-clang-${version_clang}
288
		CXX=${CHOST}-clang++-${version_clang}
255 289
		NM=llvm-nm
256 290
		RANLIB=llvm-ranlib
291

  
257 292
	elif ! use clang && ! tc-is-gcc ; then
258 293
		# Force gcc
259 294
		have_switched_compiler=yes
......
271 306
		strip-unsupported-flags
272 307
	fi
273 308

  
274
	# Ensure we use correct toolchain
309
	# Ensure we use correct toolchain,
310
	# AS is used in a non-standard way by upstream, #bmo1654031
275 311
	export HOST_CC="$(tc-getBUILD_CC)"
276 312
	export HOST_CXX="$(tc-getBUILD_CXX)"
277 313
	export AS="$(tc-getCC) -c"
......
291 327
		--disable-smoosh
292 328
		--disable-strip
293 329

  
330
		--enable-project=js
294 331
		--enable-readline
295 332
		--enable-release
296 333
		--enable-shared-js
......
309 346
	if use debug; then
310 347
		myeconfargs+=( --disable-optimize )
311 348
		myeconfargs+=( --enable-debug-symbols )
349
		myeconfargs+=( --enable-real-time-tracing )
312 350
	else
313 351
		myeconfargs+=( --enable-optimize )
314 352
		myeconfargs+=( --disable-debug-symbols )
353
		myeconfargs+=( --disable-real-time-tracing )
315 354
	fi
316 355

  
317 356
	if ! use x86 && [[ ${CHOST} != armv*h* ]] ; then
......
332 371
	# Tell build system that we want to use LTO
333 372
	if use lto ; then
334 373
		if use clang ; then
335
			myeconfargs+=( --enable-linker=lld )
374
			if tc-ld-is-mold ; then
375
				myeconfargs+=( --enable-linker=mold )
376
			else
377
				myeconfargs+=( --enable-linker=lld )
378
			fi
336 379
			myeconfargs+=( --enable-lto=cross )
380

  
337 381
		else
338 382
			myeconfargs+=( --enable-linker=bfd )
339 383
			myeconfargs+=( --enable-lto=full )
......
375 419

  
376 420
	cp "${FILESDIR}"/spidermonkey-${SLOT}-known-test-failures.txt "${T}"/known_failures.list || die
377 421

  
378
	if [[ $(tc-endian) == "big" ]] ; then
379
		echo "non262/extensions/clone-errors.js" >> "${T}"/known_failures.list
380
		echo "test262/built-ins/Date/UTC/fp-evaluation-order.js" >> "${T}"/known_failures.list
381
		echo "test262/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-other-type.js" >> "${T}"/known_failures.list
382
	fi
383

  
384
	if use ppc; then
385
		echo "non262/Array/fill.js" >> "${T}"/known_failures.list
386
		echo "non262/Array/sort_basics.js" >> "${T}"/known_failures.list
387
		echo "non262/Symbol/typed-arrays.js" >> "${T}"/known_failures.list
388
		echo "non262/Intl/TypedArray/toLocaleString.js" >> "${T}"/known_failures.list
389
		echo "non262/TypedArray/entries.js" >> "${T}"/known_failures.list
390
		echo "non262/TypedArray/fill.js" >> "${T}"/known_failures.list
391
		echo "non262/TypedArray/map-species.js" >> "${T}"/known_failures.list
392
		echo "non262/TypedArray/iterator.js" >> "${T}"/known_failures.list
393
		echo "non262/TypedArray/reverse.js" >> "${T}"/known_failures.list
394
		echo "non262/TypedArray/join.js" >> "${T}"/known_failures.list
395
		echo "non262/TypedArray/sort_comparators.js" >> "${T}"/known_failures.list
396
		echo "non262/TypedArray/forEach.js" >> "${T}"/known_failures.list
397
		echo "non262/TypedArray/slice.js" >> "${T}"/known_failures.list
398
		echo "non262/TypedArray/sort_compare_nan.js" >> "${T}"/known_failures.list
399
		echo "non262/TypedArray/set-toobject.js" >> "${T}"/known_failures.list
400
		echo "non262/TypedArray/sort-non-function.js" >> "${T}"/known_failures.list
401
		echo "non262/TypedArray/includes.js" >> "${T}"/known_failures.list
402
		echo "non262/TypedArray/subarray-species.js" >> "${T}"/known_failures.list
403
		echo "non262/TypedArray/indexOf-never-returns-negative-zero.js" >> "${T}"/known_failures.list
404
		echo "non262/TypedArray/map-and-filter.js" >> "${T}"/known_failures.list
405
		echo "non262/TypedArray/at.js" >> "${T}"/known_failures.list
406
		echo "non262/TypedArray/from_errors.js" >> "${T}"/known_failures.list
407
		echo "non262/TypedArray/values.js" >> "${T}"/known_failures.list
408
		echo "non262/TypedArray/set-wrapped.js" >> "${T}"/known_failures.list
409
		echo "non262/TypedArray/every-and-some.js" >> "${T}"/known_failures.list
410
		echo "non262/TypedArray/from_mapping.js" >> "${T}"/known_failures.list
411
		echo "non262/TypedArray/lastIndexOf-never-returns-negative-zero.js" >> "${T}"/known_failures.list
412
		echo "non262/Reflect/preventExtensions.js" >> "${T}"/known_failures.list
413
		echo "non262/TypedArray/sort_sorted.js" >> "${T}"/known_failures.list
414
		echo "non262/TypedArray/of.js" >> "${T}"/known_failures.list
415
		echo "non262/TypedArray/keys.js" >> "${T}"/known_failures.list
416
		echo "non262/TypedArray/from_realms.js" >> "${T}"/known_failures.list
417
		echo "non262/TypedArray/from_iterable.js" >> "${T}"/known_failures.list
418
		echo "non262/TypedArray/filter-species.js" >> "${T}"/known_failures.list
419
		echo "non262/TypedArray/object-defineproperty.js" >> "${T}"/known_failures.list
420
		echo "non262/TypedArray/uint8clamped-constructor.js" >> "${T}"/known_failures.list
421
		echo "non262/TypedArray/indexOf-and-lastIndexOf.js" >> "${T}"/known_failures.list
422
		echo "non262/TypedArray/slice-species.js" >> "${T}"/known_failures.list
423
		echo "non262/TypedArray/set-tointeger.js" >> "${T}"/known_failures.list
424
		echo "non262/Reflect/ownKeys.js" >> "${T}"/known_failures.list
425
		echo "non262/TypedArray/seal-and-freeze.js" >> "${T}"/known_failures.list
426
		echo "non262/TypedArray/reduce-and-reduceRight.js" >> "${T}"/known_failures.list
427
		echo "non262/TypedArray/from_basics.js" >> "${T}"/known_failures.list
428
		echo "non262/TypedArray/find-and-findIndex.js" >> "${T}"/known_failures.list
429
		echo "non262/Reflect/isExtensible.js" >> "${T}"/known_failures.list
430
		echo "non262/regress/regress-571014.js" >> "${T}"/known_failures.list
431
		echo "non262/extensions/reviver-mutates-holder-object-nonnative.js" >> "${T}"/known_failures.list
432
		echo "non262/extensions/typedarray-set-neutering.js" >> "${T}"/known_failures.list
433
		echo "non262/extensions/reviver-mutates-holder-array-nonnative.js" >> "${T}"/known_failures.list
434
		echo "non262/extensions/typedarray.js" >> "${T}"/known_failures.list
435
		echo "non262/Math/fround.js" >> "${T}"/known_failures.list
436
	fi
437

  
438 422
	${EPYTHON} \
439 423
		"${S}"/tests/jstests.py -d -s -t 1800 --wpt=disabled --no-progress \
440 424
		--exclude-file="${T}"/known_failures.list \
Спасибо!