[packages/openh264] - don't use m32/m64 compier options (breaks x32 build) - use elfx32 nasm object format on x32 - rel

baggins baggins at pld-linux.org
Sun Apr 26 12:01:15 CEST 2015


commit 3c5f01487a75464a5e959e825ece7574a64a3f1b
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Apr 26 12:00:09 2015 +0200

    - don't use m32/m64 compier options (breaks x32 build)
    - use elfx32 nasm object format on x32
    - rel 2

 no-forced-arch.patch | 21 +++++++++++++++++++++
 openh264.spec        | 12 +++++++++++-
 x32-asm.patch        | 27 +++++++++++++++++++++++++++
 3 files changed, 59 insertions(+), 1 deletion(-)
---
diff --git a/openh264.spec b/openh264.spec
index 085f8d3..7683bbd 100644
--- a/openh264.spec
+++ b/openh264.spec
@@ -3,16 +3,21 @@
 # Conditional build:
 %bcond_without	xulrunner	# GMP plugin
 #
+%ifarch x32
+%undefine with_xulrunner
+%endif
 Summary:	H.264 codec library
 Summary(pl.UTF-8):	Biblioteka kodeka H.264
 Name:		openh264
 Version:	1.4.0
-Release:	1
+Release:	2
 License:	BSD
 Group:		Libraries
 Source0:	https://github.com/cisco/openh264/archive/v%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	06d92ee5bd231814394b7e29f0545e57
 Patch0:		%{name}-libdir.patch
+Patch1:		no-forced-arch.patch
+Patch2:		x32-asm.patch
 URL:		http://www.openh264.org/
 BuildRequires:	libstdc++-devel
 %ifarch %{ix86} %{x8664}
@@ -77,6 +82,8 @@ opartych na Gecko (takich jak Firefox/Iceweasel 33+).
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
 
 %if %{with xulrunner}
 ln -s $(pkg-config --variable=includedir mozilla-plugin) gmp-api
@@ -85,6 +92,9 @@ ln -s $(pkg-config --variable=includedir mozilla-plugin) gmp-api
 %build
 %{__make} libraries binaries %{?with_xulrunner:plugin} \
 	ARCH=%{_target_base_arch} \
+%ifarch x32
+	IS_X32=Yes \
+%endif
 	CXX="%{__cxx}" \
 	CFLAGS_OPT="%{rpmcxxflags}"
 
diff --git a/no-forced-arch.patch b/no-forced-arch.patch
new file mode 100644
index 0000000..b20198b
--- /dev/null
+++ b/no-forced-arch.patch
@@ -0,0 +1,21 @@
+--- openh264-1.4.0/build/x86-common.mk~	2015-03-05 10:25:12.000000000 +0100
++++ openh264-1.4.0/build/x86-common.mk	2015-04-25 11:09:14.009256846 +0200
+@@ -1,5 +1,3 @@
+-CFLAGS_M32=-m32
+-CFLAGS_M64=-m64
+ ASM_INCLUDES = -I$(SRC_PATH)codec/common/x86/
+ ifeq (, $(ENABLE64BIT))
+ ifeq ($(ARCH), x86_64)
+@@ -7,12 +5,8 @@
+ endif
+ endif
+ ifeq ($(ENABLE64BIT), Yes)
+-CFLAGS += $(CFLAGS_M64)
+-LDFLAGS += $(CFLAGS_M64)
+ ASMFLAGS_PLATFORM = -DUNIX64
+ else
+-CFLAGS += $(CFLAGS_M32)
+-LDFLAGS += $(CFLAGS_M32)
+ ASMFLAGS_PLATFORM = -DX86_32
+ endif
+ ifeq ($(USE_ASM),Yes)
diff --git a/x32-asm.patch b/x32-asm.patch
new file mode 100644
index 0000000..b3debd9
--- /dev/null
+++ b/x32-asm.patch
@@ -0,0 +1,27 @@
+--- openh264-1.4.0/build/platform-linux.mk~	2015-03-05 10:25:12.000000000 +0100
++++ openh264-1.4.0/build/platform-linux.mk	2015-04-26 11:54:05.533650907 +0200
+@@ -6,7 +6,11 @@
+ LDFLAGS += -lpthread
+ ifeq ($(ASM_ARCH), x86)
+ ifeq ($(ENABLE64BIT), Yes)
++ifeq ($(IS_X32), Yes)
++ASMFLAGS += -f elfx32
++else
+ ASMFLAGS += -f elf64
++endif
+ else
+ ASMFLAGS += -f elf
+ endif
+--- openh264-1.4.0/codec/common/x86/asm_inc.asm~	2015-03-05 10:25:12.000000000 +0100
++++ openh264-1.4.0/codec/common/x86/asm_inc.asm	2015-04-26 11:58:16.516975386 +0200
+@@ -122,6 +122,10 @@
+ SECTION .note.GNU-stack noalloc noexec nowrite progbits ; Mark the stack as non-executable
+ %endif
+ 
++%ifidn __OUTPUT_FORMAT__,elfx32
++SECTION .note.GNU-stack noalloc noexec nowrite progbits ; Mark the stack as non-executable
++%endif
++
+ %define arg1 rdi
+ %define arg2 rsi
+ %define arg3 rdx
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/openh264.git/commitdiff/3c5f01487a75464a5e959e825ece7574a64a3f1b



More information about the pld-cvs-commit mailing list