From da8781997d35afe8cd7d567f369ff3ad54e15742 Mon Sep 17 00:00:00 2001 From: Hussein Mkwizu Date: Fri, 3 Jul 2015 15:15:49 +0300 Subject: [PATCH 1/3] added x86_64, updated sdk to 8.4 --- Rakefile | 63 ++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 48 insertions(+), 15 deletions(-) diff --git a/Rakefile b/Rakefile index ea4532f2..2e82b590 100644 --- a/Rakefile +++ b/Rakefile @@ -10,7 +10,7 @@ end ## build ffmpeg -SDK_VERSION='7.1' +SDK_VERSION='8.4' XCODE_PATH='/Applications/Xcode.app/Contents/Developer/Platforms' GCC_PATH='/Applications/XCode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' @@ -27,8 +27,18 @@ FFMPEG_BUILD_ARGS_SIM = [ '--disable-mmx', '--arch=i386', '--cpu=i386', -"--extra-ldflags='-arch i386 -miphoneos-version-min=6.0'", -"--extra-cflags='-arch i386 -miphoneos-version-min=6.0'", +"--extra-ldflags='-arch i386 -miphoneos-version-min=7.0'", +"--extra-cflags='-arch i386 -miphoneos-version-min=7.0'", +'--disable-asm', +] + +FFMPEG_BUILD_ARGS_SIM_64 = [ +'--assert-level=2', +'--disable-mmx', +'--arch=x86_64', +'--cpu=x86_64', +"--extra-ldflags='-arch x86_64 -miphoneos-version-min=7.0'", +"--extra-cflags='-arch x86_64 -miphoneos-version-min=7.0'", '--disable-asm', ] @@ -36,8 +46,8 @@ FFMPEG_BUILD_ARGS_ARMV7 = [ '--arch=arm', '--cpu=cortex-a8', '--enable-pic', -"--extra-cflags='-arch armv7 -miphoneos-version-min=6.0'", -"--extra-ldflags='-arch armv7 -miphoneos-version-min=6.0'", +"--extra-cflags='-arch armv7 -miphoneos-version-min=7.0'", +"--extra-ldflags='-arch armv7 -miphoneos-version-min=7.0'", "--extra-cflags='-mfpu=neon -mfloat-abi=softfp'", '--enable-neon', # '--disable-neon', @@ -53,8 +63,8 @@ FFMPEG_BUILD_ARGS_ARMV7S = [ '--arch=arm', '--cpu=cortex-a9', '--enable-pic', -"--extra-cflags='-arch armv7s -miphoneos-version-min=6.0'", -"--extra-ldflags='-arch armv7s -miphoneos-version-min=6.0'", +"--extra-cflags='-arch armv7s -miphoneos-version-min=7.0'", +"--extra-ldflags='-arch armv7s -miphoneos-version-min=7.0'", "--extra-cflags='-mfpu=neon -mfloat-abi=softfp'", '--enable-neon', # '--disable-neon', @@ -70,8 +80,8 @@ FFMPEG_BUILD_ARGS_ARM64 = [ '--arch=arm64', # '--cpu=cortex-a9', '--enable-pic', -"--extra-cflags='-arch arm64 -miphoneos-version-min=6.0'", -"--extra-ldflags='-arch arm64 -miphoneos-version-min=6.0'", +"--extra-cflags='-arch arm64 -miphoneos-version-min=7.0'", +"--extra-ldflags='-arch arm64 -miphoneos-version-min=7.0'", "--extra-cflags='-mfpu=neon -mfloat-abi=softfp'", '--enable-neon', # '--disable-neon', @@ -144,6 +154,8 @@ def buildArch(arch) case arch when 'i386' args = mkArgs(PLATOFRM_PATH_SIM, SDK_PATH_SIM, FFMPEG_BUILD_ARGS_SIM) + when 'x86_64' + args = mkArgs(PLATOFRM_PATH_SIM, SDK_PATH_SIM, FFMPEG_BUILD_ARGS_SIM_64) when 'armv7' args = mkArgs(PLATOFRM_PATH_IOS, SDK_PATH_IOS, FFMPEG_BUILD_ARGS_ARMV7) when 'armv7s' @@ -164,7 +176,7 @@ def buildArch(arch) end def mkLipoArgs(lib) - "-create -arch armv7 armv7/#{lib}.a -arch armv7 armv7s/#{lib}.a -arch arm64 arm64/#{lib}.a -arch i386 i386/#{lib}.a -output universal/#{lib}.a" + "-create -arch armv7 armv7/#{lib}.a -arch armv7 armv7s/#{lib}.a -arch arm64 arm64/#{lib}.a -arch i386 i386/#{lib}.a -arch x86_64 x86_64/#{lib}.a -output universal/#{lib}.a" end desc "check gas-preprocessor.pl" @@ -202,6 +214,11 @@ task :build_ffmpeg_i386 do buildArch('i386') end +desc "Build ffmpeg x86_64 libs" +task :build_ffmpeg_x86_64 do + buildArch('x86_64') +end + desc "Build ffmpeg armv7 libs" task :build_ffmpeg_armv7 do buildArch('armv7') @@ -259,9 +276,16 @@ task :build_movie_debug do system_or_exit "xcodebuild -project kxmovie.xcodeproj -target kxmovie -configuration Debug -sdk iphoneos#{SDK_VERSION} build SYMROOT=#{buildDir} -arch armv7s" FileUtils.move Pathname.new('tmp/build/Debug-iphoneos/libkxmovie.a'), Pathname.new('tmp/build/Debug-iphoneos/libkxmovie_armv7s.a') + system_or_exit "xcodebuild -project kxmovie.xcodeproj -target kxmovie -configuration Debug -sdk iphoneos#{SDK_VERSION} build SYMROOT=#{buildDir} -arch arm64" + FileUtils.move Pathname.new('tmp/build/Debug-iphoneos/libkxmovie.a'), Pathname.new('tmp/build/Debug-iphoneos/libkxmovie_arm64.a') + system_or_exit "xcodebuild -project kxmovie.xcodeproj -target kxmovie -configuration Debug -sdk iphoneos#{SDK_VERSION} build SYMROOT=#{buildDir} -arch armv7" + + system_or_exit "xcodebuild -project kxmovie.xcodeproj -target kxmovie -configuration Debug -sdk iphonesimulator#{SDK_VERSION} build SYMROOT=#{buildDir} -arch x86_64" + FileUtils.move Pathname.new('tmp/build/Debug-iphonesimulator/libkxmovie.a'), Pathname.new('tmp/build/Debug-iphonesimulator/libkxmovie_x86_64.a') + system_or_exit "xcodebuild -project kxmovie.xcodeproj -target kxmovie -configuration Debug -sdk iphonesimulator#{SDK_VERSION} build SYMROOT=#{buildDir}" - system_or_exit "lipo -create -arch armv7 tmp/build/Debug-iphoneos/libkxmovie.a -arch armv7 tmp/build/Debug-iphoneos/libkxmovie_armv7s.a -arch i386 tmp/build/Debug-iphonesimulator/libkxmovie.a -output tmp/build/libkxmovie.a" + system_or_exit "lipo -create -arch armv7 tmp/build/Debug-iphoneos/libkxmovie.a -arch armv7 tmp/build/Debug-iphoneos/libkxmovie_armv7s.a -arch arm64 tmp/build/Debug-iphoneos/libkxmovie_arm64.a -arch x86_64 tmp/build/Debug-iphonesimulator/libkxmovie_x86_64.a -arch i386 tmp/build/Debug-iphonesimulator/libkxmovie.a -output tmp/build/libkxmovie.a" end desc "Build libkxmovie-release" @@ -270,9 +294,18 @@ task :build_movie_release do system_or_exit "xcodebuild -project kxmovie.xcodeproj -target kxmovie -configuration Release -sdk iphoneos#{SDK_VERSION} build SYMROOT=#{buildDir} -arch armv7s" FileUtils.move Pathname.new('tmp/build/Release-iphoneos/libkxmovie.a'), Pathname.new('tmp/build/Release-iphoneos/libkxmovie_armv7s.a') + system_or_exit "xcodebuild -project kxmovie.xcodeproj -target kxmovie -configuration Release -sdk iphoneos#{SDK_VERSION} build SYMROOT=#{buildDir} -arch arm64" + FileUtils.move Pathname.new('tmp/build/Release-iphoneos/libkxmovie.a'), Pathname.new('tmp/build/Release-iphoneos/libkxmovie_arm64.a') + system_or_exit "xcodebuild -project kxmovie.xcodeproj -target kxmovie -configuration Release -sdk iphoneos#{SDK_VERSION} build SYMROOT=#{buildDir} -arch armv7" - system_or_exit "xcodebuild -project kxmovie.xcodeproj -target kxmovie -configuration Debug -sdk iphonesimulator#{SDK_VERSION} build SYMROOT=#{buildDir}" - system_or_exit "lipo -create -arch armv7 tmp/build/Release-iphoneos/libkxmovie.a -arch armv7 tmp/build/Release-iphoneos/libkxmovie_armv7s.a -arch i386 tmp/build/Debug-iphonesimulator/libkxmovie.a -output tmp/build/libkxmovie.a" + + system_or_exit "xcodebuild -project kxmovie.xcodeproj -target kxmovie -configuration Debug -sdk iphonesimulator#{SDK_VERSION} build SYMROOT=#{buildDir} -arch x86_64" + + FileUtils.move Pathname.new('tmp/build/Debug-iphonesimulator/libkxmovie.a'), Pathname.new('tmp/build/Debug-iphonesimulator/libkxmovie_x86_64.a') + + system_or_exit "xcodebuild -project kxmovie.xcodeproj -target kxmovie -configuration Debug -sdk iphonesimulator#{SDK_VERSION} build SYMROOT=#{buildDir}" + + system_or_exit "lipo -create -arch armv7 tmp/build/Release-iphoneos/libkxmovie.a -arch armv7 tmp/build/Release-iphoneos/libkxmovie_armv7s.a -arch arm64 tmp/build/Release-iphoneos/libkxmovie_arm64.a -arch x86_64 tmp/build/Debug-iphonesimulator/libkxmovie_x86_64.a -arch i386 tmp/build/Debug-iphonesimulator/libkxmovie.a -output tmp/build/libkxmovie.a" #FileUtils.copy Pathname.new('tmp/build/Release-iphoneos/libkxmovie.a'), buildDir end @@ -294,9 +327,9 @@ end ## task :clean => [:clean_movie_debug, :clean_movie_release, :clean_ffmpeg] -task :build_ffmpeg => [:check_gas_preprocessor, :build_ffmpeg_armv7, :build_ffmpeg_armv7s, :build_ffmpeg_arm64, :build_ffmpeg_i386, :build_ffmpeg_universal] +task :build_ffmpeg => [:check_gas_preprocessor, :build_ffmpeg_armv7, :build_ffmpeg_armv7s, :build_ffmpeg_arm64, :build_ffmpeg_i386, :build_ffmpeg_x86_64, :build_ffmpeg_universal] #task :build_movie => [:build_movie_debug, :copy_movie] task :build_movie => [:build_movie_release, :copy_movie] task :build_all => [:build_ffmpeg, :build_movie] # task :default => [:build_all] -task :default => [:build_ffmpeg] +task :default => [:build_ffmpeg] \ No newline at end of file From a0f38372286f65d28ec09b6cb7be50dbb5e3d2a7 Mon Sep 17 00:00:00 2001 From: Hussein Mkwizu Date: Tue, 29 Sep 2015 12:03:35 +0300 Subject: [PATCH 2/3] added bitcode support --- FFmpeg | 2 +- Rakefile | 18 +++++++++--------- gas-preprocessor | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/FFmpeg b/FFmpeg index 1e25afc1..b3066be0 160000 --- a/FFmpeg +++ b/FFmpeg @@ -1 +1 @@ -Subproject commit 1e25afc1811a279094ebc2bc6407715a439e09ee +Subproject commit b3066be0e460d915db344c21d092b5554b1b68e8 diff --git a/Rakefile b/Rakefile index 2e82b590..d527c362 100644 --- a/Rakefile +++ b/Rakefile @@ -10,7 +10,7 @@ end ## build ffmpeg -SDK_VERSION='8.4' +SDK_VERSION='9.0' XCODE_PATH='/Applications/Xcode.app/Contents/Developer/Platforms' GCC_PATH='/Applications/XCode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' @@ -28,7 +28,7 @@ FFMPEG_BUILD_ARGS_SIM = [ '--arch=i386', '--cpu=i386', "--extra-ldflags='-arch i386 -miphoneos-version-min=7.0'", -"--extra-cflags='-arch i386 -miphoneos-version-min=7.0'", +"--extra-cflags='-arch i386 -miphoneos-version-min=7.0 -fembed-bitcode'", '--disable-asm', ] @@ -38,7 +38,7 @@ FFMPEG_BUILD_ARGS_SIM_64 = [ '--arch=x86_64', '--cpu=x86_64', "--extra-ldflags='-arch x86_64 -miphoneos-version-min=7.0'", -"--extra-cflags='-arch x86_64 -miphoneos-version-min=7.0'", +"--extra-cflags='-arch x86_64 -miphoneos-version-min=7.0 -fembed-bitcode'", '--disable-asm', ] @@ -46,9 +46,9 @@ FFMPEG_BUILD_ARGS_ARMV7 = [ '--arch=arm', '--cpu=cortex-a8', '--enable-pic', -"--extra-cflags='-arch armv7 -miphoneos-version-min=7.0'", +"--extra-cflags='-arch armv7 -miphoneos-version-min=7.0 -fembed-bitcode'", "--extra-ldflags='-arch armv7 -miphoneos-version-min=7.0'", -"--extra-cflags='-mfpu=neon -mfloat-abi=softfp'", +"--extra-cflags='-mfpu=neon -mfloat-abi=softfp -fembed-bitcode'", '--enable-neon', # '--disable-neon', '--enable-optimizations', @@ -63,9 +63,9 @@ FFMPEG_BUILD_ARGS_ARMV7S = [ '--arch=arm', '--cpu=cortex-a9', '--enable-pic', -"--extra-cflags='-arch armv7s -miphoneos-version-min=7.0'", +"--extra-cflags='-arch armv7s -miphoneos-version-min=7.0 -fembed-bitcode'", "--extra-ldflags='-arch armv7s -miphoneos-version-min=7.0'", -"--extra-cflags='-mfpu=neon -mfloat-abi=softfp'", +"--extra-cflags='-mfpu=neon -mfloat-abi=softfp -fembed-bitcode'", '--enable-neon', # '--disable-neon', '--enable-optimizations', @@ -80,9 +80,9 @@ FFMPEG_BUILD_ARGS_ARM64 = [ '--arch=arm64', # '--cpu=cortex-a9', '--enable-pic', -"--extra-cflags='-arch arm64 -miphoneos-version-min=7.0'", +"--extra-cflags='-arch arm64 -miphoneos-version-min=7.0 -fembed-bitcode'", "--extra-ldflags='-arch arm64 -miphoneos-version-min=7.0'", -"--extra-cflags='-mfpu=neon -mfloat-abi=softfp'", +"--extra-cflags='-mfpu=neon -mfloat-abi=softfp -fembed-bitcode'", '--enable-neon', # '--disable-neon', '--enable-optimizations', diff --git a/gas-preprocessor b/gas-preprocessor index cafe6e55..dd811e7a 160000 --- a/gas-preprocessor +++ b/gas-preprocessor @@ -1 +1 @@ -Subproject commit cafe6e55a5606c5423c0a0e4045a97f2c3a86338 +Subproject commit dd811e7a8403ef762e333909c54c24674ee04892 From e337467fe7e7050e0dad4a66ace2109aa616135d Mon Sep 17 00:00:00 2001 From: Hussein Mkwizu Date: Tue, 29 Sep 2015 15:46:10 +0300 Subject: [PATCH 3/3] rolled back to a working FFMpeg --- FFmpeg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FFmpeg b/FFmpeg index b3066be0..1e25afc1 160000 --- a/FFmpeg +++ b/FFmpeg @@ -1 +1 @@ -Subproject commit b3066be0e460d915db344c21d092b5554b1b68e8 +Subproject commit 1e25afc1811a279094ebc2bc6407715a439e09ee