[packages/xavs] - enhance asm patch to handle PIC (x86_64 etc.) - fix disable-asm option (configure is not autoconf

qboosh qboosh at pld-linux.org
Thu Jul 20 20:51:19 CEST 2017


commit f329f731bb78e17ecaba4ecf448dbaf4d271e16a
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Jul 20 20:53:09 2017 +0200

    - enhance asm patch to handle PIC (x86_64 etc.)
    - fix disable-asm option (configure is not autoconf generated)

 xavs-asm.patch | 18 ++++++++++++++++++
 xavs.spec      |  2 +-
 2 files changed, 19 insertions(+), 1 deletion(-)
---
diff --git a/xavs.spec b/xavs.spec
index 75c7c9d..8ca8255 100644
--- a/xavs.spec
+++ b/xavs.spec
@@ -72,7 +72,7 @@ Statyczna biblioteka AVS.
 ./configure \
 	--prefix=%{_prefix} \
 	--libdir=%{_libdir} \
-	--enable-asm%{!?with_asm:=no} \
+	%{?with_asm:--enable-asm}%{!?with_asm:--disable-asm} \
 	--enable-shared \
 	--extra-cflags="%{rpmcflags} %{rpmcppflags} -fno-strict-aliasing" \
 	--extra-ldflags="%{rpmldflags}"
diff --git a/xavs-asm.patch b/xavs-asm.patch
index db0f1f7..0d63126 100644
--- a/xavs-asm.patch
+++ b/xavs-asm.patch
@@ -9,6 +9,24 @@
              ;;
          --disable-asm)
              asm="no"
+@@ -237,7 +237,7 @@
+     ARCH="X86_64"
+     AS="yasm"
+     if [ "$SYS" = MACOSX ];then
+-      ASFLAGS="$ASFLAGS -f macho64 -m amd64 -DPIC -DPREFIX"
++      ASFLAGS="$ASFLAGS -f macho64 -m amd64 -D__PIC__ -DPREFIX"
+       CFLAGS="$CFLAGS -arch x86_64"
+       LDFLAGS="$LDFLAGS -arch x86_64"
+     elif [ "$SYS" = MINGW ]; then
+@@ -398,7 +398,7 @@
+ 
+ if [ "$pic" = "yes" ] ; then
+     CFLAGS="$CFLAGS -fPIC"
+-    ASFLAGS="$ASFLAGS -DPIC"
++    ASFLAGS="$ASFLAGS -D__PIC__"
+     # resolve textrels in the x86 asm
+     cc_check stdio.h -Wl,-Bsymbolic && LDFLAGS="$LDFLAGS -Wl,-Bsymbolic"
+ fi
 --- xavs/common/cpu.c.orig	2017-07-20 17:37:44.000000000 +0200
 +++ xavs/common/cpu.c	2017-07-20 20:11:52.406131711 +0200
 @@ -199,6 +199,16 @@
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xavs.git/commitdiff/f329f731bb78e17ecaba4ecf448dbaf4d271e16a



More information about the pld-cvs-commit mailing list