diff --git a/lang/v8/Makefile b/lang/v8/Makefile index e849c6562d53..901368155f54 100644 --- a/lang/v8/Makefile +++ b/lang/v8/Makefile @@ -1,108 +1,108 @@ # We follow the stable channel on https://omahaproxy.appspot.com/ -# https://chromium.googlesource.com/v8/v8/+/refs/heads/9.7-lkgr +# https://chromium.googlesource.com/v8/v8/+/refs/heads/9.8-lkgr PORTNAME= v8 -PORTVERSION= 9.7.106.19 +PORTVERSION= 9.8.177.9 CATEGORIES= lang MASTER_SITES= LOCAL/sunpoet/v8/${PORTVERSION:R:R} DISTFILES= v8-${PORTVERSION}.tar.gz \ build-${BUILD_REV}.tar.gz \ buildtools-${BUILDTOOLS_REV}.tar.gz \ clang-${CLANG_REV}.tar.gz \ common-${COMMON_REV}.tar.gz \ googletest-${GOOGLETEST_REV}.tar.gz \ icu-${ICU_REV}.tar.gz \ zlib-${ZLIB_REV}.tar.gz DIST_SUBDIR= v8/${PORTVERSION:R:R} EXTRACT_ONLY= ${DISTNAME}.tar.gz MAINTAINER= sunpoet@FreeBSD.org COMMENT= Open source JavaScript engine by Google LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE ONLY_FOR_ARCHS= aarch64 amd64 i386 BUILD_DEPENDS= binutils>=0:devel/binutils \ gn:devel/gn \ ${PYTHON_PKGNAMEPREFIX}Jinja2>=0:devel/py-Jinja2@${PY_FLAVOR} LIB_DEPENDS= libicudata.so:devel/icu USES= compiler:c++17-lang cpe gnome ninja pkgconfig python:3.5+,build tar:xz USE_GNOME= glib20 BINARY_ALIAS= python3=${PYTHON_CMD} MAKE_ARGS= -C out/Release NO_WRKSUBDIR= yes USE_LDCONFIG= yes SUB_FILES= v8.pc v8_libbase.pc v8_libplatform.pc CPE_VENDOR= google CONFLICTS_INSTALL= v8-beta -BUILD_REV= cf325916d58a194a935c26a56fcf6b525d1e2bf4 -BUILDTOOLS_REV= 80e4f838faaf50e18629ae630df1d421f255a62a -CLANG_REV= 21baac0e13389b03d6f805701c75544ed0b1ebb0 +BUILD_REV= 9cfc74504f0c5093fe6799e70f15bded2423b5b4 +BUILDTOOLS_REV= 075dd7e22837a69189003e4fa84499acf63188cf +CLANG_REV= 336fcfd099995c128bc93e97b8263cc6fc891cc8 COMMON_REV= 7f36dbc19d31e2aad895c60261ca8f726442bfbb -GOOGLETEST_REV= 16f637fbf4ffc3f7a01fa4eceb7906634565242f -ICU_REV= eedbaf76e49d28465d9119b10c30b82906e606ff -ZLIB_REV= 6da1d53b97c89b07e47714d88cab61f1ce003c68 +GOOGLETEST_REV= 4c5650f68866e3c2e60361d5c4c95c6f335fb64b +ICU_REV= edf883ad2db9c723b058a6a17a146d68d6343143 +ZLIB_REV= efd9399ae01364926be2a38946127fdf463480db # Run "gn args --list out/Release" for all variables. # Some parts don't have use_system_* flag, and can be turned on/off by using # replace_gn_files.py script, some parts just turned on/off for target host # OS "target_os == is_bsd", like libusb, libpci. GN_ARGS+= clang_use_chrome_plugins=false \ extra_cxxflags="${CXXFLAGS}" \ extra_ldflags="${LDFLAGS}" \ is_clang=true \ treat_warnings_as_errors=false \ use_aura=true \ use_lld=true \ use_custom_libcxx=false \ v8_use_external_startup_data=false post-extract: @${MKDIR} ${WRKSRC}/base/trace_event/common ${WRKSRC}/build ${WRKSRC}/buildtools ${WRKSRC}/third_party/googletest/src ${WRKSRC}/third_party/icu ${WRKSRC}/third_party/zlib ${WRKSRC}/tools/clang @${TAR} -xf ${DISTDIR}/${DIST_SUBDIR}/build-${BUILD_REV}.tar.gz -C ${WRKSRC}/build @${TAR} -xf ${DISTDIR}/${DIST_SUBDIR}/buildtools-${BUILDTOOLS_REV}.tar.gz -C ${WRKSRC}/buildtools @${TAR} -xf ${DISTDIR}/${DIST_SUBDIR}/clang-${CLANG_REV}.tar.gz -C ${WRKSRC}/tools/clang @${TAR} -xf ${DISTDIR}/${DIST_SUBDIR}/common-${COMMON_REV}.tar.gz -C ${WRKSRC}/base/trace_event/common @${TAR} -xf ${DISTDIR}/${DIST_SUBDIR}/googletest-${GOOGLETEST_REV}.tar.gz -C ${WRKSRC}/third_party/googletest/src @${TAR} -xf ${DISTDIR}/${DIST_SUBDIR}/icu-${ICU_REV}.tar.gz -C ${WRKSRC}/third_party/icu @${TAR} -xf ${DISTDIR}/${DIST_SUBDIR}/zlib-${ZLIB_REV}.tar.gz -C ${WRKSRC}/third_party/zlib post-patch: @${REINPLACE_CMD} -i '' 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/build/toolchain/gcc_toolchain.gni ${WRKSRC}/buildtools/third_party/libc++/BUILD.gn # https://github.com/klzgrad/naiveproxy/blob/master/src/build/config/gclient_args.gni @${ECHO_CMD} 'checkout_google_benchmark = false' > ${WRKSRC}/build/config/gclient_args.gni # Use ICU from ports and create needed directory pre-configure: @cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} ./build/linux/unbundle/replace_gn_files.py --system-libraries icu # || ${FALSE} @${MKDIR} ${WRKSRC}/out/Release/gen/shim_headers/icui18n_shim/third_party/icu/source/i18n/unicode ${WRKSRC}/out/Release/gen/shim_headers/icuuc_shim/third_party/icu/source/common/unicode @${MKDIR} ${WRKSRC}/out/Release/gen/include @${CP} -R ${LOCALBASE}/include/unicode ${WRKSRC}/out/Release/gen/include/unicode do-configure: @cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} gn gen out/Release --args='${GN_ARGS}' do-install: ${MKDIR} ${STAGEDIR}${PREFIX}/include/cppgc ${STAGEDIR}${PREFIX}/include/libplatform ${INSTALL_PROGRAM} ${WRKSRC}/out/Release/d8 ${STAGEDIR}${PREFIX}/bin/d8 ${INSTALL_PROGRAM} ${WRKSRC}/out/Release/mkgrokdump ${STAGEDIR}${PREFIX}/bin/mkgrokdump ${INSTALL_PROGRAM} ${WRKSRC}/out/Release/mksnapshot ${STAGEDIR}${PREFIX}/bin/mksnapshot ${INSTALL_LIB} ${WRKSRC}/out/Release/libchrome_zlib.so ${STAGEDIR}${PREFIX}/lib/libchrome_zlib.so ${INSTALL_LIB} ${WRKSRC}/out/Release/libcppgc.so ${STAGEDIR}${PREFIX}/lib/libcppgc.so ${INSTALL_LIB} ${WRKSRC}/out/Release/libv8.so ${STAGEDIR}${PREFIX}/lib/libv8.so ${INSTALL_LIB} ${WRKSRC}/out/Release/libv8_libbase.so ${STAGEDIR}${PREFIX}/lib/libv8_libbase.so ${INSTALL_LIB} ${WRKSRC}/out/Release/libv8_libplatform.so ${STAGEDIR}${PREFIX}/lib/libv8_libplatform.so ${INSTALL_DATA} ${WRKSRC}/include/*.h ${STAGEDIR}${PREFIX}/include/ cd ${WRKSRC}/include/cppgc && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/include/cppgc '-name *\.h' ${INSTALL_DATA} ${WRKSRC}/include/libplatform/*.h ${STAGEDIR}${PREFIX}/include/libplatform/ ${INSTALL_DATA} ${WRKDIR}/v8*.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig/ .include diff --git a/lang/v8/distinfo b/lang/v8/distinfo index 9a5a569fec6e..afed509bdbbc 100644 --- a/lang/v8/distinfo +++ b/lang/v8/distinfo @@ -1,17 +1,17 @@ -TIMESTAMP = 1643133659 -SHA256 (v8/9.7/v8-9.7.106.19.tar.gz) = 90321cc252be625f050c26eeed5e4b98450782f8ef88e9db7e259c5f789e594b -SIZE (v8/9.7/v8-9.7.106.19.tar.gz) = 27222789 -SHA256 (v8/9.7/build-cf325916d58a194a935c26a56fcf6b525d1e2bf4.tar.gz) = 41d40b8a5d229207f06df96808c7fb4677f0b6c3352b4d322563bcd9e1af8d2a -SIZE (v8/9.7/build-cf325916d58a194a935c26a56fcf6b525d1e2bf4.tar.gz) = 1359676 -SHA256 (v8/9.7/buildtools-80e4f838faaf50e18629ae630df1d421f255a62a.tar.gz) = 4744899438381aab671aa9587ebb76a73d176a3bb93726685772c675eaa9c6a3 -SIZE (v8/9.7/buildtools-80e4f838faaf50e18629ae630df1d421f255a62a.tar.gz) = 86765 -SHA256 (v8/9.7/clang-21baac0e13389b03d6f805701c75544ed0b1ebb0.tar.gz) = 6aedadb4fc21499ada70b4fce41343e7ae5c4da41a4d0ab15adc19176569b438 -SIZE (v8/9.7/clang-21baac0e13389b03d6f805701c75544ed0b1ebb0.tar.gz) = 291551 -SHA256 (v8/9.7/common-7f36dbc19d31e2aad895c60261ca8f726442bfbb.tar.gz) = a09d581f42705f5c31a4eae0450e45dd34643ed61db449111dc200d71f7e37c3 -SIZE (v8/9.7/common-7f36dbc19d31e2aad895c60261ca8f726442bfbb.tar.gz) = 10491 -SHA256 (v8/9.7/googletest-16f637fbf4ffc3f7a01fa4eceb7906634565242f.tar.gz) = 8c9ebaaf090de7e2703fcd61e7027a91ab9071ab23a1df95b8d27accba5f088d -SIZE (v8/9.7/googletest-16f637fbf4ffc3f7a01fa4eceb7906634565242f.tar.gz) = 831669 -SHA256 (v8/9.7/icu-eedbaf76e49d28465d9119b10c30b82906e606ff.tar.gz) = aacf852a7bc1bd2744cb27601b2dcb74fa3505d3eb898de16ec59d027d792def -SIZE (v8/9.7/icu-eedbaf76e49d28465d9119b10c30b82906e606ff.tar.gz) = 43814466 -SHA256 (v8/9.7/zlib-6da1d53b97c89b07e47714d88cab61f1ce003c68.tar.gz) = 6265faae2e649ddb51fdf59518c08d5cb22b3e552f6cad219f65a26b02ac5474 -SIZE (v8/9.7/zlib-6da1d53b97c89b07e47714d88cab61f1ce003c68.tar.gz) = 313216 +TIMESTAMP = 1643970994 +SHA256 (v8/9.8/v8-9.8.177.9.tar.gz) = 98cbbad48c1ac97871304a50220e41a18e632dd415b072bc82f9f6178059505d +SIZE (v8/9.8/v8-9.8.177.9.tar.gz) = 27365748 +SHA256 (v8/9.8/build-9cfc74504f0c5093fe6799e70f15bded2423b5b4.tar.gz) = 15703b71589b1d0bf6ee666d62b413ff0ac3b29448a8396e22994d6b7e6ed037 +SIZE (v8/9.8/build-9cfc74504f0c5093fe6799e70f15bded2423b5b4.tar.gz) = 1380406 +SHA256 (v8/9.8/buildtools-075dd7e22837a69189003e4fa84499acf63188cf.tar.gz) = 952ff349a2cbda6ecab58458a9c473c68acd8ae71386f0304c3c877f42bf5468 +SIZE (v8/9.8/buildtools-075dd7e22837a69189003e4fa84499acf63188cf.tar.gz) = 87271 +SHA256 (v8/9.8/clang-336fcfd099995c128bc93e97b8263cc6fc891cc8.tar.gz) = b284869f82815c194926f2fec6fbccbce5b48ae43720173320098d3a49652a0e +SIZE (v8/9.8/clang-336fcfd099995c128bc93e97b8263cc6fc891cc8.tar.gz) = 292729 +SHA256 (v8/9.8/common-7f36dbc19d31e2aad895c60261ca8f726442bfbb.tar.gz) = 5757e6ba719c12168b8787543eb2c9d08630435daa02a04e124ab349ed53bfaa +SIZE (v8/9.8/common-7f36dbc19d31e2aad895c60261ca8f726442bfbb.tar.gz) = 10490 +SHA256 (v8/9.8/googletest-4c5650f68866e3c2e60361d5c4c95c6f335fb64b.tar.gz) = 42cc6bf8f7b502a72af135b10afdae3600e54d29f5a2ec7fe37840629a18dbb5 +SIZE (v8/9.8/googletest-4c5650f68866e3c2e60361d5c4c95c6f335fb64b.tar.gz) = 832346 +SHA256 (v8/9.8/icu-edf883ad2db9c723b058a6a17a146d68d6343143.tar.gz) = d78b88d872c31b88c79eaaa80e96dd7692edde65bf6d36f57dc59af8bc5fcdb5 +SIZE (v8/9.8/icu-edf883ad2db9c723b058a6a17a146d68d6343143.tar.gz) = 51809103 +SHA256 (v8/9.8/zlib-efd9399ae01364926be2a38946127fdf463480db.tar.gz) = edb4335e9be454c741b3bdc2af46955fb37f937b7b40f534b55e4b92c0819150 +SIZE (v8/9.8/zlib-efd9399ae01364926be2a38946127fdf463480db.tar.gz) = 313373 diff --git a/lang/v8/files/patch-BUILD.gn b/lang/v8/files/patch-BUILD.gn index 36393c012109..8ec8de722036 100644 --- a/lang/v8/files/patch-BUILD.gn +++ b/lang/v8/files/patch-BUILD.gn @@ -1,32 +1,32 @@ ---- BUILD.gn.orig 2021-11-15 18:52:12 UTC +--- BUILD.gn.orig 2022-01-23 11:58:51 UTC +++ BUILD.gn -@@ -5090,7 +5090,7 @@ v8_component("v8_libbase") { +@@ -5094,7 +5094,7 @@ v8_component("v8_libbase") { } } - if (is_linux || is_chromeos) { + if ((is_linux || is_chromeos) && !is_bsd) { sources += [ "src/base/debug/stack_trace_posix.cc", "src/base/platform/platform-linux.cc", -@@ -5107,6 +5107,12 @@ v8_component("v8_libbase") { +@@ -5111,6 +5111,12 @@ v8_component("v8_libbase") { ] libs = [ "dl" ] + } else if (is_bsd) { + sources += [ + "src/base/debug/stack_trace_posix.cc", + "src/base/platform/platform-freebsd.cc", + ] + libs = [ "rt", "execinfo" ] } else if (is_android) { if (current_toolchain == host_toolchain) { libs = [ -@@ -5607,6 +5613,7 @@ if (v8_monolithic) { +@@ -5611,6 +5617,7 @@ if (v8_monolithic) { ":v8_libplatform", "//build/win:default_exe_manifest", ] + libs = ["execinfo"] configs = [ ":internal_config" ] } diff --git a/lang/v8/files/patch-build_config_BUILD.gn b/lang/v8/files/patch-build_config_BUILD.gn index 862adcb37658..3bf0166e6eea 100644 --- a/lang/v8/files/patch-build_config_BUILD.gn +++ b/lang/v8/files/patch-build_config_BUILD.gn @@ -1,30 +1,30 @@ ---- build/config/BUILD.gn.orig 2021-05-26 12:26:11 UTC +--- build/config/BUILD.gn.orig 2022-01-23 11:59:03 UTC +++ build/config/BUILD.gn -@@ -128,7 +128,7 @@ config("debug") { +@@ -125,7 +125,7 @@ config("debug") { # builds, and we have to tell it to turn it off. defines += [ "_HAS_ITERATOR_DEBUGGING=0" ] } - } else if ((is_linux || is_chromeos) && current_cpu == "x64" && + } else if ((is_linux || is_chromeos || is_bsd) && current_cpu == "x64" && enable_iterator_debugging) { # Enable libstdc++ debugging facilities to help catch problems early, see # http://crbug.com/65151 . -@@ -227,9 +227,7 @@ config("default_libs") { +@@ -224,9 +224,7 @@ config("default_libs") { ] } else if (is_linux || is_chromeos) { libs = [ - "dl", "pthread", - "rt", ] } } -@@ -308,7 +306,7 @@ config("executable_config") { +@@ -305,7 +303,7 @@ config("executable_config") { "//build/config/ios:ios_dynamic_flags", "//build/config/ios:ios_executable_flags", ] - } else if (is_linux || is_chromeos || is_android || current_os == "aix") { + } else if (is_linux || is_bsd || is_chromeos || is_android || current_os == "aix") { configs += [ "//build/config/gcc:executable_config" ] if (is_chromecast) { configs += [ "//build/config/chromecast:executable_config" ] diff --git a/lang/v8/files/patch-build_config_compiler_BUILD.gn b/lang/v8/files/patch-build_config_compiler_BUILD.gn index 7a1db0920063..d13361651345 100644 --- a/lang/v8/files/patch-build_config_compiler_BUILD.gn +++ b/lang/v8/files/patch-build_config_compiler_BUILD.gn @@ -1,101 +1,101 @@ ---- build/config/compiler/BUILD.gn.orig 2021-11-15 18:52:18 UTC +--- build/config/compiler/BUILD.gn.orig 2022-01-23 11:59:03 UTC +++ build/config/compiler/BUILD.gn @@ -140,7 +140,7 @@ declare_args() { # # TODO(crbug.com/1131993): Enabling this when 'is_android' is true breaks # content_shell_test_apk on both ARM and x86. - init_stack_vars = !is_android + init_stack_vars = !is_android && !is_bsd # This argument is to control whether enabling text section splitting in the # final binary. When enabled, the separated text sections with prefix -@@ -361,7 +361,7 @@ config("compiler") { +@@ -357,7 +357,7 @@ config("compiler") { } # Linker warnings. - if (fatal_linker_warnings && !is_apple && current_os != "aix" && + if (fatal_linker_warnings && !is_apple && !is_bsd && current_os != "aix" && current_os != "zos") { ldflags += [ "-Wl,--fatal-warnings" ] } -@@ -539,7 +539,7 @@ config("compiler") { +@@ -534,7 +534,7 @@ config("compiler") { ldflags += [ "-Wl,-z,keep-text-section-prefix" ] } -- if (is_clang && !is_nacl && !use_xcode_clang && current_os != "zos") { -+ if (is_clang && !is_nacl && !use_xcode_clang && !is_bsd && current_os != "zos") { +- if (is_clang && !is_nacl && current_os != "zos") { ++ if (is_clang && !is_nacl && !is_bsd && current_os != "zos") { cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ] # TODO(hans): Remove this once Clang generates better optimized debug info -@@ -910,7 +910,7 @@ config("compiler_cpu_abi") { +@@ -917,7 +917,7 @@ config("compiler_cpu_abi") { cflags += [ "-mtune=$arm_tune" ] } } else if (current_cpu == "arm64") { - if (is_clang && !is_android && !is_nacl && !is_fuchsia) { + if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd) { cflags += [ "--target=aarch64-linux-gnu" ] ldflags += [ "--target=aarch64-linux-gnu" ] } -@@ -1254,7 +1254,7 @@ config("compiler_deterministic") { +@@ -1238,7 +1238,7 @@ config("compiler_deterministic") { # different build directory like "out/feature_a" and "out/feature_b" if # we build same files with same compile flag. # Other paths are already given in relative, no need to normalize them. - if (is_nacl) { + if (is_nacl || is_bsd) { # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here. cflags += [ "-Xclang", -@@ -1267,7 +1267,7 @@ config("compiler_deterministic") { +@@ -1251,7 +1251,7 @@ config("compiler_deterministic") { # and -fcoverage-compilation-dir=. cflags += [ "-ffile-compilation-dir=." ] } - if (!is_win) { + if (!is_win && !is_bsd) { # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167) asmflags = [ "-Wa,-fdebug-compilation-dir,." ] } -@@ -1515,7 +1515,7 @@ config("default_warnings") { - cflags += [ "-Wno-null-pointer-subtraction" ] - } +@@ -1502,7 +1502,7 @@ config("default_warnings") { + "-Wno-unneeded-internal-declaration", + ] -- if (current_toolchain == host_toolchain || !use_xcode_clang) { -+ if ((current_toolchain == host_toolchain || !use_xcode_clang) && !is_bsd) { - # Flags Xcode 9.2 (Clang clang-900.0.39.2) does not recognize. - cflags += [ - "-Wenum-compare-conditional", -@@ -1763,7 +1763,7 @@ config("thin_archive") { +- if (!is_nacl || is_nacl_saigo) { ++ if ((!is_nacl || is_nacl_saigo) && !is_bsd) { + if (is_win) { + # TODO(thakis): https://crbug.com/617318 + # Currently goma can not handle case sensitiveness for windows well. +@@ -1791,7 +1791,7 @@ config("thin_archive") { # archives. # TODO(crbug.com/1221615): Enable on is_apple if use_lld once that no longer # confuses lldb. - if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) { + if ((is_posix && !is_nacl && !is_apple && !is_bsd) || is_fuchsia) { arflags = [ "-T" ] } else if (is_win && use_lld) { arflags = [ "/llvmlibthin" ] -@@ -2263,7 +2263,7 @@ config("symbols") { +@@ -2289,7 +2289,7 @@ config("symbols") { # flag, so we can use use -g1 for pnacl and nacl-clang compiles. # gcc nacl is is_nacl && !is_clang, pnacl and nacl-clang are && is_clang. if ((!is_nacl || is_clang) && current_os != "zos") { - cflags += [ "-g2" ] + cflags += [ "-g0" ] } - # Since only one of the build options -gdwarf-aranges and -fembed-bitcode -@@ -2303,7 +2303,7 @@ config("symbols") { - # DWARF info may be corrupt; offsets in a range list entry are in different + if (!is_nacl && is_clang && !is_tsan && !is_asan && +@@ -2329,7 +2329,7 @@ config("symbols") { # sections" there. Maybe just a bug in nacl_switch_32.S. - if (!is_apple && !is_nacl && current_cpu != "x86" && current_os != "zos" && -- (use_gold || use_lld)) { -+ (use_gold || use_lld) && !is_bsd) { - if (is_clang) { - # This flag enables the GNU-format pubnames and pubtypes sections, - # which lld needs in order to generate a correct GDB index. -@@ -2316,7 +2316,7 @@ config("symbols") { + _enable_gdb_index = + symbol_level == 2 && !is_apple && !is_nacl && current_cpu != "x86" && +- current_os != "zos" && (use_gold || use_lld) && ++ current_os != "zos" && (use_gold || use_lld) && !is_bsd && + # Disable on non-fission 32-bit Android because it pushes + # libcomponents_unittests over the 4gb size limit. + !(is_android && !use_debug_fission && current_cpu != "x64" && +@@ -2347,7 +2347,7 @@ config("symbols") { } - if (is_clang && !is_nacl && !use_xcode_clang && current_os != "zos") { + if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos") { - if (is_apple) { + if (is_apple || is_bsd) { # TODO(https://crbug.com/1050118): Investigate missing debug info on mac. # Make sure we don't use constructor homing on mac. cflags += [ diff --git a/lang/v8/files/patch-build_config_compiler_compiler.gni b/lang/v8/files/patch-build_config_compiler_compiler.gni index 539bd8abd7e2..716914e2fb67 100644 --- a/lang/v8/files/patch-build_config_compiler_compiler.gni +++ b/lang/v8/files/patch-build_config_compiler_compiler.gni @@ -1,11 +1,11 @@ ---- build/config/compiler/compiler.gni.orig 2021-11-15 18:52:18 UTC +--- build/config/compiler/compiler.gni.orig 2022-01-23 11:59:03 UTC +++ build/config/compiler/compiler.gni -@@ -219,7 +219,7 @@ declare_args() { +@@ -224,7 +224,7 @@ declare_args() { declare_args() { # Whether to use the gold linker from binutils instead of lld or bfd. - use_gold = !use_lld && !(is_chromecast && is_linux && + use_gold = !use_lld && !is_bsd && !(is_chromecast && is_linux && (current_cpu == "arm" || current_cpu == "mipsel")) && (((is_linux || is_chromeos_lacros) && (current_cpu == "x64" || current_cpu == "x86" || diff --git a/lang/v8/files/patch-build_config_rust.gni b/lang/v8/files/patch-build_config_rust.gni index c0b328a03ad6..522727d59a1a 100644 --- a/lang/v8/files/patch-build_config_rust.gni +++ b/lang/v8/files/patch-build_config_rust.gni @@ -1,11 +1,11 @@ ---- build/config/rust.gni.orig 2021-11-15 18:52:18 UTC +--- build/config/rust.gni.orig 2022-01-23 11:59:03 UTC +++ build/config/rust.gni -@@ -67,7 +67,7 @@ toolchain_has_official_rust = +@@ -66,7 +66,7 @@ toolchain_has_official_rust = (!is_nacl && (is_android && (current_cpu == "arm" || current_cpu == "arm64" || current_cpu == "x64" || current_cpu == "x86"))) || - (is_linux && current_cpu == "x64") + (current_os == "linux" && current_cpu == "x64") - toolchain_has_rust = enable_rust && (toolchain_has_official_rust || - use_unverified_rust_toolchain) + toolchain_has_rust = + enable_rust && (toolchain_has_official_rust || rust_sysroot_absolute != "") diff --git a/lang/v8/files/patch-build_toolchain_gcc__toolchain.gni b/lang/v8/files/patch-build_toolchain_gcc__toolchain.gni index 9b0f2527ee02..efab25893949 100644 --- a/lang/v8/files/patch-build_toolchain_gcc__toolchain.gni +++ b/lang/v8/files/patch-build_toolchain_gcc__toolchain.gni @@ -1,45 +1,45 @@ ---- build/toolchain/gcc_toolchain.gni.orig 2021-11-15 18:52:18 UTC +--- build/toolchain/gcc_toolchain.gni.orig 2022-01-23 11:59:03 UTC +++ build/toolchain/gcc_toolchain.gni @@ -49,6 +49,11 @@ if (enable_resource_allowlist_generation) { "enable_resource_allowlist_generation=true does not work for target_os=$target_os") } +declare_args() { + extra_cxxflags = "" + extra_ldflags = "" +} + # This template defines a toolchain for something that works like gcc # (including clang). # -@@ -731,13 +736,23 @@ template("gcc_toolchain") { +@@ -738,13 +743,23 @@ template("gcc_toolchain") { # use_gold too. template("clang_toolchain") { gcc_toolchain(target_name) { - prefix = rebase_path("$clang_base_path/bin", root_build_dir) - cc = "${prefix}/clang" - cxx = "${prefix}/clang++" - ld = cxx - readelf = "${prefix}/llvm-readelf" - ar = "${prefix}/llvm-ar" - nm = "${prefix}/llvm-nm" + if (is_bsd) { + prefix = "%%LOCALBASE%%/bin" + cc = "cc" + cxx = "c++" + ld = cxx + readelf = "${prefix}/readelf" + ar = "${prefix}/ar" + nm = "${prefix}/nm" + } else { + prefix = rebase_path("$clang_base_path/bin", root_build_dir) + cc = "$prefix/clang" + cxx = "$prefix/clang++" + ld = cxx + readelf = "${prefix}/readelf" + ar = "${prefix}/llvm-ar" + nm = "${prefix}/llvm-nm" + } forward_variables_from(invoker, [ diff --git a/lang/v8/files/patch-include_v8config.h b/lang/v8/files/patch-include_v8config.h index 2a1c5e2972e9..b302d21db2c1 100644 --- a/lang/v8/files/patch-include_v8config.h +++ b/lang/v8/files/patch-include_v8config.h @@ -1,21 +1,21 @@ ---- include/v8config.h.orig 2021-10-06 18:22:58 UTC +--- include/v8config.h.orig 2022-01-23 11:58:51 UTC +++ include/v8config.h -@@ -338,7 +338,18 @@ path. Add it with -I to the command line - - # define V8_HAS_CPP_ATTRIBUTE_NODISCARD (V8_HAS_CPP_ATTRIBUTE(nodiscard)) +@@ -342,7 +342,18 @@ path. Add it with -I to the command line + # define V8_HAS_CPP_ATTRIBUTE_NO_UNIQUE_ADDRESS \ + (V8_HAS_CPP_ATTRIBUTE(no_unique_address)) +// Work around Clang bug present in 9.0.1, at least. +// +// Clang stores alignment as a 32-bit unsigned integer, but V8 only uses +// V8_ASSUME_ALIGNED() for a 4GB (2^32) alignment +// (kPtrComprIsolateRootAlignment). As such, the alignment overflows and +// becomes zero, triggering an internal Clang assertion that alignment must not +// be zero. +#if 0 # define V8_HAS_BUILTIN_ASSUME_ALIGNED (__has_builtin(__builtin_assume_aligned)) +#else +# define V8_HAS_BUILTIN_ASSUME_ALIGNED 0 +#endif # define V8_HAS_BUILTIN_BSWAP16 (__has_builtin(__builtin_bswap16)) # define V8_HAS_BUILTIN_BSWAP32 (__has_builtin(__builtin_bswap32)) # define V8_HAS_BUILTIN_BSWAP64 (__has_builtin(__builtin_bswap64)) diff --git a/lang/v8/files/patch-src_api_api.cc b/lang/v8/files/patch-src_api_api.cc index b358824563e8..a853a756e0af 100644 --- a/lang/v8/files/patch-src_api_api.cc +++ b/lang/v8/files/patch-src_api_api.cc @@ -1,11 +1,11 @@ ---- src/api/api.cc.orig 2021-11-15 18:52:12 UTC +--- src/api/api.cc.orig 2022-01-23 11:58:51 UTC +++ src/api/api.cc -@@ -6054,7 +6054,7 @@ bool v8::V8::Initialize(const int build_config) { +@@ -6126,7 +6126,7 @@ bool v8::V8::Initialize(const int build_config) { return true; } -#if V8_OS_LINUX || V8_OS_MACOSX +#if V8_OS_LINUX || V8_OS_MACOSX || V8_OS_OPENBSD || V8_OS_FREEBSD bool TryHandleWebAssemblyTrapPosix(int sig_code, siginfo_t* info, void* context) { #if V8_ENABLE_WEBASSEMBLY && V8_TRAP_HANDLER_SUPPORTED diff --git a/lang/v8/files/patch-src_base_platform_platform-posix.cc b/lang/v8/files/patch-src_base_platform_platform-posix.cc index df78a73520f0..effa5c032da2 100644 --- a/lang/v8/files/patch-src_base_platform_platform-posix.cc +++ b/lang/v8/files/patch-src_base_platform_platform-posix.cc @@ -1,24 +1,24 @@ ---- src/base/platform/platform-posix.cc.orig 2021-11-15 18:52:12 UTC +--- src/base/platform/platform-posix.cc.orig 2022-01-23 11:58:51 UTC +++ src/base/platform/platform-posix.cc -@@ -511,7 +511,7 @@ bool OS::DecommitPages(void* address, size_t size) { +@@ -547,7 +547,7 @@ bool OS::FreeAddressSpaceReservation(AddressSpaceReser // static bool OS::HasLazyCommits() { -#if V8_OS_AIX || V8_OS_LINUX || V8_OS_MACOSX +#if V8_OS_AIX || V8_OS_LINUX || V8_OS_MACOSX || V8_OS_FREEBSD return true; #else // TODO(bbudge) Return true for all POSIX platforms. -@@ -650,6 +650,12 @@ int OS::GetCurrentThreadId() { +@@ -686,6 +686,12 @@ int OS::GetCurrentThreadId() { return static_cast(syscall(__NR_gettid)); #elif V8_OS_ANDROID return static_cast(gettid()); +#elif V8_OS_DRAGONFLYBSD || defined(__DragonFly__) + return static_cast(lwp_gettid()); +#elif V8_OS_FREEBSD + return static_cast(pthread_getthreadid_np()); +#elif V8_OS_NETBSD + return static_cast(_lwp_self()); #elif V8_OS_AIX return static_cast(thread_self()); #elif V8_OS_FUCHSIA diff --git a/lang/v8/pkg-plist b/lang/v8/pkg-plist index cf478d172883..79585dd8a9f1 100644 --- a/lang/v8/pkg-plist +++ b/lang/v8/pkg-plist @@ -1,112 +1,113 @@ bin/d8 bin/mkgrokdump bin/mksnapshot include/cppgc/allocation.h include/cppgc/common.h include/cppgc/cross-thread-persistent.h include/cppgc/custom-space.h include/cppgc/default-platform.h include/cppgc/ephemeron-pair.h include/cppgc/explicit-management.h include/cppgc/garbage-collected.h include/cppgc/heap-consistency.h include/cppgc/heap-state.h include/cppgc/heap-statistics.h include/cppgc/heap.h include/cppgc/internal/api-constants.h include/cppgc/internal/atomic-entry-flag.h include/cppgc/internal/caged-heap-local-data.h include/cppgc/internal/compiler-specific.h include/cppgc/internal/finalizer-trait.h include/cppgc/internal/gc-info.h include/cppgc/internal/logging.h include/cppgc/internal/name-trait.h include/cppgc/internal/persistent-node.h include/cppgc/internal/pointer-policies.h include/cppgc/internal/prefinalizer-handler.h include/cppgc/internal/write-barrier.h include/cppgc/liveness-broker.h include/cppgc/macros.h include/cppgc/member.h include/cppgc/name-provider.h include/cppgc/object-size-trait.h include/cppgc/persistent.h include/cppgc/platform.h include/cppgc/prefinalizer.h include/cppgc/process-heap-statistics.h include/cppgc/sentinel-pointer.h include/cppgc/source-location.h include/cppgc/testing.h include/cppgc/trace-trait.h include/cppgc/type-traits.h include/cppgc/visitor.h include/libplatform/libplatform-export.h include/libplatform/libplatform.h include/libplatform/v8-tracing.h include/v8-array-buffer.h include/v8-callbacks.h include/v8-container.h include/v8-context.h include/v8-cppgc.h include/v8-data.h include/v8-date.h include/v8-debug.h include/v8-embedder-heap.h +include/v8-embedder-state-scope.h include/v8-exception.h include/v8-extension.h include/v8-external.h include/v8-fast-api-calls.h include/v8-forward.h include/v8-function-callback.h include/v8-function.h include/v8-initialization.h include/v8-inspector-protocol.h include/v8-inspector.h include/v8-internal.h include/v8-isolate.h include/v8-json.h include/v8-local-handle.h include/v8-locker.h include/v8-maybe.h include/v8-memory-span.h include/v8-message.h include/v8-metrics.h include/v8-microtask-queue.h include/v8-microtask.h include/v8-object.h include/v8-persistent-handle.h include/v8-platform.h include/v8-primitive-object.h include/v8-primitive.h include/v8-profiler.h include/v8-promise.h include/v8-proxy.h include/v8-regexp.h include/v8-script.h include/v8-snapshot.h include/v8-statistics.h include/v8-template.h include/v8-traced-handle.h include/v8-typed-array.h include/v8-unwinder-state.h include/v8-unwinder.h include/v8-util.h include/v8-value-serializer-version.h include/v8-value-serializer.h include/v8-value.h include/v8-version-string.h include/v8-version.h include/v8-wasm-trap-handler-posix.h include/v8-wasm-trap-handler-win.h include/v8-wasm.h include/v8-weak-callback-info.h include/v8.h include/v8config.h lib/libchrome_zlib.so lib/libcppgc.so lib/libv8.so lib/libv8_libbase.so lib/libv8_libplatform.so libdata/pkgconfig/v8.pc libdata/pkgconfig/v8_libbase.pc libdata/pkgconfig/v8_libplatform.pc