summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-multimedia')
-rw-r--r--meta/recipes-multimedia/x264/x264/Fix-X32-build-by-disabling-asm.patch53
-rw-r--r--meta/recipes-multimedia/x264/x264_git.bb1
2 files changed, 54 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/x264/x264/Fix-X32-build-by-disabling-asm.patch b/meta/recipes-multimedia/x264/x264/Fix-X32-build-by-disabling-asm.patch
new file mode 100644
index 0000000000..087a448eec
--- /dev/null
+++ b/meta/recipes-multimedia/x264/x264/Fix-X32-build-by-disabling-asm.patch
@@ -0,0 +1,53 @@
1From 66b120079fb21ed38cab0900c63360b0a7853eaa Mon Sep 17 00:00:00 2001
2From: Christopher Larson <chris_larson@mentor.com>
3Date: Tue, 13 Dec 2016 14:22:32 -0700
4Subject: [PATCH] Fix X32 build by disabling asm
5
6This applies gentoo's x32 patch, adjusted slightly, which disables asm support
7for x32 as well as correcting -m.
8
9Debian has a different patch which does the same, and there's a superior yet
10out of date patch series on the x264 list which keeps asm support enabled, but
11doesn't successfully build at this time, and my assembly is very rusty.
12
13Upstream-Status: Pending
14Signed-off-by: Christopher Larson <chris_larson@mentor.com>
15---
16 configure | 14 ++++++++++++--
17 1 file changed, 12 insertions(+), 2 deletions(-)
18
19diff --git a/configure b/configure
20index 3109ec4..844aeae 100755
21--- a/configure
22+++ b/configure
23@@ -703,7 +703,13 @@ case $host_cpu in
24 AS_EXT=".asm"
25 ASFLAGS="$ASFLAGS -DARCH_X86_64=1 -I\$(SRCPATH)/common/x86/"
26 stack_alignment=16
27- [ $compiler = GNU ] && CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS"
28+ if [ $compiler = GNU ]; then
29+ if cpp_check "" "" "__ILP32__" ; then
30+ CFLAGS="-mx32 $CFLAGS" && LDFLAGS="-mx32 $LDFLAGS"
31+ else
32+ CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS"
33+ fi
34+ fi
35 if [ "$SYS" = MACOSX ]; then
36 ASFLAGS="$ASFLAGS -f macho64 -DPIC -DPREFIX"
37 if cc_check '' "-arch x86_64"; then
38@@ -722,7 +728,11 @@ case $host_cpu in
39 RCFLAGS="--target=pe-x86-64 $RCFLAGS"
40 fi
41 else
42- ASFLAGS="$ASFLAGS -f elf64"
43+ if cpp_check "" "" "__ILP32__" ; then
44+ asm=no
45+ else
46+ ASFLAGS="$ASFLAGS -f elf64"
47+ fi
48 fi
49 ;;
50 powerpc*)
51--
522.8.0
53
diff --git a/meta/recipes-multimedia/x264/x264_git.bb b/meta/recipes-multimedia/x264/x264_git.bb
index 1dafdd53ae..64193dcb45 100644
--- a/meta/recipes-multimedia/x264/x264_git.bb
+++ b/meta/recipes-multimedia/x264/x264_git.bb
@@ -10,6 +10,7 @@ DEPENDS = "yasm-native"
10 10
11SRC_URI = "git://github.com/mirror/x264;branch=stable \ 11SRC_URI = "git://github.com/mirror/x264;branch=stable \
12 file://don-t-default-to-cortex-a9-with-neon.patch \ 12 file://don-t-default-to-cortex-a9-with-neon.patch \
13 file://Fix-X32-build-by-disabling-asm.patch \
13 " 14 "
14 15
15SRCREV = "86b71982e131eaa70125f8d0e725fcade9c4c677" 16SRCREV = "86b71982e131eaa70125f8d0e725fcade9c4c677"