Index: head/www/chromium/Makefile =================================================================== --- head/www/chromium/Makefile (revision 499209) +++ head/www/chromium/Makefile (revision 499210) @@ -1,342 +1,342 @@ # Created by: Florent Thoumie # $FreeBSD$ PORTNAME= chromium PORTVERSION= 73.0.3683.103 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES?= www MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ \ LOCAL/cpm/chromium/:fonts DISTFILES= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER?= chromium@FreeBSD.org COMMENT?= Google web browser based on WebKit LICENSE= BSD3CLAUSE LGPL21 MPL11 LICENSE_COMB= multi BUILD_DEPENDS= bash:shells/bash \ ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}ply>0:devel/py-ply@${PY_FLAVOR} \ .if !defined(GN_ONLY) BUILD_DEPENDS+= gperf:devel/gperf \ yasm:devel/yasm \ ffmpeg>=3.2.2,1:multimedia/ffmpeg \ flock:sysutils/flock \ node:www/node \ ${LOCALBASE}/bin/ar:devel/binutils \ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \ ${LOCALBASE}/share/usbids/usb.ids:misc/usbids \ ${PYTHON_PKGNAMEPREFIX}html5lib>0:www/py-html5lib@${PY_FLAVOR} .endif .if !defined(GN_ONLY) LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-atk \ libatspi.so:accessibility/at-spi2-core \ libspeechd.so:accessibility/speech-dispatcher \ libsnappy.so:archivers/snappy \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ libspeex.so:audio/speex \ libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib \ libicuuc.so:devel/icu \ libjsoncpp.so:devel/jsoncpp \ libpci.so:devel/libpci \ libnspr4.so:devel/nspr \ libre2.so:devel/re2 \ libcairo.so:graphics/cairo \ libdrm.so:graphics/libdrm \ libexif.so:graphics/libexif \ libpng.so:graphics/png \ libwebp.so:graphics/webp \ libavcodec.so:multimedia/ffmpeg \ libopenh264.so:multimedia/openh264 \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libharfbuzz-icu.so:print/harfbuzz-icu \ libgcrypt.so:security/libgcrypt \ libsecret-1.so:security/libsecret \ libnss3.so:security/nss \ libexpat.so:textproc/expat2 \ libfontconfig.so:x11-fonts/fontconfig RUN_DEPENDS= xdg-open:devel/xdg-utils \ noto-basic>0:x11-fonts/noto-basic BROKEN_FreeBSD_11_aarch64= components/safe_browsing_db/v4_rice.cc:120:18: use of overloaded operator '&' is ambiguous ONLY_FOR_ARCHS= aarch64 amd64 i386 .endif .if defined(GN_ONLY) USES= compiler:c++14-lang dos2unix localbase:ldflags ninja pkgconfig \ python:2.7,build shebangfix tar:xz .else USES= bison cpe desktop-file-utils dos2unix gl gnome jpeg localbase:ldflags \ ninja perl5 pkgconfig python:2.7,build shebangfix tar:xz .endif MAKE_ARGS= -C out/${BUILDTYPE} BINARY_ALIAS= python=${PYTHON_CMD} DOS2UNIX_FILES= third_party/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h .if !defined(GN_ONLY) CPE_VENDOR= google CPE_PRODUCT= chrome USE_GL= gl USE_LDCONFIG= ${DATADIR} USE_PERL5= build USE_XORG= x11 xcb xcomposite xcursor xext xdamage xfixes xi \ xorgproto xrandr xrender xscrnsaver xtst USE_GNOME= atk dconf glib20 gtk30 libxml2 libxslt SHEBANG_FILES= chrome/tools/build/linux/chrome-wrapper ALL_TARGET= chrome INSTALLS_ICONS= yes .endif EXTRA_PATCHES+= ${FILESDIR}/extra-patch-clang # TODO bz@ : install libwidevinecdm.so (see third_party/widevine/cdm/BUILD.gn) # # Run "./out/${BUILDTYPE}/gn args out/${BUILDTYPE} --list" 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 \ enable_hangout_services_extension=true \ enable_nacl=false \ enable_one_click_signin=true \ enable_remoting=false \ fieldtrial_testing_like_official_build=true \ is_clang=true \ jumbo_file_merge_limit=8 \ toolkit_views=true \ treat_warnings_as_errors=false \ use_allocator="none" \ use_allocator_shim=false \ use_aura=true \ use_bundled_fontconfig=false \ use_custom_libcxx=false \ use_gnome_keyring=false \ use_jumbo_build=true \ use_lld=true \ use_sysroot=false \ use_system_freetype=true \ use_system_harfbuzz=true \ use_system_libjpeg=true \ extra_cxxflags="${CXXFLAGS}" \ extra_ldflags="${LDFLAGS}" # TODO: investigate building with these options: # use_system_minigbm GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles # FreeBSD Chromium Api Key # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys . # Note: these are for FreeBSD use ONLY. For your own distribution, # please get your own set of keys. GN_ARGS+= google_api_key="AIzaSyBsp9n41JLW8jCokwn7vhoaMejDFRd1mp8" \ google_default_client_id="996322985003.apps.googleusercontent.com" \ google_default_client_secret="IR1za9-1VK0zZ0f_O8MVFicn" .if !defined(GN_ONLY) SUB_FILES= chromium-browser.desktop chrome pkg-message SUB_LIST+= COMMENT="${COMMENT}" OPTIONS_DEFINE= CODECS CUPS DEBUG DRIVER KERBEROS TEST CODECS_DESC= Compile and enable patented codecs like H.264 DRIVER_DESC= Install chromedriver OPTIONS_GROUP= AUDIO OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO SNDIO OPTIONS_DEFAULT= ALSA CODECS CUPS DRIVER KERBEROS OPTIONS_SUB= yes ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins \ alsa-lib>=1.1.1_1:audio/alsa-lib ALSA_VARS= GN_ARGS+=use_alsa=true ALSA_VARS_OFF= GN_ARGS+=use_alsa=false CODECS_VARS= GN_ARGS+=ffmpeg_branding="Chrome" \ GN_ARGS+=proprietary_codecs=true \ GN_ARGS+=enable_hevc_demuxing=true CODECS_VARS_OFF= GN_ARGS+=ffmpeg_branding="Chromium" \ GN_ARGS+=proprietary_codecs=false \ GN_ARGS+=enable_hevc_demuxing=false CUPS_LIB_DEPENDS= libcups.so:print/cups CUPS_VARS= GN_ARGS+=use_cups=true CUPS_VARS_OFF= GN_ARGS+=use_cups=false DEBUG_VARS= BUILDTYPE=Debug \ GN_ARGS+=is_debug=true \ GN_ARGS+=is_component_build=false \ GN_BOOTSTRAP_FLAGS+=--debug \ WANTSPACE="lots of free disk space (~ 13GB)" DEBUG_VARS_OFF= BUILDTYPE=Release \ GN_ARGS+=is_debug=false \ GN_ARGS+=is_official_build=true \ GN_ARGS+=symbol_level=0 \ GN_ARGS+=remove_webcore_debug_symbols=true \ WANTSPACE="a fair amount of free disk space (~ 6.5GB)" DRIVER_MAKE_ARGS= chromedriver KERBEROS_VARS= GN_ARGS+=use_kerberos=true KERBEROS_VARS_OFF= GN_ARGS+=use_kerberos=false PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false # With SNDIO=on we exclude audio_manager_linux from the build (see # media/audio/BUILD.gn) and use audio_manager_openbsd which does not # support falling back to ALSA or PulseAudio. SNDIO_PREVENTS= ALSA PULSEAUDIO SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio SNDIO_VARS= GN_ARGS+=use_sndio=true SNDIO_VARS_OFF= GN_ARGS+=use_sndio=false .endif .include "Makefile.tests" TEST_ALL_TARGET= ${TEST_TARGETS} TEST_DISTFILES= ${PORTNAME}-${DISTVERSION}-testdata${EXTRACT_SUFX} \ test_fonts${EXTRACT_SUFX}:fonts .include # swiftshader/lib/{libEGL.so,libGLESv2.so} is x86 only .if ${ARCH} == aarch64 PLIST_SUB+= NOT_AARCH64="@comment " .else PLIST_SUB+= NOT_AARCH64="" .endif # Make better javascript with java -.if (${ARCH} == amd64 || ${ARCH} == i386) && !defined(GN_ONLY) +.if !defined(GN_ONLY) JAVA_BUILD= yes JAVA_VERSION= 1.8 USE_JAVA= yes .endif # Allow relocations against read-only segments (override lld default) LDFLAGS_i386= -Wl,-znotext # TODO: -isystem, would be just as ugly as this approach, but more reliably # build would fail without C_INCLUDE_PATH/CPLUS_INCLUDE_PATH env var set. MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \ CPLUS_INCLUDE_PATH=${LOCALBASE}/include .if !defined(GN_ONLY) pre-everything:: @${ECHO_MSG} @${ECHO_MSG} "To build Chromium, you should have around 2GB of memory" @${ECHO_MSG} "and ${WANTSPACE}." @${ECHO_MSG} post-extract-TEST-on: @${MKDIR} ${WRKSRC}/third_party/test_fonts/test_fonts @${MV} ${WRKDIR}/test_fonts ${WRKSRC}/third_party/test_fonts/ post-patch: @${REINPLACE_CMD} -e 's|@@PACKAGE@@|chromium|' \ -e 's|@@MENUNAME@@|Chromium Web Browser|' \ ${WRKSRC}/chrome/app/resources/manpage.1.in post-patch-SNDIO-on: @${MKDIR} ${WRKSRC}/media/audio/sndio ${WRKSRC}/media/audio/openbsd @${CP} ${FILESDIR}/sndio_output.* ${WRKSRC}/media/audio/sndio @${CP} ${FILESDIR}/sndio_input.* ${WRKSRC}/media/audio/sndio @${CP} ${FILESDIR}/audio_manager_openbsd.* ${WRKSRC}/media/audio/openbsd pre-configure: # We used to remove bundled libraries to be sure that chromium uses # system libraries and not shipped ones. # cd ${WRKSRC} && ${PYTHON_CMD} \ #./build/linux/unbundle/remove_bundled_libraries.py [list of preserved] cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \ ./build/linux/unbundle/replace_gn_files.py --system-libraries \ ffmpeg flac freetype harfbuzz-ng libdrm libusb libwebp libxml libxslt openh264 opus snappy yasm || ${FALSE} .endif do-configure: # GN generator bootstrapping and generating ninja files cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} CC=${CC} CXX=${CXX} LD=${CXX} \ READELF=${READELF} AR=${AR} NM=${NM} ${PYTHON_CMD} \ ./tools/gn/bootstrap/bootstrap.py ${GN_BOOTSTRAP_FLAGS} .if !defined(GN_ONLY) cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./out/${BUILDTYPE}/gn \ gen --args='${GN_ARGS}' out/${BUILDTYPE} # Setup nodejs dependency @${MKDIR} ${WRKSRC}/third_party/node/freebsd/node-freebsd-x64/bin ${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/freebsd/node-freebsd-x64/bin/node # Setup java dependency on amd64 and i386 .if ${ARCH} == amd64 || ${ARCH} == i386 @${MKDIR} ${WRKDIR}/bin ${LN} -sf ${LOCALBASE}/openjdk8/bin/java ${WRKDIR}/bin/java .endif .endif do-test-TEST-on: .for t in ${TEST_TARGETS} cd ${WRKSRC}/out/${BUILDTYPE} && ${SETENV} LC_ALL=en_US.UTF-8 \ ./${t} --gtest_filter=-${EXCLUDE_${t}:ts:} || ${TRUE} .endfor .if !defined(GN_ONLY) do-install: @${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_MAN} ${WRKSRC}/chrome/app/resources/manpage.1.in \ ${STAGEDIR}${MANPREFIX}/man/man1/chrome.1 .for s in 22 24 48 64 128 256 @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps ${INSTALL_DATA} ${WRKSRC}/chrome/app/theme/chromium/product_logo_${s}.png \ ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps/chrome.png .endfor ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*.png ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*.pak ${STAGEDIR}${DATADIR} .for d in protoc icudtl.dat mksnapshot natives_blob.bin snapshot_blob.bin v8_context_snapshot.bin ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${d} ${STAGEDIR}${DATADIR} .endfor ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chrome \ ${STAGEDIR}${DATADIR} cd ${WRKSRC}/out/${BUILDTYPE} && \ ${COPYTREE_SHARE} "locales resources" ${STAGEDIR}${DATADIR} @${MKDIR} ${STAGEDIR}${DESKTOPDIR} ${INSTALL_DATA} ${WRKDIR}/chromium-browser.desktop \ ${STAGEDIR}${DESKTOPDIR} ${INSTALL_SCRIPT} ${WRKDIR}/chrome ${STAGEDIR}${PREFIX}/bin ${INSTALL_SCRIPT} ${WRKSRC}/chrome/tools/build/linux/chrome-wrapper \ ${STAGEDIR}${DATADIR} # ANGLE .for f in libEGL.so libGLESv2.so ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} .endfor # SwiftShader .if ${ARCH} != aarch64 @${MKDIR} ${STAGEDIR}${DATADIR}/swiftshader .for g in libEGL.so libGLESv2.so ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/swiftshader/${g} \ ${STAGEDIR}${DATADIR}/swiftshader .endfor .endif post-install-DEBUG-on: ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/*.so \ ${STAGEDIR}${DATADIR} ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/character_data_generator \ ${STAGEDIR}${DATADIR} post-install-DRIVER-on: ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chromedriver \ ${STAGEDIR}${PREFIX}/bin .endif .include Index: head/www/chromium/files/patch-build_detect__host__arch.py =================================================================== --- head/www/chromium/files/patch-build_detect__host__arch.py (nonexistent) +++ head/www/chromium/files/patch-build_detect__host__arch.py (revision 499210) @@ -0,0 +1,11 @@ +--- build/detect_host_arch.py.orig 2019-04-04 10:22:51.354518000 +0200 ++++ build/detect_host_arch.py 2019-04-04 10:23:07.641855000 +0200 +@@ -19,6 +19,8 @@ def HostArch(): + host_arch = 'ia32' + elif host_arch in ['x86_64', 'amd64']: + host_arch = 'x64' ++ elif host_arch.startswith('arm64'): ++ host_arch = 'arm64' + elif host_arch.startswith('arm'): + host_arch = 'arm' + elif host_arch.startswith('aarch64'): Property changes on: head/www/chromium/files/patch-build_detect__host__arch.py ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/chromium/files/patch-third__party_boringssl_src_crypto_cpu-aarch64-linux.c =================================================================== --- head/www/chromium/files/patch-third__party_boringssl_src_crypto_cpu-aarch64-linux.c (revision 499209) +++ head/www/chromium/files/patch-third__party_boringssl_src_crypto_cpu-aarch64-linux.c (revision 499210) @@ -1,54 +1,63 @@ ---- third_party/boringssl/src/crypto/cpu-aarch64-linux.c.orig 2019-03-11 22:07:58 UTC -+++ third_party/boringssl/src/crypto/cpu-aarch64-linux.c -@@ -14,49 +14,7 @@ +--- third_party/boringssl/src/crypto/cpu-aarch64-linux.c.orig 2019-04-05 02:55:11.000000000 +0200 ++++ third_party/boringssl/src/crypto/cpu-aarch64-linux.c 2019-04-15 08:45:47.936052000 +0200 +@@ -14,49 +14,35 @@ #include -#if defined(OPENSSL_AARCH64) && defined(OPENSSL_LINUX) && \ - !defined(OPENSSL_STATIC_ARMCAP) -- ++#if defined(OPENSSL_AARCH64) + -#include - --#include + #include + + #include "internal.h" + - --#include "internal.h" -- -- --extern uint32_t OPENSSL_armcap_P; -- -+#ifdef __FreeBSD__ + extern uint32_t OPENSSL_armcap_P; + ++#include ++#include ++ void OPENSSL_cpuid_setup(void) { - unsigned long hwcap = getauxval(AT_HWCAP); -- ++ uint64_t id_aa64isar0; + - // See /usr/include/asm/hwcap.h on an aarch64 installation for the source of - // these values. - static const unsigned long kNEON = 1 << 1; - static const unsigned long kAES = 1 << 3; - static const unsigned long kPMULL = 1 << 4; - static const unsigned long kSHA1 = 1 << 5; - static const unsigned long kSHA256 = 1 << 6; -- ++ id_aa64isar0 = READ_SPECIALREG(ID_AA64ISAR0_EL1); + - if ((hwcap & kNEON) == 0) { - // Matching OpenSSL, if NEON is missing, don't report other features - // either. - return; - } - -- OPENSSL_armcap_P |= ARMV7_NEON; -- + OPENSSL_armcap_P |= ARMV7_NEON; + - if (hwcap & kAES) { -- OPENSSL_armcap_P |= ARMV8_AES; -- } ++ if (ID_AA64ISAR0_AES(id_aa64isar0) == ID_AA64ISAR0_AES_BASE) { + OPENSSL_armcap_P |= ARMV8_AES; + } - if (hwcap & kPMULL) { -- OPENSSL_armcap_P |= ARMV8_PMULL; -- } ++ if (ID_AA64ISAR0_AES(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL) { + OPENSSL_armcap_P |= ARMV8_PMULL; + } - if (hwcap & kSHA1) { -- OPENSSL_armcap_P |= ARMV8_SHA1; -- } ++ if (ID_AA64ISAR0_SHA1(id_aa64isar0) == ID_AA64ISAR0_SHA1_BASE) { + OPENSSL_armcap_P |= ARMV8_SHA1; + } - if (hwcap & kSHA256) { -- OPENSSL_armcap_P |= ARMV8_SHA256; -- } ++ if(ID_AA64ISAR0_SHA2(id_aa64isar0) == ID_AA64ISAR0_SHA2_BASE) { + OPENSSL_armcap_P |= ARMV8_SHA256; + } } - -#endif // OPENSSL_AARCH64 && !OPENSSL_STATIC_ARMCAP -+#endif ++#endif // OPENSSL_AARCH64 Index: head/www/chromium/files/patch-third__party_crc32c_src_src_crc32c__arm64__linux__check.h =================================================================== --- head/www/chromium/files/patch-third__party_crc32c_src_src_crc32c__arm64__linux__check.h (revision 499209) +++ head/www/chromium/files/patch-third__party_crc32c_src_src_crc32c__arm64__linux__check.h (revision 499210) @@ -1,19 +1,53 @@ ---- third_party/crc32c/src/src/crc32c_arm64_linux_check.h.orig 2019-03-11 22:07:59 UTC -+++ third_party/crc32c/src/src/crc32c_arm64_linux_check.h -@@ -29,6 +29,8 @@ extern "C" unsigned long getauxval(unsigned long type) +--- third_party/crc32c/src/src/crc32c_arm64_linux_check.h.orig 2019-04-05 02:55:11.000000000 +0200 ++++ third_party/crc32c/src/src/crc32c_arm64_linux_check.h 2019-04-15 08:43:01.276910000 +0200 +@@ -7,8 +7,6 @@ + #ifndef CRC32C_CRC32C_ARM_LINUX_CHECK_H_ + #define CRC32C_CRC32C_ARM_LINUX_CHECK_H_ + +-// X86-specific code checking for the availability of SSE4.2 instructions. +- + #include + #include + +@@ -16,30 +14,19 @@ + + #if HAVE_ARM64_CRC32C + +-#if HAVE_STRONG_GETAUXVAL +-#include +-#elif HAVE_WEAK_GETAUXVAL +-// getauxval() is not available on Android until API level 20. Link it as a weak +-// symbol. +-extern "C" unsigned long getauxval(unsigned long type) __attribute__((weak)); +- +-#define AT_HWCAP 16 +-#endif // HAVE_STRONG_GETAUXVAL || HAVE_WEAK_GETAUXVAL +- ++#include ++#include namespace crc32c { - inline bool CanUseArm64Linux() { -+return false; -+#if 0 - #if HAVE_STRONG_GETAUXVAL || HAVE_WEAK_GETAUXVAL - // From 'arch/arm64/include/uapi/asm/hwcap.h' in Linux kernel source code. - constexpr unsigned long kHWCAP_PMULL = 1 << 4; -@@ -39,6 +41,7 @@ inline bool CanUseArm64Linux() { - #else - return false; - #endif // HAVE_STRONG_GETAUXVAL || HAVE_WEAK_GETAUXVAL -+#endif - } +-inline bool CanUseArm64Linux() { +-#if HAVE_STRONG_GETAUXVAL || HAVE_WEAK_GETAUXVAL +- // From 'arch/arm64/include/uapi/asm/hwcap.h' in Linux kernel source code. +- constexpr unsigned long kHWCAP_PMULL = 1 << 4; +- constexpr unsigned long kHWCAP_CRC32 = 1 << 7; +- unsigned long hwcap = (&getauxval != nullptr) ? getauxval(AT_HWCAP) : 0; +- return (hwcap & (kHWCAP_PMULL | kHWCAP_CRC32)) == +- (kHWCAP_PMULL | kHWCAP_CRC32); +-#else +- return false; +-#endif // HAVE_STRONG_GETAUXVAL || HAVE_WEAK_GETAUXVAL +-} ++ inline bool CanUseArm64Linux() { ++ uint64_t id_aa64isar0; ++ ++ id_aa64isar0 = READ_SPECIALREG(ID_AA64ISAR0_EL1); ++ if ((ID_AA64ISAR0_AES(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL) && \ ++ (ID_AA64ISAR0_CRC32(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE)) ++ return true; ++ return false; ++ } } // namespace crc32c + Index: head/www/chromium/files/patch-third__party_swiftshader_third__party_llvm-7.0_configs_linux_include_llvm_Config_config.h =================================================================== --- head/www/chromium/files/patch-third__party_swiftshader_third__party_llvm-7.0_configs_linux_include_llvm_Config_config.h (nonexistent) +++ head/www/chromium/files/patch-third__party_swiftshader_third__party_llvm-7.0_configs_linux_include_llvm_Config_config.h (revision 499210) @@ -0,0 +1,152 @@ +--- third_party/swiftshader/third_party/llvm-7.0/configs/linux/include/llvm/Config/config.h.orig 2019-04-05 02:55:18.000000000 +0200 ++++ third_party/swiftshader/third_party/llvm-7.0/configs/linux/include/llvm/Config/config.h 2019-04-17 10:09:09.339341000 +0200 +@@ -8,15 +8,15 @@ + #define BUG_REPORT_URL "https://bugs.llvm.org/" + + /* Define to 1 to enable backtraces, and to 0 otherwise. */ +-/* #undef ENABLE_BACKTRACES */ ++#define ENABLE_BACKTRACES 1 + + /* Define to 1 to enable crash overrides, and to 0 otherwise. */ +-/* #undef ENABLE_CRASH_OVERRIDES */ ++#define ENABLE_CRASH_OVERRIDES 1 + + /* Define to 1 if you have the `backtrace' function. */ +-/* #undef HAVE_BACKTRACE */ ++#define HAVE_BACKTRACE TRUE + +-/* #undef BACKTRACE_HEADER */ ++#define BACKTRACE_HEADER + + /* Define to 1 if you have the header file. */ + /* #undef HAVE_CRASHREPORTERCLIENT_H */ +@@ -26,7 +26,7 @@ + + /* Define to 1 if you have the declaration of `arc4random', and to 0 if you + don't. */ +-#define HAVE_DECL_ARC4RANDOM 0 ++#define HAVE_DECL_ARC4RANDOM 1 + + /* Define to 1 if you have the declaration of `FE_ALL_EXCEPT', and to 0 if you + don't. */ +@@ -50,7 +50,7 @@ + #define HAVE_DLOPEN 1 + + /* Define if dladdr() is available on this platform. */ +-/* #undef HAVE_DLADDR */ ++#define HAVE_DLADDR 1 + + /* Define to 1 if you have the header file. */ + #define HAVE_ERRNO_H 1 +@@ -89,7 +89,7 @@ + #define HAVE_ISATTY 1 + + /* Define to 1 if you have the `edit' library (-ledit). */ +-/* #undef HAVE_LIBEDIT */ ++#define HAVE_LIBEDIT 1 + + /* Define to 1 if you have the `pfm' library (-lpfm). */ + /* #undef HAVE_LIBPFM */ +@@ -107,25 +107,25 @@ + /* #undef HAVE_PTHREAD_SETNAME_NP */ + + /* Define to 1 if you have the `z' library (-lz). */ +-/* #undef HAVE_LIBZ */ ++#define HAVE_LIBZ 1 + + /* Define to 1 if you have the header file. */ + #define HAVE_LINK_H 1 + + /* Define to 1 if you have the `lseek64' function. */ +-#define HAVE_LSEEK64 1 ++/* #undef HAVE_LSEEK64 */ + + /* Define to 1 if you have the header file. */ + /* #undef HAVE_MACH_MACH_H */ + + /* Define to 1 if you have the `mallctl' function. */ +-/* #undef HAVE_MALLCTL */ ++#define HAVE_MALLCTL 1 + + /* Define to 1 if you have the `mallinfo' function. */ +-#define HAVE_MALLINFO 1 ++/* #undef HAVE_MALLINFO */ + + /* Define to 1 if you have the header file. */ +-#define HAVE_MALLOC_H 1 ++/* #undef HAVE_MALLOC_H */ + + /* Define to 1 if you have the header file. */ + /* #undef HAVE_MALLOC_MALLOC_H */ +@@ -137,7 +137,7 @@ + #define HAVE_POSIX_FALLOCATE 1 + + /* Define to 1 if you have the `posix_spawn' function. */ +-/* #undef HAVE_POSIX_SPAWN */ ++#define HAVE_POSIX_SPAWN 1 + + /* Define to 1 if you have the `pread' function. */ + #define HAVE_PREAD 1 +@@ -158,16 +158,16 @@ + #define HAVE_REALPATH 1 + + /* Define to 1 if you have the `sbrk' function. */ +-#define HAVE_SBRK 1 ++/* #undef HAVE_SBRK */ + + /* Define to 1 if you have the `setenv' function. */ + #define HAVE_SETENV 1 + + /* Define to 1 if you have the `sched_getaffinity' function. */ +-#define HAVE_SCHED_GETAFFINITY 1 ++/* #undef HAVE_SCHED_GETAFFINITY */ + + /* Define to 1 if you have the `CPU_COUNT' macro. */ +-#define HAVE_CPU_COUNT 1 ++/* #undef HAVE_CPU_COUNT */ + + /* Define to 1 if you have the `setrlimit' function. */ + #define HAVE_SETRLIMIT 1 +@@ -209,13 +209,13 @@ + #define HAVE_SYS_TYPES_H 1 + + /* Define if the setupterm() function is supported this platform. */ +-/* #undef HAVE_TERMINFO */ ++#define HAVE_TERMINFO 1 + + /* Define if the xar_open() function is supported this platform. */ + /* #undef HAVE_LIBXAR */ + + /* Define to 1 if you have the header file. */ +-/* #undef HAVE_TERMIOS_H */ ++#define HAVE_TERMIOS_H 1 + + /* Define to 1 if you have the header file. */ + #define HAVE_UNISTD_H 1 +@@ -224,7 +224,7 @@ + /* #undef HAVE_VALGRIND_VALGRIND_H */ + + /* Define to 1 if you have the header file. */ +-/* #undef HAVE_ZLIB_H */ ++#define HAVE_ZLIB_H 1 + + /* Have host's _alloca */ + /* #undef HAVE__ALLOCA */ +@@ -298,7 +298,7 @@ + #elif defined(__arm__) + #define LLVM_DEFAULT_TARGET_TRIPLE "armv7-linux-gnueabihf" + #elif defined(__aarch64__) +-#define LLVM_DEFAULT_TARGET_TRIPLE "aarch64-linux-gnu" ++#define LLVM_DEFAULT_TARGET_TRIPLE "aarch64-portbld-freebsd" + #elif defined(__mips__) + #define LLVM_DEFAULT_TARGET_TRIPLE "mipsel-linux-gnu" + #elif defined(__mips64) +@@ -308,7 +308,7 @@ + #endif + + /* Define if zlib compression is available */ +-#define LLVM_ENABLE_ZLIB 0 ++#define LLVM_ENABLE_ZLIB 1 + + /* Define if overriding target triple is enabled */ + /* #undef LLVM_TARGET_TRIPLE_ENV */ Property changes on: head/www/chromium/files/patch-third__party_swiftshader_third__party_llvm-7.0_configs_linux_include_llvm_Config_config.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/chromium/files/patch-third__party_swiftshader_third__party_llvm-7.0_configs_linux_include_llvm_Config_llvm-config.h =================================================================== --- head/www/chromium/files/patch-third__party_swiftshader_third__party_llvm-7.0_configs_linux_include_llvm_Config_llvm-config.h (nonexistent) +++ head/www/chromium/files/patch-third__party_swiftshader_third__party_llvm-7.0_configs_linux_include_llvm_Config_llvm-config.h (revision 499210) @@ -0,0 +1,20 @@ +--- third_party/swiftshader/third_party/llvm-7.0/configs/linux/include/llvm/Config/llvm-config.h.orig 2019-04-05 02:55:18.000000000 +0200 ++++ third_party/swiftshader/third_party/llvm-7.0/configs/linux/include/llvm/Config/llvm-config.h 2019-04-17 10:09:09.340636000 +0200 +@@ -28,7 +28,7 @@ + #elif defined(__arm__) + #define LLVM_DEFAULT_TARGET_TRIPLE "armv7-linux-gnueabihf" + #elif defined(__aarch64__) +-#define LLVM_DEFAULT_TARGET_TRIPLE "aarch64-linux-gnu" ++#define LLVM_DEFAULT_TARGET_TRIPLE "aarch64-portbld-freebsd" + #elif defined(__mips__) + #define LLVM_DEFAULT_TARGET_TRIPLE "mipsel-linux-gnu" + #elif defined(__mips64) +@@ -51,7 +51,7 @@ + #elif defined(__arm__) + #define LLVM_HOST_TRIPLE "armv7-linux-gnueabihf" + #elif defined(__aarch64__) +-#define LLVM_HOST_TRIPLE "aarch64-linux-gnu" ++#define LLVM_HOST_TRIPLE "aarch64-portbld-freebsd" + #elif defined(__mips__) + #define LLVM_HOST_TRIPLE "mipsel-linux-gnu" + #elif defined(__mips64) Property changes on: head/www/chromium/files/patch-third__party_swiftshader_third__party_llvm-7.0_configs_linux_include_llvm_Config_llvm-config.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/chromium/files/patch-third__party_zlib_arm__features.c =================================================================== --- head/www/chromium/files/patch-third__party_zlib_arm__features.c (revision 499209) +++ head/www/chromium/files/patch-third__party_zlib_arm__features.c (revision 499210) @@ -1,28 +1,97 @@ ---- third_party/zlib/arm_features.c.orig 2019-03-11 22:01:18 UTC -+++ third_party/zlib/arm_features.c -@@ -21,9 +21,10 @@ int ZLIB_INTERNAL arm_cpu_enable_pmull = 0; - #include - #include - #else +--- third_party/zlib/arm_features.c.orig 2019-04-05 02:50:06.000000000 +0200 ++++ third_party/zlib/arm_features.c 2019-04-15 14:59:36.552326000 +0200 +@@ -8,83 +8,30 @@ + + #include "zutil.h" + +-int ZLIB_INTERNAL arm_cpu_enable_crc32 = 0; +-int ZLIB_INTERNAL arm_cpu_enable_pmull = 0; +- +-#if !defined(_MSC_VER) + #include + #include ++#include ++#include + +-#if defined(ARMV8_OS_ANDROID) +-#include +-#elif defined(ARMV8_OS_LINUX) +-#include +-#include +-#else -#error ### No ARM CPU features detection in your platform/OS -+/* #error ### No ARM CPU features detection in your platform/OS */ - #endif +-#endif ++int ZLIB_INTERNAL arm_cpu_enable_crc32 = 0; ++int ZLIB_INTERNAL arm_cpu_enable_pmull = 0; -+#ifdef ARMV8_OS_LINUX static pthread_once_t cpu_check_inited_once = PTHREAD_ONCE_INIT; static void init_arm_features(void) -@@ -55,10 +56,13 @@ static void init_arm_features(void) - if (capabilities & flag_pmull) + { +- uint64_t flag_crc32 = 0, flag_pmull = 0, capabilities = 0; ++#if defined (__aarch64__) ++ uint64_t id_aa64isar0; + +-#if defined(ARMV8_OS_ANDROID) +- flag_crc32 = ANDROID_CPU_ARM_FEATURE_CRC32; +- flag_pmull = ANDROID_CPU_ARM_FEATURE_PMULL; +- capabilities = android_getCpuFeatures(); +-#elif defined(ARMV8_OS_LINUX) +- #if defined(__aarch64__) +- flag_crc32 = HWCAP_CRC32; +- flag_pmull = HWCAP_PMULL; +- capabilities = getauxval(AT_HWCAP); +- #elif defined(__ARM_NEON) || defined(__ARM_NEON__) +- /* The use of HWCAP2 is for getting features of newer ARMv8-A SoCs +- * while running in 32bits mode (i.e. aarch32). +- */ +- flag_crc32 = HWCAP2_CRC32; +- flag_pmull = HWCAP2_PMULL; +- capabilities = getauxval(AT_HWCAP2); +- #endif +-#endif +- +- if (capabilities & flag_crc32) +- arm_cpu_enable_crc32 = 1; +- +- if (capabilities & flag_pmull) ++ id_aa64isar0 = READ_SPECIALREG(ID_AA64ISAR0_EL1); ++ if (ID_AA64ISAR0_AES(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL) arm_cpu_enable_pmull = 1; - } ++ if (ID_AA64ISAR0_CRC32(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE) ++ arm_cpu_enable_crc32 = 1; +#endif + } void ZLIB_INTERNAL arm_check_features(void) { -+#ifdef ARMV8_OS_LINUX pthread_once(&cpu_check_inited_once, init_arm_features); -+#endif } - #else - #include +-#else +-#include +- +-static BOOL CALLBACK _arm_check_features(PINIT_ONCE once, +- PVOID param, +- PVOID *context); +-static INIT_ONCE cpu_check_inited_once = INIT_ONCE_STATIC_INIT; +- +- +-void ZLIB_INTERNAL arm_check_features(void) +-{ +- InitOnceExecuteOnce(&cpu_check_inited_once, _arm_check_features, +- NULL, NULL); +-} +- +-static BOOL CALLBACK _arm_check_features(PINIT_ONCE once, +- PVOID param, +- PVOID *context) +-{ +- if (IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE)) +- arm_cpu_enable_crc32 = 1; +- +- if (IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE)) +- arm_cpu_enable_pmull = 1; +- +- return TRUE; +-} +-#endif /* _MSC_VER */ Index: head/www/chromium/files/patch-tools_gn_util_sys__info.cc =================================================================== --- head/www/chromium/files/patch-tools_gn_util_sys__info.cc (nonexistent) +++ head/www/chromium/files/patch-tools_gn_util_sys__info.cc (revision 499210) @@ -0,0 +1,11 @@ +--- tools/gn/util/sys_info.cc.orig 2019-04-04 13:16:59.443413000 +0200 ++++ tools/gn/util/sys_info.cc 2019-04-04 13:17:14.281724000 +0200 +@@ -28,6 +28,8 @@ std::string OperatingSystemArchitecture() { + arch = "x86"; + } else if (arch == "amd64") { + arch = "x86_64"; ++ } else if (arch == "arm64") { ++ arch = "aarch64"; + } else if (std::string(info.sysname) == "AIX") { + arch = "ppc64"; + } Property changes on: head/www/chromium/files/patch-tools_gn_util_sys__info.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property