環境是OS X 10.9, Xcode版本是6.0app
armv7的配置命令行爲ui
CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang ../configure --host=arm-apple-darwin --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk --prefix='build' --extra-cflags='-arch armv7' --extra-ldflags='-arch armv7 -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/usr/lib/system' --enable-pic --extra-asflags='-arch armv7'
arm64/aarch64的配置命令行爲spa
CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang ../configure --host=aarch64-apple-darwin --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk --prefix='build' --extra-cflags='-arch arm64' --extra-ldflags='-arch arm64 -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/usr/lib/system' --enable-pic --extra-asflags='-arch arm64'
這裏我是在x264的頂層目錄裏面新建了一個build目錄,在build目錄執行的。命令行
configure成功之後,用make就能夠編譯出binary了。code
注意在configure成功之後,須要手工copy 一個新版的gas-preprocessor.pl到extras目錄下面orm