[packages/libx264] - fix building on x32, no asm here

baggins baggins at pld-linux.org
Thu Mar 5 19:54:42 CET 2015


commit b841a03e2f57d1e28973f24069287167834ac654
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Thu Mar 5 18:54:04 2015 +0000

    - fix building on x32, no asm here

 libx264.spec |  3 ++-
 x32.patch    | 37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 1 deletion(-)
---
diff --git a/libx264.spec b/libx264.spec
index 5c3fd65..0729116 100644
--- a/libx264.spec
+++ b/libx264.spec
@@ -3,7 +3,7 @@
 %bcond_with	bootstrap	# no ffmpeg/gpac support in x264 utility
 %bcond_without	asm		# disable asm
 
-%ifnarch %{ix86} %{x8664} x32
+%ifnarch %{ix86} %{x8664}
 %undefine	with_asm
 %endif
 
@@ -97,6 +97,7 @@ Dekoder x264 działający z linii poleceń.
 %build
 CC="%{__cc}" \
 ./configure \
+	--host=%{_target_platform} \
 	--prefix=%{_prefix} \
 	--exec-prefix=%{_prefix} \
 	--bindir=%{_bindir} \
diff --git a/x32.patch b/x32.patch
new file mode 100644
index 0000000..7e83423
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,37 @@
+--- x264-snapshot-20140824-2245/configure~	2015-03-05 18:41:55.000000000 +0000
++++ x264-snapshot-20140824-2245/configure	2015-03-05 18:47:39.881867944 +0000
+@@ -594,8 +594,8 @@
+             if [[ "$asm" == auto && "$CFLAGS" != *-mfpmath* ]]; then
+                 CFLAGS="$CFLAGS -mfpmath=sse -msse"
+             fi
+-            CFLAGS="-m32 $CFLAGS"
+-            LDFLAGS="-m32 $LDFLAGS"
++            CFLAGS="$CFLAGS"
++            LDFLAGS="$LDFLAGS"
+         elif [ $compiler = ICC ]; then
+             # icc on linux has various degrees of mod16 stack support
+             if [ $SYS = LINUX ]; then
+@@ -627,7 +627,7 @@
+         ARCH="X86_64"
+         AS="yasm"
+         ASFLAGS="$ASFLAGS -DARCH_X86_64=1 -I\$(SRCPATH)/common/x86/"
+-        [ $compiler = GNU ] && CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS"
++        [ $compiler = GNU ] && CFLAGS="$CFLAGS" && LDFLAGS="$LDFLAGS"
+         if [ "$SYS" = MACOSX ]; then
+             ASFLAGS="$ASFLAGS -f macho64 -m amd64 -DPIC -DPREFIX"
+             if cc_check '' "-arch x86_64"; then
+@@ -641,7 +641,14 @@
+             [ $compiler = GNU ] && LDFLAGS="$LDFLAGS -Wl,--nxcompat -Wl,--dynamicbase"
+             [ $compiler = GNU ] && RCFLAGS="--target=pe-x86-64 $RCFLAGS"
+         else
++	  case "$host_os" in
++		*gnux32)
++			ASFLAGS="$ASFLAGS -f elfx32 -m amd64"
++		;;
++		*)
+             ASFLAGS="$ASFLAGS -f elf -m amd64"
++	    ;;
++	  esac
+         fi
+         ;;
+     powerpc|powerpc64)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libx264.git/commitdiff/a1e7167c80664583f72bfe9d748314a732db8c79



More information about the pld-cvs-commit mailing list