]> git.pld-linux.org Git - packages/xavs.git/commitdiff
- enhance asm patch to handle PIC (x86_64 etc.)
authorJakub Bogusz <qboosh@pld-linux.org>
Thu, 20 Jul 2017 18:53:09 +0000 (20:53 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Thu, 20 Jul 2017 18:53:09 +0000 (20:53 +0200)
- fix disable-asm option (configure is not autoconf generated)

xavs-asm.patch
xavs.spec

index db0f1f71cf5209a83700e57f56493573c66dbe1a..0d63126e6f65966ef1dcc92b72faae534ee2d2fa 100644 (file)
@@ -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 @@
index 75c7c9dc6600ca3ebc732f48c21b45e00691ec8e..8ca82553e000c7cb69b6bd0011a0c916988d7d31 100644 (file)
--- 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}"
This page took 0.114704 seconds and 4 git commands to generate.