From d4d600c70529cd4e12a03530df74ce22ebeffc40 Mon Sep 17 00:00:00 2001 From: Javernaut Date: Thu, 21 Oct 2021 18:47:37 +0300 Subject: [PATCH] Dropping support of gnu binutils --- .github/workflows/compilability_check.yml | 3 +-- scripts/export-build-variables.sh | 15 ++------------- scripts/libvpx/build.sh | 5 +---- scripts/parse-arguments.sh | 14 -------------- 4 files changed, 4 insertions(+), 33 deletions(-) diff --git a/.github/workflows/compilability_check.yml b/.github/workflows/compilability_check.yml index beba27a..9af82f6 100644 --- a/.github/workflows/compilability_check.yml +++ b/.github/workflows/compilability_check.yml @@ -6,7 +6,6 @@ jobs: strategy: matrix: abi: [ "armeabi-v7a", "arm64-v8a", "x86", "x86_64" ] - binutils: [ "gnu", "llvm" ] fail-fast: false steps: - uses: actions/checkout@v2 @@ -19,4 +18,4 @@ jobs: - name: Executing the script run: | export ANDROID_SDK_HOME=$ANDROID_HOME - ./ffmpeg-android-maker.sh -all-free -all-gpl -android=21 -abis=${{ matrix.abi }} -binutils=${{ matrix.binutils }} \ No newline at end of file + ./ffmpeg-android-maker.sh -all-free -all-gpl -android=21 -abis=${{ matrix.abi }} \ No newline at end of file diff --git a/scripts/export-build-variables.sh b/scripts/export-build-variables.sh index 2ef4ac1..5c58904 100755 --- a/scripts/export-build-variables.sh +++ b/scripts/export-build-variables.sh @@ -54,18 +54,11 @@ export TARGET_TRIPLE_MACHINE_CC=$TARGET_TRIPLE_MACHINE_CC export CPU_FAMILY=$CPU_FAMILY # Common prefix for ld, as, etc. -if [ $DESIRED_BINUTILS = "gnu" ] ; then - export CROSS_PREFIX=${TARGET_TRIPLE_MACHINE_BINUTILS}-linux-${TARGET_TRIPLE_OS}- -else - export CROSS_PREFIX=llvm- -fi - -export CROSS_PREFIX_WITH_PATH=${TOOLCHAIN_PATH}/bin/${CROSS_PREFIX} +export CROSS_PREFIX_WITH_PATH=${TOOLCHAIN_PATH}/bin/llvm- # Exporting Binutils paths, if passing just CROSS_PREFIX_WITH_PATH is not enough # The FAM_ prefix is used to eliminate passing those values implicitly to build systems export FAM_ADDR2LINE=${CROSS_PREFIX_WITH_PATH}addr2line -export FAM_AS=${CROSS_PREFIX_WITH_PATH}as export FAM_AR=${CROSS_PREFIX_WITH_PATH}ar export FAM_NM=${CROSS_PREFIX_WITH_PATH}nm export FAM_OBJCOPY=${CROSS_PREFIX_WITH_PATH}objcopy @@ -81,11 +74,7 @@ export TARGET=${TARGET_TRIPLE_MACHINE_CC}-linux-${TARGET_TRIPLE_OS}${ANDROID_PLA export FAM_CC=${TOOLCHAIN_PATH}/bin/${TARGET}-clang export FAM_CXX=${FAM_CC}++ export FAM_LD=${FAM_CC} - -if [[ $DESIRED_BINUTILS == "llvm" ]]; then - # The llvm-as doesn't work in place of gnu as, so just using clang here - export FAM_AS=${FAM_CC} -fi +export FAM_AS=${FAM_CC} # TODO consider abondaning this strategy of defining the name of the clang wrapper # in favour of just passing -mstackrealign and -fno-addrsig depending on diff --git a/scripts/libvpx/build.sh b/scripts/libvpx/build.sh index e2b7b66..4a39815 100755 --- a/scripts/libvpx/build.sh +++ b/scripts/libvpx/build.sh @@ -12,10 +12,7 @@ case $ANDROID_ABI in VPX_AS=${FAM_YASM} ;; armeabi-v7a) - EXTRA_BUILD_FLAGS="--target=armv7-android-gcc --enable-thumb" - if [[ $DESIRED_BINUTILS == "llvm" ]]; then - EXTRA_BUILD_FLAGS+=" --disable-neon" - fi + EXTRA_BUILD_FLAGS="--target=armv7-android-gcc --enable-thumb --disable-neon" ;; arm64-v8a) EXTRA_BUILD_FLAGS="--target=arm64-android-gcc --enable-thumb" diff --git a/scripts/parse-arguments.sh b/scripts/parse-arguments.sh index 9a73929..26bb280 100755 --- a/scripts/parse-arguments.sh +++ b/scripts/parse-arguments.sh @@ -10,7 +10,6 @@ ABIS_TO_BUILD=() API_LEVEL=16 SOURCE_TYPE=TAR SOURCE_VALUE=4.4 -BINUTILS=gnu EXTERNAL_LIBRARIES=() FFMPEG_GPL_ENABLED=false @@ -73,18 +72,6 @@ for argument in "$@"; do SOURCE_TYPE=TAR SOURCE_VALUE="${argument#*=}" ;; - # Which binutils to use (gnu or llvm) - --binutils=* | -binutils=*) - binutils_value="${argument#*=}" - case $binutils_value in - gnu | llvm) - BINUTILS=$binutils_value - ;; - *) - echo "Unknown binutils: $binutils_value" - ;; - esac - ;; # Arguments below enable certain external libraries to build into FFmpeg --enable-libaom | -aom) EXTERNAL_LIBRARIES+=("libaom") @@ -154,4 +141,3 @@ export FFMPEG_EXTERNAL_LIBRARIES=${EXTERNAL_LIBRARIES[@]} # Desired Android API level to use during compilation # Will be replaced with 21 for 64bit ABIs if the value is less than 21 export DESIRED_ANDROID_API_LEVEL=${API_LEVEL} -export DESIRED_BINUTILS=${BINUTILS}