From nobody Tue Aug 29 03:10:25 2023 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 4RZXVT58f3z4rFym; Tue, 29 Aug 2023 03:10:25 +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 4RZXVT4kP9z3RJB; Tue, 29 Aug 2023 03:10:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693278625; 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=QThxXPfTcrZ+hD43NubQtjDOlzRNgOjBNyP1eW8dR+s=; b=gv8NZ1Ult6ZgGiC2eQqrukWSDJADySPcgTKV4nW1HUpkxTMjl1Q9CgLJYLD/VHLRIYBLCL o4oM7OCFrIpfnJa8mnfyusRnV5DWHJwj9Dq0Zn3AuHUmo/2ZtgK0BlTNhwGT1wQH/PxaiA 15GjMwmSEctGg8+dEcBp1kyvfVSd4QBEzUDT5gQjr/vZk+HxyRIJt6siXjBvZ1Z5qD5PWz ENZjW0Dir/XrHIj+YCER2tZIOEB0OaRDYEaCuW87AH7HSK8BvkUYQhPPvNLsls4qZkUyX1 Xak0HvZG+rDVfAngQR6uAhqyEwKerXj1AxyKhz2FhdcideRKCQ5jfw5KEXv9VA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693278625; a=rsa-sha256; cv=none; b=QFj+PkHI8gvU+ZNEIRFJ6JtOHY/ncw3BdA5KcCBvYF+CAWcDWzS/fj+cOxl6K/Yk0a4ri3 SDOit5HX/mYL1UVkF4DkKu/gpyOXERfViIAgZNkHuKI+6S25Bh74uPlTR2FMCapwoo9xSh qygQp+PMdwvSnpUGe4/oZ/GlR3gbbNypKVMk0dli4i2+DP8obbyncKSLWQsvWKX1mRceWt +ZJUqFMpOayWLnmZI3z6S/iZ8OaulADvQi2yUT/rVez5oNe837s02R0cGc0aupznFf7aIK nFCLCSASMZE8byz1KBREGWgEcF6E3zeOobZRLDeZCwZANRkZdEYAcbxhKfD02A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693278625; 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=QThxXPfTcrZ+hD43NubQtjDOlzRNgOjBNyP1eW8dR+s=; b=nb6FjiyqlOczg/puR4+jUdvcKdYG/ho97bvN6sVpBWeeHZM/2Q4GefrdekhXONyLEg0wzF aTepM6Y/RRIc4nk/hFRnUto5+EAEnQMjy+t0q3LNnl35zzGMKPDfAezakBfH8tmLKqICaF SYvYOBL3MbXICTuHHc3/aGA60R9NZDoxbPjTaiqH2a+feQGuKSvvWOAIgrOK8vLDz5zHX1 lmnBk5RxCh3PgolB9bMrPXKadZNgvfw8BflomaBIe4PEPkNCA2W8j7KdcT4MfOLZahty2L 0nnwrWrPBmw6s00lUUvYpNsZKrL3zBR6rr20+YTyPFOew8TeU4ds7UeZ6vAvig== 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 4RZXVT3qBTzZrP; Tue, 29 Aug 2023 03:10:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 37T3APBi036776; Tue, 29 Aug 2023 03:10:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37T3APuF036773; Tue, 29 Aug 2023 03:10:25 GMT (envelope-from git) Date: Tue, 29 Aug 2023 03:10:25 GMT Message-Id: <202308290310.37T3APuF036773@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yasuhiro Kimura Subject: git: 199d7e747ba0 - main - multimedia/avidemux: Add patch to fix build with upcoming binutils 2.41 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: yasu X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 199d7e747ba022efc3964f56b4e55b17db6f04b6 Auto-Submitted: auto-generated The branch main has been updated by yasu: URL: https://cgit.FreeBSD.org/ports/commit/?id=199d7e747ba022efc3964f56b4e55b17db6f04b6 commit 199d7e747ba022efc3964f56b4e55b17db6f04b6 Author: Yasuhiro Kimura AuthorDate: 2023-08-09 02:21:05 +0000 Commit: Yasuhiro Kimura CommitDate: 2023-08-29 03:05:56 +0000 multimedia/avidemux: Add patch to fix build with upcoming binutils 2.41 Obtained from: https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/effadce6c756247ea8bae32dc13bb3e6f464f0eb PR: 273023 Approved by: maintainer timeout --- multimedia/avidemux/Makefile.common | 4 ++ .../ffmpeg_fix_build_with_binutils_2.41.patch | 76 ++++++++++++++++++++++ 2 files changed, 80 insertions(+) diff --git a/multimedia/avidemux/Makefile.common b/multimedia/avidemux/Makefile.common index 5725e2a276fa..4702cc112831 100644 --- a/multimedia/avidemux/Makefile.common +++ b/multimedia/avidemux/Makefile.common @@ -304,6 +304,10 @@ USE_GCC= yes NOT_FOR_ARCHS= powerpc powerpc64 powerpcspe sparc64 NOT_FOR_ARCHS_REASON= cmake/admDetermineSystem.cmake:78: CPU not supported +post-extract: + @${CP} ${FILESDIR}/ffmpeg_fix_build_with_binutils_2.41.patch \ + ${WRKSRC}/avidemux_core/ffmpeg_package/patches + post-patch: @${MKDIR} ${CONFIGURE_WRKSRC}/config @${LN} -s ${LOCALBASE}/include/iconv.h ${CONFIGURE_WRKSRC}/config diff --git a/multimedia/avidemux/files/ffmpeg_fix_build_with_binutils_2.41.patch b/multimedia/avidemux/files/ffmpeg_fix_build_with_binutils_2.41.patch new file mode 100644 index 000000000000..a70c93a94a2e --- /dev/null +++ b/multimedia/avidemux/files/ffmpeg_fix_build_with_binutils_2.41.patch @@ -0,0 +1,76 @@ +From effadce6c756247ea8bae32dc13bb3e6f464f0eb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= +Date: Sun, 16 Jul 2023 18:18:02 +0300 +Subject: [PATCH] avcodec/x86/mathops: clip constants used with shift + instructions within inline assembly + +Fixes assembling with binutil as >= 2.41 + +Signed-off-by: James Almer +--- + libavcodec/x86/mathops.h | 26 +++++++++++++++++++++++--- + 1 file changed, 23 insertions(+), 3 deletions(-) + +diff --git libavcodec/x86/mathops.h libavcodec/x86/mathops.h +index 6298f5ed19..ca7e2dffc1 100644 +--- libavcodec/x86/mathops.h ++++ libavcodec/x86/mathops.h +@@ -35,12 +35,20 @@ + static av_always_inline av_const int MULL(int a, int b, unsigned shift) + { + int rt, dummy; ++ if (__builtin_constant_p(shift)) + __asm__ ( + "imull %3 \n\t" + "shrdl %4, %%edx, %%eax \n\t" + :"=a"(rt), "=d"(dummy) +- :"a"(a), "rm"(b), "ci"((uint8_t)shift) ++ :"a"(a), "rm"(b), "i"(shift & 0x1F) + ); ++ else ++ __asm__ ( ++ "imull %3 \n\t" ++ "shrdl %4, %%edx, %%eax \n\t" ++ :"=a"(rt), "=d"(dummy) ++ :"a"(a), "rm"(b), "c"((uint8_t)shift) ++ ); + return rt; + } + +@@ -113,19 +121,31 @@ __asm__ volatile(\ + // avoid +32 for shift optimization (gcc should do that ...) + #define NEG_SSR32 NEG_SSR32 + static inline int32_t NEG_SSR32( int32_t a, int8_t s){ ++ if (__builtin_constant_p(s)) + __asm__ ("sarl %1, %0\n\t" + : "+r" (a) +- : "ic" ((uint8_t)(-s)) ++ : "i" (-s & 0x1F) + ); ++ else ++ __asm__ ("sarl %1, %0\n\t" ++ : "+r" (a) ++ : "c" ((uint8_t)(-s)) ++ ); + return a; + } + + #define NEG_USR32 NEG_USR32 + static inline uint32_t NEG_USR32(uint32_t a, int8_t s){ ++ if (__builtin_constant_p(s)) + __asm__ ("shrl %1, %0\n\t" + : "+r" (a) +- : "ic" ((uint8_t)(-s)) ++ : "i" (-s & 0x1F) + ); ++ else ++ __asm__ ("shrl %1, %0\n\t" ++ : "+r" (a) ++ : "c" ((uint8_t)(-s)) ++ ); + return a; + } + +-- +2.41.0 +