public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: x11-libs/pixman/files/, x11-libs/pixman/
@ 2016-06-26 22:52 Austin English
  0 siblings, 0 replies; 2+ messages in thread
From: Austin English @ 2016-06-26 22:52 UTC (permalink / raw
  To: gentoo-commits

commit:     617823801a0fd4105e0de308d6b4a4efedcd1fdf
Author:     Austin English <wizardedit <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 26 22:51:05 2016 +0000
Commit:     Austin English <wizardedit <AT> gentoo <DOT> org>
CommitDate: Sun Jun 26 22:52:09 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61782380

x11-libs/pixman: fix building with Clang

Gentoo-Bug: https://bugs.gentoo.org/566048

Package-Manager: portage-2.2.28

 x11-libs/pixman/files/pixman-0.32.8-clang.patch | 93 +++++++++++++++++++++++++
 x11-libs/pixman/pixman-0.32.8.ebuild            |  7 +-
 2 files changed, 99 insertions(+), 1 deletion(-)

diff --git a/x11-libs/pixman/files/pixman-0.32.8-clang.patch b/x11-libs/pixman/files/pixman-0.32.8-clang.patch
new file mode 100644
index 0000000..d531929
--- /dev/null
+++ b/x11-libs/pixman/files/pixman-0.32.8-clang.patch
@@ -0,0 +1,93 @@
+From d24b415f3e2753a588759d028b811e1ce38fea6c Mon Sep 17 00:00:00 2001
+From: Andrea Canciani <ranma42@gmail.com>
+Date: Sun, 11 Oct 2015 09:45:57 +0200
+Subject: mmx: Improve detection of support for "K" constraint
+
+Older versions of clang emitted an error on the "K" constraint, but at
+least since version 3.7 it is supported. Just like gcc, this
+constraint is only allowed for constants, but apparently clang
+requires them to be known before inlining.
+
+Using the macro definition _mm_shuffle_pi16(A, N) ensures that the "K"
+constraint is always applied to a literal constant, independently from
+the compiler optimizations and allows building pixman-mmx on modern
+clang.
+
+Reviewed-by: Matt Turner <mattst88@gmail.com>
+Signed-off-by: Andrea Canciani <ranma42@gmail.com>
+
+diff --git a/configure.ac b/configure.ac
+index 2178126..3a66909 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -347,15 +347,27 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+ #error "Need GCC >= 3.4 for MMX intrinsics"
+ #endif
+ #include <mmintrin.h>
++#include <stdint.h>
++
++/* Check support for block expressions */
++#define _mm_shuffle_pi16(A, N)						\
++    ({									\
++	__m64 ret;							\
++									\
++	/* Some versions of clang will choke on K */ 			\
++	asm ("pshufw %2, %1, %0\n\t"					\
++	     : "=y" (ret)						\
++	     : "y" (A), "K" ((const int8_t)N)				\
++	);								\
++									\
++	ret;								\
++    })
++
+ int main () {
+     __m64 v = _mm_cvtsi32_si64 (1);
+     __m64 w;
+ 
+-    /* Some versions of clang will choke on K */
+-    asm ("pshufw %2, %1, %0\n\t"
+-        : "=y" (w)
+-        : "y" (v), "K" (5)
+-    );
++    w = _mm_shuffle_pi16(v, 5);
+ 
+     /* Some versions of clang will choke on this */
+     asm ("pmulhuw %1, %0\n\t"
+diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c
+index 05c48a4..dec3974 100644
+--- a/pixman/pixman-mmx.c
++++ b/pixman/pixman-mmx.c
+@@ -89,21 +89,7 @@ _mm_mulhi_pu16 (__m64 __A, __m64 __B)
+     return __A;
+ }
+ 
+-#  ifdef __OPTIMIZE__
+-extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+-_mm_shuffle_pi16 (__m64 __A, int8_t const __N)
+-{
+-    __m64 ret;
+-
+-    asm ("pshufw %2, %1, %0\n\t"
+-	: "=y" (ret)
+-	: "y" (__A), "K" (__N)
+-    );
+-
+-    return ret;
+-}
+-#  else
+-#   define _mm_shuffle_pi16(A, N)					\
++# define _mm_shuffle_pi16(A, N)						\
+     ({									\
+ 	__m64 ret;							\
+ 									\
+@@ -114,7 +100,6 @@ _mm_shuffle_pi16 (__m64 __A, int8_t const __N)
+ 									\
+ 	ret;								\
+     })
+-#  endif
+ # endif
+ #endif
+ 
+-- 
+cgit v0.10.2
+

diff --git a/x11-libs/pixman/pixman-0.32.8.ebuild b/x11-libs/pixman/pixman-0.32.8.ebuild
index cefd423..e612abc 100644
--- a/x11-libs/pixman/pixman-0.32.8.ebuild
+++ b/x11-libs/pixman/pixman-0.32.8.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
 EAPI=5
+XORG_EAUTORECONF=yes
 XORG_MULTILIB=yes
 inherit xorg-2 toolchain-funcs versionator
 
@@ -16,6 +17,10 @@ RDEPEND="abi_x86_32? (
 	!app-emulation/emul-linux-x86-gtklibs[-abi_x86_32(-)]
 	)"
 
+PATCHES=(
+	"${FILESDIR}/${P}-clang.patch"
+)
+
 src_configure() {
 	XORG_CONFIGURE_OPTIONS=(
 		$(use_enable cpu_flags_x86_mmxext mmx)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: x11-libs/pixman/files/, x11-libs/pixman/
@ 2025-02-26 20:34 Matt Turner
  0 siblings, 0 replies; 2+ messages in thread
From: Matt Turner @ 2025-02-26 20:34 UTC (permalink / raw
  To: gentoo-commits

commit:     424af2e619906f9fb4e83c917b5ccab854bb116f
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 26 20:28:29 2025 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Feb 26 20:34:13 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=424af2e6

x11-libs/pixman: Drop old versions

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 x11-libs/pixman/Manifest                           |   1 -
 ...n-Adjust-arm-assembly-for-binutils-change.patch | 106 ---------------------
 x11-libs/pixman/pixman-0.43.4.ebuild               |  72 --------------
 3 files changed, 179 deletions(-)

diff --git a/x11-libs/pixman/Manifest b/x11-libs/pixman/Manifest
index 18bc0c38ede3..f073526aac5f 100644
--- a/x11-libs/pixman/Manifest
+++ b/x11-libs/pixman/Manifest
@@ -1,2 +1 @@
-DIST pixman-0.43.4.tar.xz 636900 BLAKE2B c31e5700bfadcd72f522af50509a4a6cd7bbf90c918c75b108e50246f1c76e858125138902a222040ada192710ec788deb43eb65085416f3eff88e3ed970933e SHA512 b40fb05bd58dc78f4e4e9b19c86991ab0611b708657c9a7fb42bfe82d57820a0fde01a34b00a0848a41da6c3fb90c2213942a70f435a0e9467631695d3bc7e36
 DIST pixman-0.44.2.tar.xz 650012 BLAKE2B 856aa35ae705de522d70250beee8acc872b54d2b5caa9cee6bc12ffde7c293b3db76f56c75858cc5ab1bc592fb1d4078485c2def2ae4bcd5a50b6dfc2eb477eb SHA512 b24907f9a0bf6a9aa3278d31986c562c5f2d68f8c178021497c8648aca9f91e4c6f1ecfacf93eb01ba4f03ce4cfc5970fc40bb0fe6724bac9210fc57da09cba4

diff --git a/x11-libs/pixman/files/0.43.4-pixman-Adjust-arm-assembly-for-binutils-change.patch b/x11-libs/pixman/files/0.43.4-pixman-Adjust-arm-assembly-for-binutils-change.patch
deleted file mode 100644
index c59ed7b3e81c..000000000000
--- a/x11-libs/pixman/files/0.43.4-pixman-Adjust-arm-assembly-for-binutils-change.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-https://bugs.gentoo.org/942441
-
-From 865e6ce00bb79a6b925ed4c2c436e1533e4472aa Mon Sep 17 00:00:00 2001
-From: Mike Hommey <mh@glandium.org>
-Date: Fri, 12 Jul 2024 11:11:17 -0400
-Subject: [PATCH] pixman: Adjust arm assembly for binutils change
-
-A change in the latest version of binutils broke building pixman for arm.
-
-The binutils change:
-https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=226749d5a6ff0d5c607d6428d6c81e1e7e7a994b
-
-Closes: https://gitlab.freedesktop.org/pixman/pixman/-/issues/96
----
- pixman/pixman-arm-simd-asm.S | 44 ++++++++++++++++++------------------
- 1 file changed, 22 insertions(+), 22 deletions(-)
-
-diff --git a/pixman/pixman-arm-simd-asm.S b/pixman/pixman-arm-simd-asm.S
-index 34d38f1..3dfe723 100644
---- a/pixman/pixman-arm-simd-asm.S
-+++ b/pixman/pixman-arm-simd-asm.S
-@@ -820,13 +820,13 @@ generate_composite_function \
- .macro over_white_8888_8888_ca_1pixel_tail
-         mvn     TMP0, WK1
-         teq     WK1, WK1, asr #32
--        bne     01f
--        bcc     03f
-+        bne     1f
-+        bcc     3f
-         mov     WK3, WK1
--        b       02f
--01:     over_white_8888_8888_ca_combine WK1, WK3
--02:     pixst   , 4, 3, DST
--03:
-+        b       2f
-+1:      over_white_8888_8888_ca_combine WK1, WK3
-+2:      pixst   , 4, 3, DST
-+3:
- .endm
- 
- .macro over_white_8888_8888_ca_2pixels_head
-@@ -837,21 +837,21 @@ generate_composite_function \
-         pixld   , 8, 3, DST
-         mvn     TMP0, WK1
-         teq     WK1, WK1, asr #32
--        bne     01f
-+        bne     1f
-         movcs   WK3, WK1
--        bcs     02f
-+        bcs     2f
-         teq     WK2, #0
--        beq     05f
--        b       02f
--01:     over_white_8888_8888_ca_combine WK1, WK3
--02:     mvn     TMP0, WK2
-+        beq     5f
-+        b       2f
-+1:      over_white_8888_8888_ca_combine WK1, WK3
-+2:      mvn     TMP0, WK2
-         teq     WK2, WK2, asr #32
--        bne     03f
-+        bne     3f
-         movcs   WK4, WK2
--        b       04f
--03:     over_white_8888_8888_ca_combine WK2, WK4
--04:     pixst   , 8, 3, DST
--05:
-+        b       4f
-+3:      over_white_8888_8888_ca_combine WK2, WK4
-+4:      pixst   , 8, 3, DST
-+5:
- .endm
- 
- .macro over_white_8888_8888_ca_process_head  cond, numbytes, firstreg, unaligned_src, unaligned_mask, preload
-@@ -1067,9 +1067,9 @@ generate_composite_function \
-   .if \offset != 0
-         ldrb    ORIG_W, [SRC, #\offset]
-   .endif
--        beq     01f
-+        beq     1f
-         teq     STRIDE_M, #0xFF
--        beq     02f
-+        beq     2f
-  .endif
-         uxtb16  SCRATCH, \d                 /* rb_dest */
-         uxtb16  \d, \d, ror #8               /* ag_dest */
-@@ -1079,13 +1079,13 @@ generate_composite_function \
-         uxtab16 \d, \d, \d, ror #8
-         mov     SCRATCH, SCRATCH, ror #8
-         sel     \d, SCRATCH, \d
--        b       02f
-+        b       2f
-  .if \offset == 0
- 48:     /* Last mov d,#0 of the set - used as part of shortcut for
-          * source values all 0 */
-  .endif
--01:     mov     \d, #0
--02:
-+1:      mov     \d, #0
-+2:
- .endm
- 
- .macro in_reverse_8888_8888_tail  numbytes, reg1, reg2, reg3, reg4
--- 
-2.45.2
-

diff --git a/x11-libs/pixman/pixman-0.43.4.ebuild b/x11-libs/pixman/pixman-0.43.4.ebuild
deleted file mode 100644
index f81d1c4ed4d0..000000000000
--- a/x11-libs/pixman/pixman-0.43.4.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-EGIT_REPO_URI="https://gitlab.freedesktop.org/pixman/pixman.git"
-
-if [[ ${PV} = 9999* ]]; then
-	GIT_ECLASS="git-r3"
-fi
-
-inherit ${GIT_ECLASS} flag-o-matic meson-multilib multiprocessing toolchain-funcs
-
-DESCRIPTION="Low-level pixel manipulation routines"
-HOMEPAGE="http://www.pixman.org/ https://gitlab.freedesktop.org/pixman/pixman/"
-if [[ ${PV} != 9999* ]]; then
-	KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
-	SRC_URI="https://www.x.org/releases/individual/lib/${P}.tar.xz"
-fi
-
-LICENSE="MIT"
-SLOT="0"
-IUSE="cpu_flags_ppc_altivec cpu_flags_arm_iwmmxt cpu_flags_arm_iwmmxt2 cpu_flags_arm_neon loongson2f cpu_flags_x86_mmxext cpu_flags_x86_sse2 cpu_flags_x86_ssse3 static-libs test"
-RESTRICT="!test? ( test )"
-
-PATCHES=(
-	"${FILESDIR}"/${PV}-pixman-Adjust-arm-assembly-for-binutils-change.patch
-)
-
-pkg_pretend() {
-	[[ ${MERGE_TYPE} != binary ]] && use test && tc-check-openmp
-}
-
-pkg_setup() {
-	[[ ${MERGE_TYPE} != binary ]] && use test && tc-check-openmp
-}
-
-multilib_src_configure() {
-	if ( use arm || use arm64 ) && tc-is-clang ; then
-		# See bug #768138 and https://gitlab.freedesktop.org/pixman/pixman/-/issues/46
-		append-cflags $(test-flags-CC -fno-integrated-as)
-	fi
-
-	local emesonargs=(
-		$(meson_feature cpu_flags_arm_iwmmxt iwmmxt)
-		$(meson_use     cpu_flags_arm_iwmmxt2 iwmmxt2)
-		$(meson_feature cpu_flags_x86_mmxext mmx)
-		$(meson_feature cpu_flags_x86_sse2 sse2)
-		$(meson_feature cpu_flags_x86_ssse3 ssse3)
-		$(meson_feature cpu_flags_ppc_altivec vmx)
-		$(meson_feature loongson2f loongson-mmi)
-		$(meson_feature test openmp) # only used in unit tests
-		$(meson_feature test tests)
-		-Ddefault_library=$(usex static-libs both shared)
-		-Ddemos=disabled
-		-Dgtk=disabled
-		-Dlibpng=disabled
-	)
-
-	if [[ ${ABI} == arm64 ]]; then
-		emesonargs+=($(meson_feature cpu_flags_arm_neon a64-neon))
-	elif [[ ${ABI} == arm ]]; then
-		emesonargs+=($(meson_feature cpu_flags_arm_neon neon))
-	fi
-
-	meson_src_configure
-}
-
-multilib_src_test() {
-	export OMP_NUM_THREADS=$(makeopts_jobs)
-	meson_src_test -t 100
-}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-02-26 20:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-26 20:34 [gentoo-commits] repo/gentoo:master commit in: x11-libs/pixman/files/, x11-libs/pixman/ Matt Turner
  -- strict thread matches above, loose matches on Subject: below --
2016-06-26 22:52 Austin English

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox