diff options
Diffstat (limited to 'meta/recipes-multimedia/x264/x264/Fix-X32-build-by-disabling-asm.patch')
-rw-r--r-- | meta/recipes-multimedia/x264/x264/Fix-X32-build-by-disabling-asm.patch | 53 |
1 files changed, 53 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 @@ | |||
1 | From 66b120079fb21ed38cab0900c63360b0a7853eaa Mon Sep 17 00:00:00 2001 | ||
2 | From: Christopher Larson <chris_larson@mentor.com> | ||
3 | Date: Tue, 13 Dec 2016 14:22:32 -0700 | ||
4 | Subject: [PATCH] Fix X32 build by disabling asm | ||
5 | |||
6 | This applies gentoo's x32 patch, adjusted slightly, which disables asm support | ||
7 | for x32 as well as correcting -m. | ||
8 | |||
9 | Debian has a different patch which does the same, and there's a superior yet | ||
10 | out of date patch series on the x264 list which keeps asm support enabled, but | ||
11 | doesn't successfully build at this time, and my assembly is very rusty. | ||
12 | |||
13 | Upstream-Status: Pending | ||
14 | Signed-off-by: Christopher Larson <chris_larson@mentor.com> | ||
15 | --- | ||
16 | configure | 14 ++++++++++++-- | ||
17 | 1 file changed, 12 insertions(+), 2 deletions(-) | ||
18 | |||
19 | diff --git a/configure b/configure | ||
20 | index 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 | -- | ||
52 | 2.8.0 | ||
53 | |||