1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/mozjs/mozjs.conf
3 # Copyright (C) 2004 - 2024 The T2 SDE Project
4 # Copyright (C) 1998 - 2004 ROCK Linux Project
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License version 2.
11 # --- T2-COPYRIGHT-NOTE-END ---
13 export MACH_USE_SYSTEM_PYTHON=1
14 export HOME=$sysroot/root
16 if [ $prefix_auto = 1 ]; then
17 prefix=$mozilla_prefix
23 hook_add inmake 5 "./mach build"
24 var_append makeinstopt ' ' '-C objs'
27 cat <<-EOT >> .mozconfig
29 mk_add_options MOZ_PHOENIX=1
30 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objs
32 ac_add_options --enable-application=js
33 ac_add_options --enable-shared-js
35 ac_add_options --with-system-zlib
38 [ "$SDECFG_DEBUG" != 1 ] && echo "ac_add_options --enable-strip" >> .mozconfig
40 pkginstalled icu4c && echo "ac_add_options --with-system-icu" >> .mozconfig
43 [ "$SDECFG_LTO" = 1 ] && case "$arch" in
45 echo "ac_add_options --enable-lto" >> .mozconfig ;;
48 [ "$SDECFG_DEFAULT_CC" = clang ] &&
49 var_append GCC_WRAPPER_APPEND " " "-c?:-fuse-ld=lld" &&
50 echo "ac_add_options --disable-elf-hack" >> .mozconfig
52 #echo "ac_add_options --disable-sandbox" >> .mozconfig
57 # FF needs sse for jit on x86
58 if ! $CC -E -dM -x c /dev/null | grep -iq _sse; then
59 var_append patchfiles ' ' "$confdir/no-jit.diff"
60 echo "ac_add_options --disable-jit" >> .mozconfig
64 [[ $arch_machine = armv[678]* ]] || echo "ac_add_options --disable-jit" >> .mozconfig
70 echo "ac_add_options --disable-jit" >> .mozconfig ;;
77 # atomics crash on i486
78 GCC_WRAPPER_INSERT="${GCC_WRAPPER_INSERT/i486/i586}"
79 # float_t should be 32-bit, ..!? :-/
80 var_append GCC_WRAPPER_INSERT ' ' '-D__FLT_EVAL_METHOD__=0'
83 var_append GCC_WRAPPER_APPEND ' ' '-DLIBYUV_DISABLE_NEON=1'
86 var_remove GCC_WRAPPER_REMOVE " " "-march*"
90 # don't pass CPU optimizations to clang w/ wasi
91 GCC_WRAPPER_INSERT="${GCC_WRAPPER_INSERT/-march=/--target=wasm32-wasi?:-march=}"
92 GCC_WRAPPER_INSERT="${GCC_WRAPPER_INSERT/-mcpu=/--target=wasm32-wasi?:-mcpu=}"
93 GCC_WRAPPER_INSERT="${GCC_WRAPPER_INSERT/-mtune=/--target=wasm32-wasi?:-mtune=}"
95 hook_add prepatch 5 "cargo_clear_cksum third_party/rust/*/.cargo-checksum.json"
96 hook_add postpatch 5 "rust_update_arch_target third_party/rust/*/no_atomic*.rs"
98 hook_add prepatch 4 "firefox_config"
99 hook_add preconf 2 "mozilla_branding"
101 # disable legacy component registration