From 8e29d6da867d05dcce1d5174ff404cb097462e14 Mon Sep 17 00:00:00 2001 From: leleliu008 Date: Sat, 30 Nov 2024 20:57:55 +0800 Subject: [PATCH] optimized --- .github/workflows/ubuntu.yml | 2 +- ndk-pkg | 58 +++++++++++++++++++++++------------- 2 files changed, 39 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 39986ec..6c03113 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - version: [24.04, 22.04, 20.04] + version: [24.04, 22.04, 20.04, 18.04] container: ubuntu:${{ matrix.version }} diff --git a/ndk-pkg b/ndk-pkg index cb0376b..7667bb0 100755 --- a/ndk-pkg +++ b/ndk-pkg @@ -9010,36 +9010,50 @@ EOF wfetch 'https://musl.cc/x86_64-linux-musl-native.tgz' --no-buffer run $TAR xvf x86_64-linux-musl-native.tgz --strip-components=1 --no-same-owner else - wfetch 'https://github.com/leleliu008/test/releases/download/2023.10.08/gcc-13.1.0-linux-glibc-x86_64.tar.xz' --no-buffer - run $TAR xf gcc-13.1.0-linux-glibc-x86_64.tar.xz --strip-components=1 + run install -d gcc + wfetch 'https://github.com/leleliu008/test/releases/download/2023.10.08/gcc-13.3.0-linux-glibc@2.27-x86_64.release.tar.xz' --no-buffer + run $TAR xf gcc-13.3.0-linux-glibc@2.27-x86_64.release.tar.xz -C gcc --strip-components=1 - wfetch 'https://github.com/leleliu008/test/releases/download/2023.10.08/binutils-2.41-linux-glibc-x86_64.tar.xz' --no-buffer - run $TAR xf binutils-2.41-linux-glibc-x86_64.tar.xz --strip-components=1 + run install -d binutils + wfetch 'https://github.com/leleliu008/test/releases/download/2023.10.08/binutils-2.43.1-linux-glibc@2.27-x86_64.release.tar.xz' --no-buffer + run $TAR xf binutils-2.43.1-linux-glibc@2.27-x86_64.release.tar.xz -C binutils --strip-components=1 + + run install -d mold + wfetch 'https://github.com/leleliu008/test/releases/download/2023.10.08/mold-2.34.1-linux-glibc-x86_64.release.tar.xz' --no-buffer + run $TAR xf mold-*.tar.xz -C mold --strip-components=1 + + install -d bin + ln -sf ../mold/bin/mold bin/ld + + for item in addr2line ar as nm objdump readelf strip objcopy ranlib size strings + do + ln -sf ../binutils/bin/$item bin/$item + done run install -d sysroot - wfetch 'https://github.com/leleliu008/test/releases/download/2023.10.08/glibc-2.40-linux-glibc-x86_64.tar.xz' --no-buffer - run $TAR xf glibc-2.40-linux-glibc-x86_64.tar.xz -C sysroot --strip-components=1 + wfetch 'https://github.com/leleliu008/test/releases/download/2023.10.08/glibc-2.40-linux-glibc@2.27-x86_64.tar.xz' --no-buffer + run $TAR xf glibc-2.40-linux-glibc@2.27-x86_64.tar.xz -C sysroot --strip-components=1 wfetch 'https://github.com/leleliu008/test/releases/download/2023.10.08/linux-headers-6.8-linux-x86_64.tar.xz' --no-buffer run $TAR xf linux-headers-6.8-linux-x86_64.tar.xz -C sysroot --strip-components=1 - ln -s gcc/x86_64-pc-linux-gnu/13.1.0/libgcc.a lib/libgcc.a + ln -s gcc/x86_64-pc-linux-gnu/13.1.0/libgcc.a gcc/lib/libgcc.a - "$UPPM_HOME/installed/gsed/bin/gsed" -i "s|/home/leleliu008/.ppkg/installed/linux-glibc-x86_64/bebfceb3d2ea2461fde461b6c32a3e3cafc29d18ecec16e136e32b175caab53d|$NDKPKG_HOME/core/sysroot|g" sysroot/lib/libc.so sysroot/lib/libm.a sysroot/lib/libm.so + "$UPPM_HOME/installed/gsed/bin/gsed" -i "s|/root/.ppkg/installed/linux-glibc-x86_64/97f07af98431513742c8e4c89c21cecd470e8e59062419ed285d4207a5d51082|$NDKPKG_HOME/core/sysroot|g" sysroot/lib/libc.so sysroot/lib/libm.a sysroot/lib/libm.so - mv bin/gcc bin/gcc.exe - mv bin/g++ bin/g++.exe + mv gcc/bin/gcc gcc/bin/gcc.exe + mv gcc/bin/g++ gcc/bin/g++.exe - cat > bin/gcc < gcc/bin/gcc < bin/g++ < gcc/bin/g++ < gcc.specs <