Commit 5bdbead7 authored by Philippe Gorley's avatar Philippe Gorley Committed by Philippe Gorley

contrib: fix ffmpeg compilation on 32 bit android

Don't define _FILE_OFFSET_BITS=64 on 32 bit android: this is no longer a
no-op starting with NDK 15.

Log2f patch no longer required.

Change-Id: I3d42ee9507e151becc2e39a5e97fa9a0fd011261
parent f5472fb8
From c9578eb29da666b71d6aab6fac79c26631bec603 Mon Sep 17 00:00:00 2001
From: philippegorley <gorley.philippe@gmail.com>
Date: Tue, 25 Jul 2017 13:00:19 -0400
Subject: [PATCH] use internal log2/log2f
---
configure | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 9b5789a..a44d8d6 100755
--- a/configure
+++ b/configure
@@ -1926,8 +1926,6 @@ MATH_FUNCS="
ldexpf
llrint
llrintf
- log2
- log2f
log10f
lrint
lrintf
@@ -6835,6 +6833,9 @@ print_config CONFIG_ "$config_files" $CONFIG_LIST \
$CONFIG_EXTRA \
$ALL_COMPONENTS \
+echo "#define HAVE_LOG2 0" >> $TMPH
+echo "#define HAVE_LOG2F 0" >> $TMPH
+
echo "#endif /* FFMPEG_CONFIG_H */" >> $TMPH
echo "endif # FFMPEG_CONFIG_MAK" >> config.mak
--
2.7.4
--- a/configure 2017-10-03 15:05:34.368369231 -0400
+++ b/configure 2017-10-03 15:06:06.320341666 -0400
@@ -4688,9 +4688,9 @@
check_cflags -std=c99
fi
-check_cc -D_FILE_OFFSET_BITS=64 <<EOF && add_cppflags -D_FILE_OFFSET_BITS=64
-#include <stdlib.h>
-EOF
+#check_cc -D_FILE_OFFSET_BITS=64 <<EOF && add_cppflags -D_FILE_OFFSET_BITS=64
+##include <stdlib.h>
+#EOF
check_cc -D_LARGEFILE_SOURCE <<EOF && add_cppflags -D_LARGEFILE_SOURCE
#include <stdlib.h>
EOF
......@@ -207,10 +207,10 @@ ffmpeg: ffmpeg-$(FFMPEG_HASH).tar.gz .sum-ffmpeg
$(UPDATE_AUTOCONFIG)
ifdef HAVE_ANDROID
ifeq ($(ARCH),arm)
$(APPLY) $(SRC)/ffmpeg/0001-use-internal-log2-log2f.patch
$(APPLY) $(SRC)/ffmpeg/android_file_offset.patch
endif
ifeq ($(ARCH),i386)
$(APPLY) $(SRC)/ffmpeg/0001-use-internal-log2-log2f.patch
$(APPLY) $(SRC)/ffmpeg/android_file_offset.patch
endif
endif
$(MOVE)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment