From nobody Tue Jun 27 10:14:37 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qr0v15zCRz4k5VB; Tue, 27 Jun 2023 10:14:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qr0v14qWxz3GvD; Tue, 27 Jun 2023 10:14:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687860877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=thMyCFImKPYyxQy3IS5huaeePS1m6IH9tLEgmHPXHdQ=; b=I4TcWsTbg9eYUMutGQOknDUugfBtnR+lu8rOAFB+lcta2uZ2Ws5h8RhB0h4cfweIpvNrnr UkpLI6C0Lfk7tpSpBQz3Y8hcFAJ2fSsBQlxR3zX710uQwfFGbn0+CAh2D8DIZbmbc5xAFr fkyS/luMfQ1qbUM50eMFi9oeETgk1HbI1g3ggkK09FvzHshkgCNqu3oJZE2gBOMAd6L3lU 7wb08cw2jeZWWqT6MALLWRgoWCERfgRx6OkfsucRO9ijHEomN45wJX302SWIWgIlpuvEYy +BvTNEHyVCpaUmhPXP5qGoIiJ9yidZSHQ5GszXkZPcWAX5+TlLhLTLVAdHG1iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687860877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=thMyCFImKPYyxQy3IS5huaeePS1m6IH9tLEgmHPXHdQ=; b=lMyqbYGy4ZtYvBvmARv+lWNCFFxLckmNpj5cKVjDZ4l+BrXwkMgx9Fx6O1GwHuf4pbGq0J Pd5MsNai+/xnt6yew9e/eSlLKIaoX7uR6iuzDNfr7H/fdFzNPWRTKcTXHOgt7LrtlVvwCL hGz3xlb3Rh5+BtbFJv26u48aB6YjDEEFUW7j6kZAEHVLBAxj7zXqZ28/bmLDp6CHJAJvfg l7gENYLgN6yZ32sBUFYjPh5gUDYqvIrX4qYw+i2IVYdvwPNOj5pnM9HlhH0Y4/hL+IP07+ rgCKZVDRPIAR+i3dS+gRMFTXmJ4IYw93McJnELnufnAekcDgGaeeeCloAqbu+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687860877; a=rsa-sha256; cv=none; b=gzMleMtO6ctFCwApzYGUWYBn0xre0TJJEcc0w5XOQQ2zviXiVT5+v46Wc7as75Uv7/lRLP halaJObEMZy3FJ7zORc6kla2akOJgMTcqHBHpM7xjHkBJPl9h7nFFfqfnnva9zNwBRxFaV vyQVssafMwbgZPUP58+it4NtWMbaqKEvRhtsmF8y7+7O004raubPOUaZDBJZsn8CTpChg5 KOyAkvLO43XSFmYTHmY2Oc2+9MqrBp+MJcw+TMZRtrEo1FBMD0/LingmqWoSMJrYWsGrAC Kv3NFby8o1tGwRAE0zp8b0FNEgzcln3YSj6TJUYLM60JJXuOQw4z3t4AdaA/jg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qr0v13t4Bzp1J; Tue, 27 Jun 2023 10:14:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RAEbvn004781; Tue, 27 Jun 2023 10:14:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RAEbCq004780; Tue, 27 Jun 2023 10:14:37 GMT (envelope-from git) Date: Tue, 27 Jun 2023 10:14:37 GMT Message-Id: <202306271014.35RAEbCq004780@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Ganael LAPLANCHE Subject: git: 10076c848667 - main - emulators/pcsx2: Fix SIGILL crash List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: martymac X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 10076c84866711af04e6c1425cdc6085ac936bfe Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by martymac: URL: https://cgit.FreeBSD.org/ports/commit/?id=10076c84866711af04e6c1425cdc6085ac936bfe commit 10076c84866711af04e6c1425cdc6085ac936bfe Author: Daniel Engberg AuthorDate: 2023-06-27 10:08:02 +0000 Commit: Ganael LAPLANCHE CommitDate: 2023-06-27 10:13:32 +0000 emulators/pcsx2: Fix SIGILL crash Do not pass -march=native as that can bring pre-built packages with instructions not supported by end users and lead to a SIGILL crash. If CPUTYPE is not defined, set arch to the oldest CPU that supports SSE 4.1 (penryn), else let the build system try to build with whatever is set. Add a message indicating that the port should be rebuilt with CPUTYPE defined for best performance. While here, use zstd from ports (now detected). PR: 272192 Reported by: Patrick McMunn --- emulators/pcsx2/Makefile | 17 +++++++++++++---- emulators/pcsx2/Makefile.tuples | 1 - emulators/pcsx2/distinfo | 2 -- emulators/pcsx2/files/extra-patch-no-march-minimum-req | 11 +++++++++++ emulators/pcsx2/files/extra-patch-no-march-native | 11 +++++++++++ emulators/pcsx2/pkg-message | 7 +++++++ 6 files changed, 42 insertions(+), 7 deletions(-) diff --git a/emulators/pcsx2/Makefile b/emulators/pcsx2/Makefile index ee09f40b5634..6f1b5582fc24 100644 --- a/emulators/pcsx2/Makefile +++ b/emulators/pcsx2/Makefile @@ -1,7 +1,7 @@ PORTNAME= pcsx2 PORTVERSION= 1.7.4097 DISTVERSIONPREFIX= v -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= emulators MAINTAINER= martymac@FreeBSD.org @@ -16,7 +16,6 @@ ONLY_FOR_ARCHS= amd64 # Notes on dependencies (see cmake/SearchForStuff.cmake): # - rapidyaml (and c4core) come from 3rdparty/ (0.4.0 is needed) # - glad comes from 3rdparty/ (conflicts with libglvnd) -# - zstd comes from 3rdparty/ (not detected yet) # - zydis comes from 3rdparty/ LIB_DEPENDS= libpng.so:graphics/png \ libavcodec.so:multimedia/ffmpeg \ @@ -30,10 +29,10 @@ LIB_DEPENDS= libpng.so:graphics/png \ libcurl.so:ftp/curl \ libpulse.so:audio/pulseaudio \ libjack.so:audio/jack \ - libsndio.so:audio/sndio + libsndio.so:audio/sndio \ + libzstd.so:archivers/zstd # libryml.so:devel/rapidyaml \ # libglad.so:graphics/glad \ -# libzstd.so:archivers/zstd USES= cmake desktop-file-utils gl pkgconfig qt:6 sdl xorg @@ -46,6 +45,16 @@ USE_SDL= sdl2 USE_XORG= ice x11 xcb xext xpm xrandr USE_QT= base tools +# SSE 4.1 instructions are a hard requirement, if CPUTYPE is defined +# use whatever is set and let the build fail if it falls below +# baseline requirements. If it's undefined set penryn as target +# as it's the oldest CPU arch that supports SSE 4.1 +.if defined(CPUTYPE) +EXTRA_PATCHES= ${PATCHDIR}/extra-patch-no-march-native +.else +EXTRA_PATCHES= ${PATCHDIR}/extra-patch-no-march-minimum-req +.endif + # See: cmake/BuildParameters.cmake CMAKE_ARGS+= \ -DCMAKE_REQUIRED_INCLUDES:STRING=${LOCALBASE}/include/ \ diff --git a/emulators/pcsx2/Makefile.tuples b/emulators/pcsx2/Makefile.tuples index e9a97511f72f..44efae57512e 100644 --- a/emulators/pcsx2/Makefile.tuples +++ b/emulators/pcsx2/Makefile.tuples @@ -1,7 +1,6 @@ GH_TUPLE= \ rtissera:libchdr:5de1a59019815ccdbba0fe07c71b31406d023248:libchdr/3rdparty/libchdr/libchdr \ biojppm:rapidyaml:213b201d264139cd1b887790197e08850af628e3:rapidyaml/3rdparty/rapidyaml/rapidyaml \ - facebook:zstd:e47e674cd09583ff0503f0f6defd6d23d8b718d3:zstd/3rdparty/zstd/zstd \ RetroAchievements:rcheevos:31f8788fe0e694e99db7ce138d45a655c556fa96:rcheevos/3rdparty/rcheevos/rcheevos \ biojppm:c4core:d35c7c9bf370134595699d791e6ff8db018ddc8d:c4core/3rdparty/rapidyaml/rapidyaml/ext/c4core \ biojppm:cmake:371982300ff5a076d7c3199057ebed77bbe3472f:cmake/3rdparty/rapidyaml/rapidyaml/ext/c4core/cmake \ diff --git a/emulators/pcsx2/distinfo b/emulators/pcsx2/distinfo index 858e3ab69441..68e5fba4abda 100644 --- a/emulators/pcsx2/distinfo +++ b/emulators/pcsx2/distinfo @@ -5,8 +5,6 @@ SHA256 (rtissera-libchdr-5de1a59019815ccdbba0fe07c71b31406d023248_GH0.tar.gz) = SIZE (rtissera-libchdr-5de1a59019815ccdbba0fe07c71b31406d023248_GH0.tar.gz) = 414409 SHA256 (biojppm-rapidyaml-213b201d264139cd1b887790197e08850af628e3_GH0.tar.gz) = c206d4565ccfa721991a8df90821d1a1f747e68385a0f3f5b9ab995e191c06be SIZE (biojppm-rapidyaml-213b201d264139cd1b887790197e08850af628e3_GH0.tar.gz) = 446070 -SHA256 (facebook-zstd-e47e674cd09583ff0503f0f6defd6d23d8b718d3_GH0.tar.gz) = 2a7b7e5d3f8c759894f0fea9917a590733600574d20cb53f3be827c7c62862e1 -SIZE (facebook-zstd-e47e674cd09583ff0503f0f6defd6d23d8b718d3_GH0.tar.gz) = 1952167 SHA256 (RetroAchievements-rcheevos-31f8788fe0e694e99db7ce138d45a655c556fa96_GH0.tar.gz) = ffe7020e443f724299352e72abdd9bee432fc00d3d260fbc0fee9fb28ce4f678 SIZE (RetroAchievements-rcheevos-31f8788fe0e694e99db7ce138d45a655c556fa96_GH0.tar.gz) = 522855 SHA256 (biojppm-c4core-d35c7c9bf370134595699d791e6ff8db018ddc8d_GH0.tar.gz) = b768c8fb5dd4740317b7e1a3e43a0b32615d4d4e1e974d7ab515a80d2f1f318d diff --git a/emulators/pcsx2/files/extra-patch-no-march-minimum-req b/emulators/pcsx2/files/extra-patch-no-march-minimum-req new file mode 100644 index 000000000000..6e560dbe56c1 --- /dev/null +++ b/emulators/pcsx2/files/extra-patch-no-march-minimum-req @@ -0,0 +1,11 @@ +--- cmake/BuildParameters.cmake.orig 2023-06-25 15:34:40 UTC ++++ cmake/BuildParameters.cmake +@@ -120,7 +120,7 @@ if(${PCSX2_TARGET_ARCHITECTURES} MATCHES "x86_64") + endif() + else() + #set(ARCH_FLAG "-march=native -fabi-version=6") +- set(ARCH_FLAG "-march=native") ++ set(ARCH_FLAG "-march=penryn") + endif() + endif() + list(APPEND PCSX2_DEFS _ARCH_64=1 _M_X86=1) diff --git a/emulators/pcsx2/files/extra-patch-no-march-native b/emulators/pcsx2/files/extra-patch-no-march-native new file mode 100644 index 000000000000..ea0b7c821181 --- /dev/null +++ b/emulators/pcsx2/files/extra-patch-no-march-native @@ -0,0 +1,11 @@ +--- cmake/BuildParameters.cmake.orig 2023-06-25 15:34:40 UTC ++++ cmake/BuildParameters.cmake +@@ -120,7 +120,7 @@ if(${PCSX2_TARGET_ARCHITECTURES} MATCHES "x86_64") + endif() + else() + #set(ARCH_FLAG "-march=native -fabi-version=6") +- set(ARCH_FLAG "-march=native") ++ #set(ARCH_FLAG "-march=native") + endif() + endif() + list(APPEND PCSX2_DEFS _ARCH_64=1 _M_X86=1) diff --git a/emulators/pcsx2/pkg-message b/emulators/pcsx2/pkg-message new file mode 100644 index 000000000000..1481761cdc0c --- /dev/null +++ b/emulators/pcsx2/pkg-message @@ -0,0 +1,7 @@ +[ +{ type: install + message: <