Compare commits

..

No commits in common. "rawhide" and "f36" have entirely different histories.
rawhide ... f36

5 changed files with 18 additions and 461 deletions

View File

@ -1,81 +0,0 @@
From 95f1e91ef71d912be5f6dddb6fac68671d850fd6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= <fzatlouk@redhat.com>
Date: Sun, 24 Jul 2022 11:11:01 +0200
Subject: [PATCH] Python/Build: Use r instead of rU file read modes
Fixes Python 3.11 build
---
python/mozbuild/mozbuild/action/process_define_files.py | 2 +-
python/mozbuild/mozbuild/preprocessor.py | 6 +++---
python/mozbuild/mozbuild/util.py | 4 +++-
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/python/mozbuild/mozbuild/action/process_define_files.py b/python/mozbuild/mozbuild/action/process_define_files.py
index 6fff0d1..de2bcf4 100644
--- a/python/mozbuild/mozbuild/action/process_define_files.py
+++ b/python/mozbuild/mozbuild/action/process_define_files.py
@@ -36,7 +36,7 @@ def process_define_file(output, input):
not config.substs.get('JS_STANDALONE'):
config = PartialConfigEnvironment(mozpath.join(topobjdir, 'js', 'src'))
- with open(path, 'rU') as input:
+ with open(path, 'r') as input:
r = re.compile('^\s*#\s*(?P<cmd>[a-z]+)(?:\s+(?P<name>\S+)(?:\s+(?P<value>\S+))?)?', re.U)
for l in input:
m = r.match(l)
diff --git a/python/mozbuild/mozbuild/preprocessor.py b/python/mozbuild/mozbuild/preprocessor.py
index 0e3a750..66f5cf7 100644
--- a/python/mozbuild/mozbuild/preprocessor.py
+++ b/python/mozbuild/mozbuild/preprocessor.py
@@ -517,7 +517,7 @@ class Preprocessor:
if args:
for f in args:
- with io.open(f, 'rU', encoding='utf-8') as input:
+ with io.open(f, 'r', encoding='utf-8') as input:
self.processFile(input=input, output=out)
if depfile:
mk = Makefile()
@@ -807,7 +807,7 @@ class Preprocessor:
args = self.applyFilters(args)
if not os.path.isabs(args):
args = os.path.join(self.curdir, args)
- args = io.open(args, 'rU', encoding='utf-8')
+ args = io.open(args, 'r', encoding='utf-8')
except Preprocessor.Error:
raise
except Exception:
@@ -862,7 +862,7 @@ def preprocess(includes=[sys.stdin], defines={},
pp = Preprocessor(defines=defines,
marker=marker)
for f in includes:
- with io.open(f, 'rU', encoding='utf-8') as input:
+ with io.open(f, 'r', encoding='utf-8') as input:
pp.processFile(input=input, output=output)
return pp.includes
diff --git a/python/mozbuild/mozbuild/util.py b/python/mozbuild/mozbuild/util.py
index 044cf64..eb992ce 100644
--- a/python/mozbuild/mozbuild/util.py
+++ b/python/mozbuild/mozbuild/util.py
@@ -54,6 +54,8 @@ def exec_(object, globals=None, locals=None):
def _open(path, mode):
+ if mode == "rU":
+ mode = "r"
if 'b' in mode:
return io.open(path, mode)
return io.open(path, mode, encoding='utf-8', newline='\n')
@@ -220,7 +222,7 @@ class FileAvoidWrite(BytesIO):
still occur, as well as diff capture if requested.
"""
- def __init__(self, filename, capture_diff=False, dry_run=False, readmode='rU'):
+ def __init__(self, filename, capture_diff=False, dry_run=False, readmode='r'):
BytesIO.__init__(self)
self.name = filename
assert type(capture_diff) == bool
--
2.37.1

View File

@ -1,164 +0,0 @@
From: William Grant <wgrant@ubuntu.com>
Date: Tue, 14 Apr 2020 02:18:28 +0200
Subject: Add riscv64 support
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=932893
Bug-Mozilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1661027
From: Zenithal <i@zenithal.me>
Add clang support
---
build/moz.configure/init.configure | 3 +++
js/src/jit/AtomicOperations.h | 3 ++-
js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h | 5 +++++
mfbt/tests/TestPoisonArea.cpp | 3 +++
python/mozbuild/mozbuild/configure/constants.py | 2 ++
third_party/rust/cc/.cargo-checksum.json | 2 +-
third_party/rust/cc/src/lib.rs | 14 +++++++++-----
7 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
index b887153..54615d8 100644
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -758,6 +758,9 @@ def split_triplet(triplet, allow_msvc=False):
elif cpu == 'sh4':
canonical_cpu = 'sh4'
endianness = 'little'
+ elif cpu.startswith('riscv64'):
+ canonical_cpu = 'riscv64'
+ endianness = 'little'
else:
raise ValueError('Unknown CPU type: %s' % cpu)
diff --git a/js/src/jit/AtomicOperations.h b/js/src/jit/AtomicOperations.h
index 0486cba..d00e276 100644
--- a/js/src/jit/AtomicOperations.h
+++ b/js/src/jit/AtomicOperations.h
@@ -391,7 +391,8 @@ inline bool AtomicOperations::isLockfreeJS(int32_t size) {
#elif defined(__ppc__) || defined(__PPC__) || defined(__sparc__) || \
defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || \
defined(__PPC64LE__) || defined(__alpha__) || defined(__hppa__) || \
- defined(__sh__) || defined(__s390__) || defined(__s390x__)
+ defined(__sh__) || defined(__s390__) || defined(__s390x__) || \
+ defined(__riscv)
# include "jit/shared/AtomicOperations-feeling-lucky.h"
#else
# error "No AtomicOperations support provided for this platform"
diff --git a/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h b/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h
index f002cd4..413591a 100644
--- a/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h
+++ b/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h
@@ -70,6 +70,11 @@
# endif
#endif
+#if defined(__riscv) && __riscv_xlen == 64
+# define HAS_64BIT_ATOMICS
+# define HAS_64BIT_LOCKFREE
+#endif
+
#ifdef JS_CODEGEN_NONE
# ifdef JS_64BIT
# define HAS_64BIT_ATOMICS
diff --git a/mfbt/tests/TestPoisonArea.cpp b/mfbt/tests/TestPoisonArea.cpp
index fbd3364..0a67e8c 100644
--- a/mfbt/tests/TestPoisonArea.cpp
+++ b/mfbt/tests/TestPoisonArea.cpp
@@ -169,6 +169,9 @@ static const ia64_instr _return_instr = {
# define RETURN_INSTR _return_instr
# define RETURN_INSTR_TYPE ia64_instr
+#elif defined(__riscv)
+#define RETURN_INSTR 0x80828082 /* ret; ret */
+
#else
# error "Need return instruction for this architecture"
#endif
diff --git a/python/mozbuild/mozbuild/configure/constants.py b/python/mozbuild/mozbuild/configure/constants.py
index 7542dcd..c9dd1bb 100644
--- a/python/mozbuild/mozbuild/configure/constants.py
+++ b/python/mozbuild/mozbuild/configure/constants.py
@@ -49,6 +49,7 @@ CPU_bitness = {
'mips64': 64,
'ppc': 32,
'ppc64': 64,
+ 'riscv64': 64,
's390': 32,
's390x': 64,
'sh4': 32,
@@ -88,6 +89,7 @@ CPU_preprocessor_checks = OrderedDict((
('mips64', '__mips64'),
('mips32', '__mips__'),
('sh4', '__sh__'),
+ ('riscv64', '__riscv && __riscv_xlen == 64'),
))
assert sorted(CPU_preprocessor_checks.keys()) == sorted(CPU.POSSIBLE_VALUES)
diff --git a/third_party/rust/cc/src/lib.rs b/third_party/rust/cc/src/lib.rs
index 621d31d..968d03a 100644
--- a/third_party/rust/cc/src/lib.rs
+++ b/third_party/rust/cc/src/lib.rs
@@ -1365,10 +1365,10 @@ impl Build {
cmd.push_cc_arg("-ffunction-sections".into());
cmd.push_cc_arg("-fdata-sections".into());
}
- // Disable generation of PIC on RISC-V for now: rust-lld doesn't support this yet
+ // Disable generation of PIC on bare-metal for now: rust-lld doesn't support this yet
if self
.pic
- .unwrap_or(!target.contains("windows-gnu") && !target.contains("riscv"))
+ .unwrap_or(!target.contains("windows") && !target.contains("-none-"))
{
cmd.push_cc_arg("-fPIC".into());
// PLT only applies if code is compiled with PIC support,
@@ -1397,7 +1397,11 @@ impl Build {
// Target flags
match cmd.family {
ToolFamily::Clang => {
- cmd.args.push(format!("--target={}", target).into());
+ if target.starts_with("riscv64gc-") {
+ cmd.args.push(format!("--target={}", target.replace("riscv64gc", "riscv64")).into());
+ } else {
+ cmd.args.push(format!("--target={}", target).into());
+ }
}
ToolFamily::Msvc { clang_cl } => {
// This is an undocumented flag from MSVC but helps with making
@@ -1588,13 +1588,16 @@ impl Build {
if let Some(arch) = parts.next() {
let arch = &arch[5..];
cmd.args.push(("-march=rv".to_owned() + arch).into());
- // ABI is always soft-float right now, update this when this is no longer the
- // case:
- if arch.starts_with("64") {
+ if target.contains("linux") && arch.starts_with("64") {
+ cmd.args.push("-mabi=lp64d".into());
+ } else if target.contains("linux") && arch.starts_with("32") {
+ cmd.args.push("-mabi=ilp32d".into());
+ } else if arch.starts_with("64") {
cmd.args.push("-mabi=lp64".into());
} else {
cmd.args.push("-mabi=ilp32".into());
}
+ cmd.args.push("-mcmodel=medany".into());
}
}
}
@@ -2024,6 +2027,7 @@ impl Build {
"riscv32imac-unknown-none-elf" => Some("riscv32-unknown-elf"),
"riscv32imc-unknown-none-elf" => Some("riscv32-unknown-elf"),
"riscv64gc-unknown-none-elf" => Some("riscv64-unknown-elf"),
+ "riscv64gc-unknown-linux-gnu" => Some("riscv64-linux-gnu"),
"riscv64imac-unknown-none-elf" => Some("riscv64-unknown-elf"),
"s390x-unknown-linux-gnu" => Some("s390x-linux-gnu"),
"sparc-unknown-linux-gnu" => Some("sparc-linux-gnu"),
diff --git a/third_party/rust/cc/.cargo-checksum.json b/third_party/rust/cc/.cargo-checksum.json
index 417fde7..ac7d18a 100644
--- a/third_party/rust/cc/.cargo-checksum.json
+++ b/third_party/rust/cc/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.lock":"3aff5f8b0a7f4d72852b11b0526f0002e6bf55f19f1ebd6470d7f97fbd540e60","Cargo.toml":"6ab10d9b6a9c6f0909074e6698c90c6b6a7223661ec2e83174d2593117cbe7f2","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"7184fbdf375a057e673257348f6d7584c0dd11b66318d98f3647f69eb610b097","src/bin/gcc-shim.rs":"b77907875029494b6288841c3aed2e4939ed40708c7f597fca5c9e2570490ca6","src/com.rs":"bcdaf1c28b71e6ef889c6b08d1ce9d7c0761344a677f523bc4c3cd297957f804","src/lib.rs":"4753929dbb7b676c19d7cfa06d0a47e37003554b80c536cbf2b892d591ef61c2","src/registry.rs":"3cc1b5a50879fa751572878ae1d0afbfc960c11665258492754b2c8bccb0ff5d","src/setup_config.rs":"7014103587d3382eac599cb76f016e2609b8140970861b2237982d1db24af265","src/winapi.rs":"ea8b7edbb9ff87957254f465c2334e714c5d6b3b19a8d757c48ea7ca0881c50c","src/windows_registry.rs":"388e79dcf3e84078ae0b086c6cdee9cf9eb7e3ffafdcbf3e2df26163661f5856","tests/cc_env.rs":"e02b3b0824ad039b47e4462c5ef6dbe6c824c28e7953af94a0f28f7b5158042e","tests/cflags.rs":"57f06eb5ce1557e5b4a032d0c4673e18fbe6f8d26c1deb153126e368b96b41b3","tests/cxxflags.rs":"c2c6c6d8a0d7146616fa1caed26876ee7bc9fcfffd525eb4743593cade5f3371","tests/support/mod.rs":"71620b178583b6e6e5e0d4cac14e2cef6afc62fb6841e0c72ed1784543abf8ac","tests/test.rs":"1605640c9b94a77f48fc92e1dc0485bdf1960da5626e2e00279e4703691656bc"},"package":"aa87058dce70a3ff5621797f1506cb837edd02ac4c0ae642b4542dce802908b8"}
\ No newline at end of file
+{"files":{"Cargo.lock":"3aff5f8b0a7f4d72852b11b0526f0002e6bf55f19f1ebd6470d7f97fbd540e60","Cargo.toml":"6ab10d9b6a9c6f0909074e6698c90c6b6a7223661ec2e83174d2593117cbe7f2","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"7184fbdf375a057e673257348f6d7584c0dd11b66318d98f3647f69eb610b097","src/bin/gcc-shim.rs":"b77907875029494b6288841c3aed2e4939ed40708c7f597fca5c9e2570490ca6","src/com.rs":"bcdaf1c28b71e6ef889c6b08d1ce9d7c0761344a677f523bc4c3cd297957f804","src/lib.rs":"c5e5a3c6a17d98b9fad6984a6e37bc38d14a0d6948ebf84bea76ef47e10d743d","src/registry.rs":"3cc1b5a50879fa751572878ae1d0afbfc960c11665258492754b2c8bccb0ff5d","src/setup_config.rs":"7014103587d3382eac599cb76f016e2609b8140970861b2237982d1db24af265","src/winapi.rs":"ea8b7edbb9ff87957254f465c2334e714c5d6b3b19a8d757c48ea7ca0881c50c","src/windows_registry.rs":"388e79dcf3e84078ae0b086c6cdee9cf9eb7e3ffafdcbf3e2df26163661f5856","tests/cc_env.rs":"e02b3b0824ad039b47e4462c5ef6dbe6c824c28e7953af94a0f28f7b5158042e","tests/cflags.rs":"57f06eb5ce1557e5b4a032d0c4673e18fbe6f8d26c1deb153126e368b96b41b3","tests/cxxflags.rs":"c2c6c6d8a0d7146616fa1caed26876ee7bc9fcfffd525eb4743593cade5f3371","tests/support/mod.rs":"71620b178583b6e6e5e0d4cac14e2cef6afc62fb6841e0c72ed1784543abf8ac","tests/test.rs":"1605640c9b94a77f48fc92e1dc0485bdf1960da5626e2e00279e4703691656bc"},"package":"aa87058dce70a3ff5621797f1506cb837edd02ac4c0ae642b4542dce802908b8"}

View File

@ -1,141 +0,0 @@
non262/Date/15.9.5.7.js
non262/Date/reset-time-zone-cache-same-offset.js
non262/Date/time-zone-path.js
non262/Date/time-zones-historic.js
non262/Date/time-zones-imported.js
non262/Date/toString-localized-posix.js
non262/Date/toString-localized.js
non262/Intl/Array/toLocaleString-date.js
non262/Intl/available-locales-resolved.js
non262/Intl/available-locales-supported.js
non262/Intl/Date/toLocaleDateString_timeZone.js
non262/Intl/Date/toLocaleString_timeZone.js
non262/Intl/Date/toLocaleTimeString_timeZone.js
non262/Intl/DateTimeFormat/day-period-hour-cycle.js
non262/Intl/DateTimeFormat/format_timeZone.js
non262/Intl/DateTimeFormat/format.js
non262/Intl/DateTimeFormat/formatToParts.js
non262/Intl/DateTimeFormat/fractional-second-digits-append-item.js
non262/Intl/DateTimeFormat/hourCycle.js
non262/Intl/DateTimeFormat/japanese-gannen-year.js
non262/Intl/DateTimeFormat/related-year.js
non262/Intl/DateTimeFormat/timeZone_backward_links.js
non262/Intl/DateTimeFormat/timeZone_version.js
non262/Intl/DateTimeFormat/tz-environment-variable.js
non262/Intl/DisplayNames/dateTimeField.js
non262/Intl/DisplayNames/language.js
non262/Intl/DisplayNames/region.js
non262/Intl/ListFormat/conjunction-type.js
non262/Intl/Locale/likely-subtags-generated.js
non262/Intl/Locale/likely-subtags.js
non262/Intl/NumberFormat/currency-narrow-symbol.js
non262/Intl/NumberFormat/format.js
non262/Intl/NumberFormat/notation-compact-long.js
test262/built-ins/RegExp/property-escapes/generated/Alphabetic.js
test262/built-ins/RegExp/property-escapes/generated/Assigned.js
test262/built-ins/RegExp/property-escapes/generated/Bidi_Mirrored.js
test262/built-ins/RegExp/property-escapes/generated/Case_Ignorable.js
test262/built-ins/RegExp/property-escapes/generated/Cased.js
test262/built-ins/RegExp/property-escapes/generated/Changes_When_Casefolded.js
test262/built-ins/RegExp/property-escapes/generated/Changes_When_Casemapped.js
test262/built-ins/RegExp/property-escapes/generated/Changes_When_Lowercased.js
test262/built-ins/RegExp/property-escapes/generated/Changes_When_NFKC_Casefolded.js
test262/built-ins/RegExp/property-escapes/generated/Changes_When_Titlecased.js
test262/built-ins/RegExp/property-escapes/generated/Changes_When_Uppercased.js
test262/built-ins/RegExp/property-escapes/generated/Dash.js
test262/built-ins/RegExp/property-escapes/generated/Default_Ignorable_Code_Point.js
test262/built-ins/RegExp/property-escapes/generated/Diacritic.js
test262/built-ins/RegExp/property-escapes/generated/Emoji_Modifier_Base.js
test262/built-ins/RegExp/property-escapes/generated/Emoji_Presentation.js
test262/built-ins/RegExp/property-escapes/generated/Emoji.js
test262/built-ins/RegExp/property-escapes/generated/Extender.js
test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Cased_Letter.js
test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Close_Punctuation.js
test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Currency_Symbol.js
test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Dash_Punctuation.js
test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Decimal_Number.js
test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Format.js
test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Letter.js
test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Lowercase_Letter.js
test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Mark.js
test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Modifier_Letter.js
test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Modifier_Symbol.js
test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Nonspacing_Mark.js
test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Number.js
test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Open_Punctuation.js
test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Letter.js
test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Number.js
test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Punctuation.js
test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Other_Symbol.js
test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Other.js
test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Punctuation.js
test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Spacing_Mark.js
test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Symbol.js
test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Unassigned.js
test262/built-ins/RegExp/property-escapes/generated/General_Category_-_Uppercase_Letter.js
test262/built-ins/RegExp/property-escapes/generated/Grapheme_Base.js
test262/built-ins/RegExp/property-escapes/generated/Grapheme_Extend.js
test262/built-ins/RegExp/property-escapes/generated/ID_Continue.js
test262/built-ins/RegExp/property-escapes/generated/ID_Start.js
test262/built-ins/RegExp/property-escapes/generated/Ideographic.js
test262/built-ins/RegExp/property-escapes/generated/Lowercase.js
test262/built-ins/RegExp/property-escapes/generated/Script_-_Ahom.js
test262/built-ins/RegExp/property-escapes/generated/Script_-_Arabic.js
test262/built-ins/RegExp/property-escapes/generated/Script_-_Balinese.js
test262/built-ins/RegExp/property-escapes/generated/Script_-_Brahmi.js
test262/built-ins/RegExp/property-escapes/generated/Script_-_Canadian_Aboriginal.js
test262/built-ins/RegExp/property-escapes/generated/Script_-_Common.js
test262/built-ins/RegExp/property-escapes/generated/Script_-_Cyrillic.js
test262/built-ins/RegExp/property-escapes/generated/Script_-_Devanagari.js
test262/built-ins/RegExp/property-escapes/generated/Script_-_Egyptian_Hieroglyphs.js
test262/built-ins/RegExp/property-escapes/generated/Script_-_Ethiopic.js
test262/built-ins/RegExp/property-escapes/generated/Script_-_Glagolitic.js
test262/built-ins/RegExp/property-escapes/generated/Script_-_Han.js
test262/built-ins/RegExp/property-escapes/generated/Script_-_Hiragana.js
test262/built-ins/RegExp/property-escapes/generated/Script_-_Inherited.js
test262/built-ins/RegExp/property-escapes/generated/Script_-_Kaithi.js
test262/built-ins/RegExp/property-escapes/generated/Script_-_Kannada.js
test262/built-ins/RegExp/property-escapes/generated/Script_-_Katakana.js
test262/built-ins/RegExp/property-escapes/generated/Script_-_Khojki.js
test262/built-ins/RegExp/property-escapes/generated/Script_-_Lao.js
test262/built-ins/RegExp/property-escapes/generated/Script_-_Latin.js
test262/built-ins/RegExp/property-escapes/generated/Script_-_Mongolian.js
test262/built-ins/RegExp/property-escapes/generated/Script_-_Tagalog.js
test262/built-ins/RegExp/property-escapes/generated/Script_-_Takri.js
test262/built-ins/RegExp/property-escapes/generated/Script_-_Telugu.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Adlam.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Ahom.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Arabic.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Balinese.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Brahmi.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Canadian_Aboriginal.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Common.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Cyrillic.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Devanagari.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Egyptian_Hieroglyphs.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Ethiopic.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Glagolitic.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Han.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Hiragana.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Inherited.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Kaithi.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Kannada.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Katakana.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Khojki.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Lao.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Latin.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Mongolian.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Nko.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Syriac.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Tagalog.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Takri.js
test262/built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Telugu.js
test262/built-ins/RegExp/property-escapes/generated/Sentence_Terminal.js
test262/built-ins/RegExp/property-escapes/generated/Soft_Dotted.js
test262/built-ins/RegExp/property-escapes/generated/Terminal_Punctuation.js
test262/built-ins/RegExp/property-escapes/generated/Unified_Ideograph.js
test262/built-ins/RegExp/property-escapes/generated/Uppercase.js
test262/built-ins/RegExp/property-escapes/generated/Variation_Selector.js
test262/built-ins/RegExp/property-escapes/generated/XID_Continue.js
test262/built-ins/RegExp/property-escapes/generated/XID_Start.js
test262/intl402/Locale/prototype/minimize/removing-likely-subtags-first-adds-likely-subtags.js

View File

@ -6,6 +6,12 @@
# Require tests to pass?
%global require_tests 1
# Linking fails on armv7hl when using bundled icu, use system one for it, there are bunch of more test failures
# TODO: Examine the failures/maybe switch all arches to system-icu
%ifarch armv7hl
%global require_tests 0
%endif
%if 0%{?build_with_lto}
# LTO is default since F33 and F32 package is backported as is, so no LTO there
%else
@ -24,16 +30,13 @@
Name: mozjs%{major}
Version: 78.15.0
Release: 10%{?dist}
Release: 3%{?dist}
Summary: SpiderMonkey JavaScript library
License: MPLv2.0 and MPLv1.1 and BSD and GPLv2+ and GPLv3+ and LGPLv2+ and AFL and ASL 2.0
URL: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
Source0: https://ftp.mozilla.org/pub/firefox/releases/%{version}esr/source/firefox-%{version}esr.source.tar.xz
# Known failures with system libicu
Source1: known_failures.txt
# Patches from mozjs68, rebased for mozjs78:
Patch01: fix-soname.patch
Patch02: copy-headers.patch
@ -49,8 +52,6 @@ Patch13: Fixup-compatibility-of-mozbuild-with-Python-3.10.patch
Patch14: init_patch.patch
# TODO: Check with mozilla for cause of these fails and re-enable spidermonkey compile time checks if needed
Patch15: spidermonkey_checks_disable.patch
# Python 3.11 compat
Patch16: 0001-Python-Build-Use-r-instead-of-rU-file-read-modes.patch
# armv7 fixes
Patch17: definitions_for_user_vfp.patch
@ -68,10 +69,9 @@ Patch30: FixSharedArray.diff
Patch31: 0002-D89554-autoconf1.diff
Patch32: 0003-D94538-autoconf2.diff
# Fix build on riscv64
Patch40: 0001-feature-riscv64-support-from-Debian-and-clang.patch
Patch41: tests-skip-some-tests-on-rv64.patch
%ifarch armv7hl
BuildRequires: libicu-devel
%endif
BuildRequires: cargo
BuildRequires: clang-devel
BuildRequires: gcc
@ -81,7 +81,6 @@ BuildRequires: make
%if !0%{?rhel}
BuildRequires: nasm
%endif
BuildRequires: libicu-devel
BuildRequires: llvm
BuildRequires: llvm-devel
BuildRequires: rust
@ -129,7 +128,6 @@ pushd ../..
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%ifarch armv7hl
# Include definitions for user vfp on armv7 as it causes the compilation to fail without them
@ -141,11 +139,6 @@ pushd ../..
%patch18 -p1
%endif
%ifarch riscv64
%patch40 -p1
%patch41 -p1
%endif
# Fixes for ppc64 and s390x, there is no need to keep it in ifarch here since mozilla tests support ifarch conditions
%patch19 -p1
@ -158,9 +151,6 @@ pushd ../..
# Copy out the LICENSE file
cp LICENSE js/src/
# Copy out file containing known test failures with system libicu
cp %{SOURCE1} js/src/
popd
# Remove zlib directory (to be sure using system version)
@ -188,7 +178,11 @@ export LINKFLAGS="%{?__global_ldflags}"
export PYTHON="%{__python3}"
%configure \
%ifnarch armv7hl
--without-system-icu \
%else
--with-system-icu \
%endif
--with-system-zlib \
--disable-tests \
--disable-strip \
@ -266,16 +260,16 @@ ln -s libmozjs-%{major}.so.0 %{buildroot}%{_libdir}/libmozjs-%{major}.so
%check
# Run SpiderMonkey tests
%if 0%{?require_tests}
PYTHONPATH=tests/lib %{__python3} tests/jstests.py -d -s -t 2400 --exclude-file=known_failures.txt --no-progress --wpt=disabled ../../js/src/dist/bin/js%{major}
PYTHONPATH=tests/lib %{__python3} tests/jstests.py -d -s -t 1800 --no-progress --wpt=disabled ../../js/src/dist/bin/js%{major}
%else
PYTHONPATH=tests/lib %{__python3} tests/jstests.py -d -s -t 2400 --exclude-file=known_failures.txt --no-progress --wpt=disabled ../../js/src/dist/bin/js%{major} || :
PYTHONPATH=tests/lib %{__python3} tests/jstests.py -d -s -t 1800 --no-progress --wpt=disabled ../../js/src/dist/bin/js%{major} || :
%endif
# Run basic JIT tests
%if 0%{?require_tests}
PYTHONPATH=tests/lib %{__python3} jit-test/jit_test.py -s -t 2400 --no-progress ../../js/src/dist/bin/js%{major} basic
PYTHONPATH=tests/lib %{__python3} jit-test/jit_test.py -s -t 1800 --no-progress ../../js/src/dist/bin/js%{major} basic
%else
PYTHONPATH=tests/lib %{__python3} jit-test/jit_test.py -s -t 2400 --no-progress ../../js/src/dist/bin/js%{major} basic || :
PYTHONPATH=tests/lib %{__python3} jit-test/jit_test.py -s -t 1800 --no-progress ../../js/src/dist/bin/js%{major} basic || :
%endif
%ldconfig_scriptlets
@ -292,30 +286,6 @@ PYTHONPATH=tests/lib %{__python3} jit-test/jit_test.py -s -t 2400 --no-progress
%{_includedir}/mozjs-%{major}/
%changelog
* Tue Feb 21 2023 Nianqing Yao <imbearchild@outlook.com> - 78.15.0-11
- Get riscv64 support from Arch linux RISC-V.
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 78.15.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sat Dec 31 2022 Pete Walter <pwalter@fedoraproject.org> - 78.15.0-9
- Rebuild for ICU 72
* Fri Dec 02 2022 Frantisek Zatloukal <fzatlouk@redhat.com> - 78.15.0-8
- Add few more test exceptions
* Mon Aug 01 2022 Frantisek Zatloukal <fzatlouk@redhat.com> - 78.15.0-7
- Rebuilt for ICU 71.1
* Mon Aug 01 2022 Frantisek Zatloukal <fzatlouk@redhat.com> - 78.15.0-6
- Switch to system-icu everywhere
* Sun Jul 24 2022 Frantisek Zatloukal <fzatlouk@redhat.com> - 78.15.0-5
- Fixup Python 3.11 build
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 78.15.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sun Feb 20 2022 Frantisek Zatloukal <fzatlouk@redhat.com> - 78.15.0-3
- Switch to system-icu on armv7hl to fix FTBFS

View File

@ -1,27 +0,0 @@
diff --unified --recursive --text a/js/src/tests/non262/Array/regress-157652.js b/js/src/tests/non262/Array/regress-157652.js
--- a/js/src/tests/non262/Array/regress-157652.js 2022-02-16 20:45:04.795659521 +0800
+++ b/js/src/tests/non262/Array/regress-157652.js 2022-02-16 21:58:08.905996653 +0800
@@ -1,4 +1,4 @@
-// |reftest| skip-if(xulRuntime.XPCOMABI.match(/x86_64|aarch64|ppc64|ppc64le|s390x|mips64/)||Android) -- No test results
+// |reftest| skip-if(xulRuntime.XPCOMABI.match(/x86_64|aarch64|ppc64|ppc64le|s390x|mips64|riscv64/)||Android) -- No test results
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --unified --recursive --text a/js/src/tests/non262/Array/regress-330812.js b/js/src/tests/non262/Array/regress-330812.js
--- a/js/src/tests/non262/Array/regress-330812.js 2022-02-16 20:45:04.798992836 +0800
+++ b/js/src/tests/non262/Array/regress-330812.js 2022-02-16 21:58:54.699088464 +0800
@@ -1,4 +1,4 @@
-// |reftest| slow-if(xulRuntime.XPCOMABI.match(/x86_64|aarch64|ppc64|ppc64le|s390x|mips64/)||Android) -- No test results
+// |reftest| skip-if(xulRuntime.XPCOMABI.match(/x86_64|aarch64|ppc64|ppc64le|s390x|mips64|riscv64/)||Android) -- No test results
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --unified --recursive --text a/js/src/tests/non262/regress/regress-422348.js b/js/src/tests/non262/regress/regress-422348.js
--- a/js/src/tests/non262/regress/regress-422348.js 2022-02-16 20:45:04.715659964 +0800
+++ b/js/src/tests/non262/regress/regress-422348.js 2022-02-16 21:59:55.658750431 +0800
@@ -1,4 +1,4 @@
-// |reftest| skip-if(xulRuntime.XPCOMABI.match(/x86_64|aarch64|ppc64|ppc64le|s390x|mips64/)) -- On 64-bit, takes forever rather than throwing
+// |reftest| skip-if(xulRuntime.XPCOMABI.match(/x86_64|aarch64|ppc64|ppc64le|s390x|mips64|riscv64/)) -- On 64-bit, takes forever rather than throwing
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this