From nobody Sun Oct 09 15:21:52 2022 X-Original-To: dev-commits-ports-main@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 4Mlm4029bpz4dtHb; Sun, 9 Oct 2022 15:21:52 +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 4Mlm401YP7z3YV1; Sun, 9 Oct 2022 15:21:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665328912; 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=DDjSuKzTiqFlWJ++PgPKFmk/xC0Qyn81V7OsSA1QZYk=; b=eiaUyFHQ9vr2WjCIFFPOSXD7+PGnkxoJdTRMZiqYtPYLtEdw0eMDiFfKHbwrDmWAGPnbeS fdCgE+awM64WXg6KdyO24C9hYbhEdoDbY8OWCL9BibHzP5cNTecYhGSVaP234TSaRzkVK9 x4q1I5jJGwPvb3hpCYAzRTt4pTHZaUf1mvRL4xUeDSTcaYEvUuVvCvlU3RtmTFD78p8vD5 naQOInfoJCPd5E/vxmC7AhjXM9BkK34duMOYu0y8PZj5AWN5RWp5KeMkrSV0G9vLG7+9r+ WUZ8Ld1ycFXDC10Ag8qMiTAxBoJSpoEZYlmmCh25K2oaGnuWo/46j12HnnTgBg== 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 4Mlm400clRzK1H; Sun, 9 Oct 2022 15:21:52 +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 299FLqnQ026702; Sun, 9 Oct 2022 15:21:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 299FLqnx026701; Sun, 9 Oct 2022 15:21:52 GMT (envelope-from git) Date: Sun, 9 Oct 2022 15:21:52 GMT Message-Id: <202210091521.299FLqnx026701@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Christian Weisgerber Subject: git: 482804eb2cc0 - main - audio/flac: fix build of x86 intrinsic-optimized code for clang 14+ List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: naddy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 482804eb2cc0482d2e0e87dfc9d1e7bf6eb78d02 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665328912; 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=DDjSuKzTiqFlWJ++PgPKFmk/xC0Qyn81V7OsSA1QZYk=; b=xEF27eVNg4j61RuLxWJvLNRuCHGnSFx+ihbnqIl7hmawdTHt62g7Ht9Kr8tA2Ih1jRrdZt iTqBkFUqSW5tKDHOteh5eTg0aA0YiVBZK9ZEBKofMQS+kGGSXKMhY7c034/vn+0Zbkblrm BLB+LbRvMsrhCZAxAMNIAUB+e1Bpc21KRnMy7wyZ+s+1aHQ1g2U8LmDq70RIiuJgOKFcT7 JlMtXvwPRv7ByUsagkALOLBS1inK3YeksxX6BUAsZd3/EmR+2FU4YAbiNOHI+UjawV1eMM QuNqrHFPtBvstANKkIyQ6ZeZMZMEK8DYP07rcpspz28rHulT528eC7SBG6Hd1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665328912; a=rsa-sha256; cv=none; b=N9vlwkRMaOaZtf8nf36F8MipBEpJ7RYgKUMe29WwOULA4yY59737udPYPAs1ZtGfzqutP6 TIAKM787LN+2brfKyNh5RaDW9q93CLeMSb8d8cy04dNxuQIUrke+Xs4kLQeKwUKeE3I4hn Ffil+P6WTUgsH9pqP3relnikMQ/kiXkVXnN5gAGty64gTKZv74PTQftR7iHS/i1xBnX2Dw C2jHu4I5rX04s0C496LfvHnlj3DRBJF6CPKn63Dmy+Vj2xvrHZdwmNCwERFii1G9nnHzQJ RPTQNoDc24ZABv+negzgvtp0XjziOq1PhNYn4Tyqs7TPT6nj4Fjk2dUJW2A+QQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by naddy: URL: https://cgit.FreeBSD.org/ports/commit/?id=482804eb2cc0482d2e0e87dfc9d1e7bf6eb78d02 commit 482804eb2cc0482d2e0e87dfc9d1e7bf6eb78d02 Author: Christian Weisgerber AuthorDate: 2022-10-09 15:09:16 +0000 Commit: Christian Weisgerber CommitDate: 2022-10-09 15:21:43 +0000 audio/flac: fix build of x86 intrinsic-optimized code for clang 14+ Add upstream fix "Assume Clang supports x86 intrinsics up to FMA" to keep support for SSSE3, AVX2, etc. when compiled with clang versions 14 and later. Obtained from: https://github.com/xiph/flac/commit/90c0562d4eb302b01d9b82c75a7f6a66261c5546 MFH: 2022Q4 --- audio/flac/Makefile | 1 + .../files/patch-src_libFLAC_include_private_cpu.h | 41 ++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/audio/flac/Makefile b/audio/flac/Makefile index b0d23cd0a4ca..29c6f0fe134a 100644 --- a/audio/flac/Makefile +++ b/audio/flac/Makefile @@ -1,5 +1,6 @@ PORTNAME= flac PORTVERSION= 1.4.1 +PORTREVISION= 1 CATEGORIES= audio MASTER_SITES= https://downloads.xiph.org/releases/flac/ \ https://ftp.osuosl.org/pub/xiph/releases/flac/ diff --git a/audio/flac/files/patch-src_libFLAC_include_private_cpu.h b/audio/flac/files/patch-src_libFLAC_include_private_cpu.h new file mode 100644 index 000000000000..9837d6f10ae2 --- /dev/null +++ b/audio/flac/files/patch-src_libFLAC_include_private_cpu.h @@ -0,0 +1,41 @@ +Assume Clang supports x86 intrinsics up to FMA +https://github.com/xiph/flac/commit/90c0562d4eb302b01d9b82c75a7f6a66261c5546 + +--- src/libFLAC/include/private/cpu.h.orig 2022-09-21 18:57:31 UTC ++++ src/libFLAC/include/private/cpu.h +@@ -82,28 +82,14 @@ + #elif defined __clang__ && __has_attribute(__target__) /* clang */ + #define FLAC__SSE_TARGET(x) __attribute__ ((__target__ (x))) + #define FLAC__FAST_MATH_TARGET(x) __attribute__ ((__target__ (x))) +- #if __has_builtin(__builtin_ia32_maxps) +- #define FLAC__SSE_SUPPORTED 1 +- #endif +- #if __has_builtin(__builtin_ia32_pmuludq128) +- #define FLAC__SSE2_SUPPORTED 1 +- #endif +- #if __has_builtin(__builtin_ia32_pabsd128) +- #define FLAC__SSSE3_SUPPORTED 1 +- #endif +- #if __has_builtin(__builtin_ia32_pmuldq128) +- #define FLAC__SSE4_1_SUPPORTED 1 +- #endif ++ #define FLAC__SSE_SUPPORTED 1 ++ #define FLAC__SSE2_SUPPORTED 1 ++ #define FLAC__SSSE3_SUPPORTED 1 ++ #define FLAC__SSE4_1_SUPPORTED 1 + #ifdef FLAC__USE_AVX +- #if __has_builtin(__builtin_ia32_maxps256) +- #define FLAC__AVX_SUPPORTED 1 +- #endif +- #if __has_builtin(__builtin_ia32_pabsd256) +- #define FLAC__AVX2_SUPPORTED 1 +- #endif +- #if __has_builtin(__builtin_ia32_vfmaddps) +- #define FLAC__FMA_SUPPORTED 1 +- #endif ++ #define FLAC__AVX_SUPPORTED 1 ++ #define FLAC__AVX2_SUPPORTED 1 ++ #define FLAC__FMA_SUPPORTED 1 + #endif + #elif defined __GNUC__ && !defined __clang__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9)) /* GCC 4.9+ */ + #define FLAC__SSE_TARGET(x) __attribute__ ((__target__ (x)))