Bug 283530

Summary: x11/pixman: Update to 0.44.2
Product: Ports & Packages Reporter: Tijl Coosemans <tijl>
Component: Individual Port(s)Assignee: freebsd-x11 (Nobody) <x11>
Status: Closed FIXED    
Severity: Affects Only Me CC: diizzy
Priority: --- Flags: bugzilla: maintainer-feedback? (x11)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch
none
patch2 none

Description Tijl Coosemans freebsd_committer freebsd_triage 2024-12-23 22:53:25 UTC
Created attachment 256081 [details]
patch

Portscout limit is no longer correct: https://lists.cairographics.org/archives/cairo-announce/2024-January/000233.html.
Availability of SIMD instructions is tested at runtime so support can always be compiled in.
Comment 1 Daniel Engberg freebsd_committer freebsd_triage 2024-12-24 08:37:32 UTC
Hi,

Have you tested runtime detection as it last time didn't cover all arch's? SIMD was also broken on aarch64 last time people checked. See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276296

Binutils is no longer needed for arm?

Please also enable unit tests

Best regards,
Daniel
Comment 2 Tijl Coosemans freebsd_committer freebsd_triage 2024-12-26 10:38:03 UTC
Created attachment 256149 [details]
patch2

Fix fetch; add TEST option; disable openmp on armv6 and armv7.
Comment 3 Tijl Coosemans freebsd_committer freebsd_triage 2024-12-26 11:38:40 UTC
(In reply to Daniel Engberg from comment #1)
For some architectures runtime detection of SIMD support isn't implemented for FreeBSD, but then it defaults to disabled so should be fine.

All unit tests succeed on aarch64 (with qemu on amd64 anyway).

Binutils is no longer needed to build the port.
Comment 4 Daniel Engberg freebsd_committer freebsd_triage 2024-12-26 13:02:09 UTC
Ahh, I see. Thanks for having a look!

For the sake of being a bit cleaner it would be nice if arch specific args were 
handled by each if statement rather than being overridden.

..also PORTVERSION = DISTVERSION

Unit tests passes on at least Tier 1 platforms?
Comment 5 Tijl Coosemans freebsd_committer freebsd_triage 2024-12-28 19:48:50 UTC
(In reply to Daniel Engberg from comment #4)
Do you mean something like this for each arch?

.if ${ARCH} == armv6
MESON_ARGS+= -Darm-simd=enabled \
             -Dopenmp=disabled
.else
MESON_ARGS+= -Darm-simd=disabled
.endif

I've run unit tests on armv7, aarch64, amd64, and i386.
Comment 6 Daniel Engberg freebsd_committer freebsd_triage 2024-12-28 20:55:37 UTC
(In reply to Tijl Coosemans from comment #5)
Hi,

Yes, although it should be an option for ARMv6 and v7 as not all hardware we support have NEON unless it's runtime detected on those platforms.

As some point it would be nice if we could expand all of this via CPUTYPE though... See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272900

Best regards,
Daniel
Comment 7 Jan Beich freebsd_committer freebsd_triage 2024-12-30 17:10:41 UTC
(In reply to Daniel Engberg from comment #6)
FreeBSD armv7 always has NEON unlike upstream target triple.

$ fetch https://download.freebsd.org/releases/arm/armv7/ISO-IMAGES/14.2/FreeBSD-14.2-RELEASE-arm-armv7-GENERICSD.img.xz
$ xz -d FreeBSD-14.2-RELEASE-arm-armv7-GENERICSD.img.xz
$ mount /dev/$(mdconfig -f FreeBSD-14.2-RELEASE-arm-armv7-GENERICSD.img.xz)s2a /mnt
$ qemu-arm-static -L /mnt /mnt/usr/bin/cc -dM -E -</dev/null | fgrep -i neon
#define __ARM_NEON 1
#define __ARM_NEON_FP 0x4
#define __ARM_NEON__ 1

vs.

$ cc -target armv7-unknown-freebsd14.2 -dM -E -</dev/null | fgrep -i neon
$ echo $?
1
Comment 8 commit-hook freebsd_committer freebsd_triage 2025-01-07 10:35:52 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=75621bf97962802a985b4bbab3a763ecbc1b18ee

commit 75621bf97962802a985b4bbab3a763ecbc1b18ee
Author:     Tijl Coosemans <tijl@FreeBSD.org>
AuthorDate: 2024-12-23 18:57:06 +0000
Commit:     Tijl Coosemans <tijl@FreeBSD.org>
CommitDate: 2025-01-07 10:34:47 +0000

    x11/pixman: Update to 0.44.2

    - Remove portscout limit.
    - Switch to meson.
    - Always enable SIMD because support is detected at runtime.
    - Drop binutils dependency because LLVM can build it now.

    PR:             283530
    Reviewed by:    diizzy

 x11/pixman/Makefile                                | 73 +++++++++++++------
 x11/pixman/distinfo                                |  6 +-
 .../patch-pixman_pixman-arm-simd-asm.S (gone)      | 84 ----------------------
 x11/pixman/files/patch-pixman_pixman-ppc.c (gone)  | 27 -------
 x11/pixman/files/patch-test_meson.build (new)      | 13 ++++
 x11/pixman/pkg-descr                               |  3 +-
 x11/pixman/pkg-plist                               |  3 +-
 7 files changed, 71 insertions(+), 138 deletions(-)