Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
wysaid committed Feb 2, 2020
1 parent e50d2bb commit 3462560
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 19 deletions.
4 changes: 3 additions & 1 deletion build_script/ffmpeg/build_android_arm64_v8a.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ echo ./configure \
${MODULES} \
--disable-doc \
--enable-neon \
--disable-filters
--disable-filters \
--enable-pic \
--enable-yasm

make clean
make -j$(getconf _NPROCESSORS_ONLN)
Expand Down
4 changes: 3 additions & 1 deletion build_script/ffmpeg/build_android_armeabi_v7a.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ echo ./configure \
${MODULES} \
--disable-doc \
--enable-neon \
--disable-filters
--disable-filters \
--enable-pic \
--enable-yasm

make clean
make -j$(getconf _NPROCESSORS_ONLN)
Expand Down
17 changes: 10 additions & 7 deletions build_script/ffmpeg/build_android_x86.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ echo ./configure \
--prefix=${TEMP_PREFIX} \
${GENERAL} \
--sysroot=$SYSROOT \
--extra-cflags="-DANDROID -fPIC -O3 -ffunction-sections -funwind-tables -fstack-protector -mfloat-abi=softfp -mfpu=vfpv3-d16 -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -fasm -Wno-psabi -fno-short-enums" \
--extra-cflags="-march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32" \
--extra-ldflags="-Wl,-rpath-link=$SYSROOT/usr/lib -L$SYSROOT/usr/lib -nostdlib -lc -lm -ldl -llog" \
--extra-cflags="-DANDROID -fPIC -O3 -ffunction-sections -funwind-tables -fstack-protector -mfloat-abi=softfp -mfpu=vfpv3-d16 -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -fasm -Wno-psabi -fno-short-enums -march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32" \
--extra-ldflags="-Wl,-rpath-link=$SYSROOT/usr/lib -L$SYSROOT/usr/lib -nostdlib -lc -lm -ldl -llog -fPIC" \
--enable-zlib \
--enable-static \
--disable-shared \
Expand Down Expand Up @@ -95,15 +94,17 @@ echo ./configure \
${MODULES} \
--disable-doc \
--enable-neon \
--disable-filters
--disable-filters \
--enable-pic \
--enable-yasm


./configure \
--target-os=linux \
--prefix=${TEMP_PREFIX} \
${GENERAL} \
--sysroot=$SYSROOT \
--extra-cflags="-DANDROID -fPIC -O3 -ffunction-sections -funwind-tables -fstack-protector -mfloat-abi=softfp -mfpu=vfpv3-d16 -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -fasm -Wno-psabi -fno-short-enums" \
--extra-cflags="-march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32" \
--extra-cflags="-DANDROID -fPIC -O3 -ffunction-sections -funwind-tables -fstack-protector -mfloat-abi=softfp -mfpu=vfpv3-d16 -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -fasm -Wno-psabi -fno-short-enums -march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32" \
--extra-ldflags="-Wl,-rpath-link=$SYSROOT/usr/lib -L$SYSROOT/usr/lib -nostdlib -lc -lm -ldl -llog -fPIC" \
--enable-zlib \
--enable-static \
Expand Down Expand Up @@ -161,7 +162,9 @@ echo ./configure \
${MODULES} \
--disable-doc \
--enable-neon \
--disable-filters
--disable-filters \
--enable-pic \
--enable-yasm

make clean
make -j$(getconf _NPROCESSORS_ONLN)
Expand Down
18 changes: 10 additions & 8 deletions build_script/ffmpeg/build_android_x86_64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ echo ./configure \
--prefix=${TEMP_PREFIX} \
${GENERAL} \
--sysroot=$SYSROOT \
--extra-cflags="-DANDROID -fPIC -O3 -ffunction-sections -funwind-tables -fstack-protector -mfloat-abi=softfp -mfpu=vfpv3-d16 -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -fasm -Wno-psabi -fno-short-enums" \
--extra-cflags="-march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel" \
--extra-ldflags="-Wl,-rpath-link=$SYSROOT/usr/lib -L$SYSROOT/usr/lib -nostdlib -lc -lm -ldl -llog" \
--extra-cflags="-DANDROID -fPIC -fpic -O3 -ffunction-sections -funwind-tables -fstack-protector -mfloat-abi=softfp -mfpu=vfpv3-d16 -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -fasm -Wno-psabi -fno-short-enums -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel" \
--extra-ldflags="-Wl,-rpath-link=$SYSROOT/usr/lib -L$SYSROOT/usr/lib -nostdlib -lc -lm -ldl -llog -fPIC -fpic -fPIE" \
--enable-zlib \
--enable-static \
--disable-shared \
Expand Down Expand Up @@ -95,16 +94,17 @@ echo ./configure \
${MODULES} \
--disable-doc \
--enable-neon \
--disable-filters
--disable-filters \
--enable-pic \
--enable-yasm

./configure \
--target-os=linux \
--prefix=${TEMP_PREFIX} \
${GENERAL} \
--sysroot=$SYSROOT \
--extra-cflags="-DANDROID -fPIC -O3 -ffunction-sections -funwind-tables -fstack-protector -mfloat-abi=softfp -mfpu=vfpv3-d16 -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -fasm -Wno-psabi -fno-short-enums" \
--extra-cflags="-march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel" \
--extra-ldflags="-Wl,-rpath-link=$SYSROOT/usr/lib -L$SYSROOT/usr/lib -nostdlib -lc -lm -ldl -llog -fPIC" \
--extra-cflags="-DANDROID -fPIC -fpic -O3 -ffunction-sections -funwind-tables -fstack-protector -mfloat-abi=softfp -mfpu=vfpv3-d16 -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -fasm -Wno-psabi -fno-short-enums -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel" \
--extra-ldflags="-Wl,-rpath-link=$SYSROOT/usr/lib -L$SYSROOT/usr/lib -nostdlib -lc -lm -ldl -llog -fPIC -fpic -fPIE" \
--enable-zlib \
--enable-static \
--disable-shared \
Expand Down Expand Up @@ -161,7 +161,9 @@ echo ./configure \
${MODULES} \
--disable-doc \
--enable-neon \
--disable-filters
--disable-filters \
--enable-pic \
--enable-yasm

make clean
make -j$(getconf _NPROCESSORS_ONLN)
Expand Down
3 changes: 3 additions & 0 deletions build_script/x264/build_android_x86_64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,18 @@ mkdir -p $TEMP_PREFIX
echo ./configure \
--prefix=${TEMP_PREFIX} \
--enable-static \
--disable-cli \
--enable-pic \
--host=x86_64-linux \
--cross-prefix=$CROSS_PREFIX \
--sysroot=$SYSROOT

./configure \
--prefix=${TEMP_PREFIX} \
--extra-cflags="-fPIC -fpic" \
--enable-static \
--enable-pic \
--disable-cli \
--host=x86_64-linux \
--cross-prefix=$CROSS_PREFIX \
--sysroot=$SYSROOT
Expand Down
2 changes: 1 addition & 1 deletion jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ include $(CLEAR_VARS)

LOCAL_MODULE := ffmpeg
LOCAL_SRC_FILES := decoder.c encoder.c
LOCAL_LDLIBS := -llog -lz -fPIC -Wl,--no-warn-shared-textrel
LOCAL_LDLIBS := -llog -lz -fPIC -fPIE -Wl,--no-warn-shared-textrel -Wl,-Bsymbolic
LOCAL_CFLAGS := -fPIC -mfloat-abi=softfp -mfpu=neon -O3 -ffast-math -funroll-loops
LOCAL_WHOLE_STATIC_LIBRARIES := libavformat_static \
libavcodec_static \
Expand Down
2 changes: 1 addition & 1 deletion jni/Application.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ APP_PLATFORM := android-16
# 使用STLport作为静态库,这项是Android开发网极力推荐的
#APP_STL := stlport_static
# APP_STL := c++_static
# APP_CPPFLAGS := -frtti -std=c++11
APP_CPPFLAGS := -frtti -std=c++11
APP_OPTIM := release


0 comments on commit 3462560

Please sign in to comment.