Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Jan 2024 22:33:28 +0100
From:      Jan Beich <jbeich@FreeBSD.org>
To:        Robert Nagy <rnagy@FreeBSD.org>
Cc:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   Re: git: 5d97e86feed9 - main - www/*chromium: unbreak arm64 by implementing the missing cpudetect code
Message-ID:  <ttnn-7bo7-wny@FreeBSD.org>
In-Reply-To: <202401082110.408LA9x0079225@gitrepo.freebsd.org> (Robert Nagy's message of "Mon, 8 Jan 2024 21:10:09 GMT")
References:  <202401082110.408LA9x0079225@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Robert Nagy <rnagy@FreeBSD.org> writes:

> diff --git a/www/chromium/files/patch-third__party_libvpx_source_libvpx_vpx__ports_aarch64__cpudetect.c b/www/chromium/files/patch-third__party_libvpx_source_libvpx_vpx__ports_aarch64__cpudetect.c
> new file mode 100644
> index 000000000000..92163a805c0c
> --- /dev/null
> +++ b/www/chromium/files/patch-third__party_libvpx_source_libvpx_vpx__ports_aarch64__cpudetect.c
> @@ -0,0 +1,20 @@
> +--- third_party/libvpx/source/libvpx/vpx_ports/aarch64_cpudetect.c.orig	2024-01-08 12:52:53 UTC
> ++++ third_party/libvpx/source/libvpx/vpx_ports/aarch64_cpudetect.c
> +@@ -153,7 +153,16 @@ static int arm_get_cpu_caps(void) {
> +   return flags;
> + }
> + 
> +-#else  // end __Fuchsia__
> ++#elif defined(__FreeBSD__)  // end __Fuchsia__
> ++
> ++int arm_get_cpu_caps(void) {
> ++  int flags = 0;
> ++#if HAVE_NEON
> ++  flags |= HAS_NEON;  // Neon is mandatory in Armv8.0-A.
> ++#endif  // HAVE_NEON
> ++  return flags;
> ++}
> ++#else  // end __FreeBSD__
> + #error \
> +     "Runtime CPU detection selected, but no CPU detection method available" \
> + "for your platform. Rerun configure with --disable-runtime-cpu-detect."
> diff --git a/www/ungoogled-chromium/files/patch-third__party_libvpx_source_libvpx_vpx__ports_aarch64__cpudetect.c b/www/ungoogled-chromium/files/patch-third__party_libvpx_source_libvpx_vpx__ports_aarch64__cpudetect.c

Better sync with multimedia/aom/files/patch-aom__ports_aarch64__cpudetect.c
libvpx has some aarch64 SIMD code not supported by aarch32 e.g.,

vpx_dsp/vpx_dsp.mk
143:DSP_SRCS-$(HAVE_NEON_I8MM) += arm/vpx_convolve8_neon_i8mm.c
144:DSP_SRCS-$(HAVE_NEON_I8MM) += arm/vpx_convolve_neon_i8mm.c

vpx_dsp/vpx_dsp.mk
40:DSP_SRCS-$(HAVE_NEON_DOTPROD) += arm/sse_neon_dotprod.c
141:DSP_SRCS-$(HAVE_NEON_DOTPROD) += arm/vpx_convolve8_neon_dotprod.c
142:DSP_SRCS-$(HAVE_NEON_DOTPROD) += arm/vpx_convolve_neon_dotprod.c
381:DSP_SRCS-$(HAVE_NEON_DOTPROD) += arm/sad4d_neon_dotprod.c
383:DSP_SRCS-$(HAVE_NEON_DOTPROD) += arm/sad_neon_dotprod.c
426:DSP_SRCS-$(HAVE_NEON_DOTPROD)   += arm/variance_neon_dotprod.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ttnn-7bo7-wny>