Using clang instead of llvm-as as a workaround

pull/53/head
Javernaut 5 years ago
parent c4fe2a1311
commit a582eae29a
  1. 8
      scripts/export-build-variables.sh
  2. 7
      scripts/ffmpeg/build.sh
  3. 2
      scripts/parse-arguments.sh

@ -66,7 +66,6 @@ export CROSS_PREFIX_WITH_PATH=${TOOLCHAIN_PATH}/bin/${CROSS_PREFIX}
# The FAM_ prefix is used to eliminate passing those values implicitly to build systems # The FAM_ prefix is used to eliminate passing those values implicitly to build systems
export FAM_ADDR2LINE=${CROSS_PREFIX_WITH_PATH}addr2line export FAM_ADDR2LINE=${CROSS_PREFIX_WITH_PATH}addr2line
export FAM_AR=${CROSS_PREFIX_WITH_PATH}ar export FAM_AR=${CROSS_PREFIX_WITH_PATH}ar
export FAM_AS=${CROSS_PREFIX_WITH_PATH}as
export FAM_NM=${CROSS_PREFIX_WITH_PATH}nm export FAM_NM=${CROSS_PREFIX_WITH_PATH}nm
export FAM_OBJCOPY=${CROSS_PREFIX_WITH_PATH}objcopy export FAM_OBJCOPY=${CROSS_PREFIX_WITH_PATH}objcopy
export FAM_OBJDUMP=${CROSS_PREFIX_WITH_PATH}objdump export FAM_OBJDUMP=${CROSS_PREFIX_WITH_PATH}objdump
@ -80,12 +79,13 @@ export TARGET=${TARGET_TRIPLE_MACHINE_CC}-linux-${TARGET_TRIPLE_OS}${ANDROID_PLA
# The name for compiler is slightly different, so it is defined separatly. # The name for compiler is slightly different, so it is defined separatly.
export FAM_CC=${TOOLCHAIN_PATH}/bin/${TARGET}-clang export FAM_CC=${TOOLCHAIN_PATH}/bin/${TARGET}-clang
export FAM_CXX=${FAM_CC}++ export FAM_CXX=${FAM_CC}++
export FAM_LD=${FAM_CC}
if [ $DESIRED_BINUTILS = "gnu" ] ; then if [ $DESIRED_BINUTILS = "gnu" ] ; then
export FAM_LD=${CROSS_PREFIX_WITH_PATH}ld export FAM_AS=${CROSS_PREFIX_WITH_PATH}as
else else
# If desired binutils has to be 'llvm', then use clang as linker. # The llvm-as stucks in the beginning of FFmpeg's configure script, so use clang
export FAM_LD=${FAM_CC} export FAM_AS=${FAM_CC}
fi fi
# TODO consider abondaning this strategy of defining the name of the clang wrapper # TODO consider abondaning this strategy of defining the name of the clang wrapper

@ -27,9 +27,14 @@ DEP_LD_FLAGS="-L${BUILD_DIR_EXTERNAL}/${ANDROID_ABI}/lib $FFMPEG_EXTRA_LD_FLAGS"
--target-os=android \ --target-os=android \
--arch=${TARGET_TRIPLE_MACHINE_BINUTILS} \ --arch=${TARGET_TRIPLE_MACHINE_BINUTILS} \
--sysroot=${SYSROOT_PATH} \ --sysroot=${SYSROOT_PATH} \
--cross-prefix=${CROSS_PREFIX_WITH_PATH} \
--cc=${FAM_CC} \ --cc=${FAM_CC} \
--cxx=${FAM_CXX} \
--ld=${FAM_LD} \ --ld=${FAM_LD} \
--ar=${FAM_AR} \
--as=${FAM_AS} \
--nm=${FAM_NM} \
--ranlib=${FAM_RANLIB} \
--strip=${FAM_STRIP} \
--extra-cflags="-O3 -fPIC $DEP_CFLAGS" \ --extra-cflags="-O3 -fPIC $DEP_CFLAGS" \
--extra-ldflags="$DEP_LD_FLAGS" \ --extra-ldflags="$DEP_LD_FLAGS" \
--enable-shared \ --enable-shared \

@ -55,7 +55,7 @@ for argument in "$@"; do
SOURCE_VALUE="${argument#*=}" SOURCE_VALUE="${argument#*=}"
;; ;;
# Which binutils to use (gnu or llvm) # Which binutils to use (gnu or llvm)
--binutils=*) --binutils=*|-binutils=*)
binutils_value="${argument#*=}" binutils_value="${argument#*=}"
case $binutils_value in case $binutils_value in
gnu|llvm) gnu|llvm)

Loading…
Cancel
Save