Browse Source

s3.TUP Fix for Android Toolchains (v0.20.1)

- fix missing variables for android build in plugin_update_toolchain.config.template
- internal configure option for template versioning
pull/45/head
WXbet 4 years ago
parent
commit
ae52897bcc
  1. 2
      support/configs/plugin_update_toolchain.config.template
  2. 6
      support/functions/_plugin_update_toolchain

2
support/configs/plugin_update_toolchain.config.template

@ -59,7 +59,7 @@ ANDK_BUILD_tasks=('TOOLCHAIN="@TOOLCHAIN@";'); # build command1
ANDK_BUILD_tasks+=('printf "Extracting prebuild toolchain "@ANDKSOURCE@/toolchains/llvm/prebuilt/linux-x86_64" from NDK to "@TOOLCHAIN@"..." | tee -a "@LOGFILE@" && rm -rf "@TOOLCHAIN@" | tee -a "@LOGFILE@" && cp -rf "@ANDKSOURCE@/toolchains/llvm/prebuilt/linux-x86_64/" "@TOOLCHAIN@" | tee -a "@LOGFILE@";'); # build command2
ANDK_BUILD_tasks+=('cleanups="aarch64 arm i686 i386 x86_64 python .py pkgconfig ++ cmake test prebuilt_include bfd-plugins 2to3 share 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30";'); # build command3
ANDK_BUILD_tasks+=('cleanups=${cleanups//$ANDK_ARCH/} && cleanups=${cleanups//$ANDK_API/};'); # build command4
ANDK_BUILD_tasks+=('printf "Cleaning up extracted toolchain to save disk space..." | tee -a "@LOGFILE@" && for c in ; do find -name "*$c*" ! -name "*libc++*" -exec rm -rf {} \; 2>/dev/null >>"@LOGFILE@" 2>&1; done;'); # build command5
ANDK_BUILD_tasks+=('printf "Cleaning up extracted toolchain to save disk space..." | tee -a "@LOGFILE@" && for c in $cleanups; do find "@TOOLCHAIN@" -name "*$c*" ! -name "*libc++*" -exec rm -rf {} \; 2>/dev/null >>"@LOGFILE@" 2>&1; done;'); # build command5
ANDK_BUILD_tasks+=('rm -rf "$TOOLCHAIN/include" "$TOOLCHAIN/libexec" | tee -a "@LOGFILE@";'); # build command6
ANDK_BUILD_tasks+=('printf "Creating symlinks "$TOOLCHAIN/bin/${ANDK_HOST}-gcc", "$TOOLCHAIN/bin/${ANDK_HOST}-clang" to wrap "$TOOLCHAIN/bin/${ANDK_CLANG}"..." | tee -a "@LOGFILE@" && ln -rsf "$TOOLCHAIN/bin/${ANDK_CLANG}" "$TOOLCHAIN/bin/${ANDK_HOST}-gcc" && ln -rsf "$TOOLCHAIN/bin/${ANDK_CLANG}" "$TOOLCHAIN/bin/${ANDK_HOST}-clang" && chmod 775 "$TOOLCHAIN/bin/${ANDK_HOST}*" | tee -a "@LOGFILE@";'); # build command7
ANDK_SETUP_tasks=('curl --silent "$ANDK_REPO_URL" | busybox unzip -;'); # setup command1

6
support/functions/_plugin_update_toolchain

@ -3,12 +3,13 @@
#simplebuild_plugin tcupdate
tcupdate(){
pversion="0.20.0";
pversion="0.20.1";
pname="s3.TUP";
pdesc="Plugin $pname v$pversion";
configname="$configdir/plugin_update_toolchain.config";
configtemplate="${configname}.template";
disable_syscheck="0";
disable_template_versioning="0";
ctdir="$sdir/crosstool";
cttpldir="$ctdir/templates";
ctngsrcdir="$ctdir/crosstool-ng";
@ -613,7 +614,8 @@ _tpl_editor(){
props=$(_get_template_properties "$cttpldir/$tpl");
desc=$(echo "$props" | awk -F'(' '{print $1}' | xargs);
version=$(echo "$props" | awk -F'^' '{print $2}' | xargs);[ -z "$version" ] && version=0; ((version+=1));
version=$(echo "$props" | awk -F'^' '{print $2}' | xargs);[ -z "$version" ] && version=0;
[ ! "$disable_template_versioning" -eq 1 ] && ((version+=1));
cflags=$(echo "$props" | awk -F'^' '{print $3}' | xargs);
copyof=$(echo "$props" | awk -F'^' '{print $6}' | xargs);

Loading…
Cancel
Save