summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2016-12-13 20:06:51 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-09 13:39:12 +0000
commit602b1858113e6807a7e40820d377ee5a529798af (patch)
tree3a81a0951a8157726dba279aa30aed0b878b9ed9
parent8547e44a0e661e41cbef1ed80231a776060aeca9 (diff)
downloadpoky-602b1858113e6807a7e40820d377ee5a529798af.tar.gz
x264: for x32, disable asm and pass -mx32
We should probably patch it to stop adding the -m argument to CFLAGS/LDFLAGS in the first place, since we pass it in via CC, but this will do for now. (From OE-Core rev: 5d2b0816a92965cdbbb2dca5d3009fbd5064b9ca) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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"