mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-23 22:06:12 +03:00
Fix static build to disable partition alloc
This commit is contained in:
parent
8a6e0217a1
commit
def98703a8
58
.github/workflows/build.yml
vendored
58
.github/workflows/build.yml
vendored
@ -10,7 +10,7 @@ defaults:
|
|||||||
shell: bash
|
shell: bash
|
||||||
working-directory: src
|
working-directory: src
|
||||||
env:
|
env:
|
||||||
CACHE_EPOCH: 1
|
CACHE_EPOCH: 4
|
||||||
CCACHE_MAXSIZE: 200M
|
CCACHE_MAXSIZE: 200M
|
||||||
CCACHE_MAXFILES: 0
|
CCACHE_MAXFILES: 0
|
||||||
SCCACHE_CACHE_SIZE: 200M
|
SCCACHE_CACHE_SIZE: 200M
|
||||||
@ -386,7 +386,7 @@ jobs:
|
|||||||
openwrt: "target=x86 subtarget=64"
|
openwrt: "target=x86 subtarget=64"
|
||||||
target_cpu: x64
|
target_cpu: x64
|
||||||
- arch: x86
|
- arch: x86
|
||||||
openwrt: "target=x86 subtarget=generic"
|
openwrt: "target=x86 subtarget=geode"
|
||||||
target_cpu: x86
|
target_cpu: x86
|
||||||
- arch: aarch64_cortex-a53
|
- arch: aarch64_cortex-a53
|
||||||
openwrt: "target=sunxi subtarget=cortexa53"
|
openwrt: "target=sunxi subtarget=cortexa53"
|
||||||
@ -395,7 +395,9 @@ jobs:
|
|||||||
- arch: aarch64_cortex-a53-static
|
- arch: aarch64_cortex-a53-static
|
||||||
openwrt: "target=sunxi subtarget=cortexa53"
|
openwrt: "target=sunxi subtarget=cortexa53"
|
||||||
target_cpu: arm64
|
target_cpu: arm64
|
||||||
extra: 'arm_cpu="cortex-a53" build_static=true no_madvise_syscall=true'
|
extra: 'arm_cpu="cortex-a53" build_static=true use_allocator_shim=false use_partition_alloc=false'
|
||||||
|
openwrt_release: '23.05.0'
|
||||||
|
openwrt_gcc_ver: '12.3.0'
|
||||||
- arch: aarch64_cortex-a72
|
- arch: aarch64_cortex-a72
|
||||||
openwrt: "target=mvebu subtarget=cortexa72"
|
openwrt: "target=mvebu subtarget=cortexa72"
|
||||||
target_cpu: arm64
|
target_cpu: arm64
|
||||||
@ -403,16 +405,20 @@ jobs:
|
|||||||
- arch: aarch64_cortex-a72-static
|
- arch: aarch64_cortex-a72-static
|
||||||
openwrt: "target=mvebu subtarget=cortexa72"
|
openwrt: "target=mvebu subtarget=cortexa72"
|
||||||
target_cpu: arm64
|
target_cpu: arm64
|
||||||
extra: 'arm_cpu="cortex-a72" build_static=true no_madvise_syscall=true'
|
extra: 'arm_cpu="cortex-a72" build_static=true use_allocator_shim=false use_partition_alloc=false'
|
||||||
|
openwrt_release: '23.05.0'
|
||||||
|
openwrt_gcc_ver: '12.3.0'
|
||||||
- arch: aarch64_generic
|
- arch: aarch64_generic
|
||||||
openwrt: "target=rockchip subtarget=armv8"
|
openwrt: "target=layerscape subtarget=armv8_64b"
|
||||||
target_cpu: arm64
|
target_cpu: arm64
|
||||||
- arch: aarch64_generic-static
|
- arch: aarch64_generic-static
|
||||||
openwrt: "target=rockchip subtarget=armv8"
|
openwrt: "target=layerscape subtarget=armv8_64b"
|
||||||
target_cpu: arm64
|
target_cpu: arm64
|
||||||
extra: "build_static=true no_madvise_syscall=true"
|
extra: "build_static=true use_allocator_shim=false use_partition_alloc=false"
|
||||||
|
openwrt_release: '23.05.0'
|
||||||
|
openwrt_gcc_ver: '12.3.0'
|
||||||
- arch: arm_arm1176jzf-s_vfp
|
- arch: arm_arm1176jzf-s_vfp
|
||||||
openwrt: "target=bcm27xx subtarget=bcm2708"
|
openwrt: "target=brcm2708 subtarget=bcm2708"
|
||||||
target_cpu: arm
|
target_cpu: arm
|
||||||
extra: 'arm_version=0 arm_cpu="arm1176jzf-s" arm_fpu="vfp" arm_float_abi="hard" arm_use_neon=false arm_use_thumb=false'
|
extra: 'arm_version=0 arm_cpu="arm1176jzf-s" arm_fpu="vfp" arm_float_abi="hard" arm_use_neon=false arm_use_thumb=false'
|
||||||
- arch: arm_arm926ej-s
|
- arch: arm_arm926ej-s
|
||||||
@ -420,29 +426,35 @@ jobs:
|
|||||||
target_cpu: arm
|
target_cpu: arm
|
||||||
extra: 'arm_version=0 arm_cpu="arm926ej-s" arm_float_abi="soft" arm_use_neon=false arm_use_thumb=false'
|
extra: 'arm_version=0 arm_cpu="arm926ej-s" arm_float_abi="soft" arm_use_neon=false arm_use_thumb=false'
|
||||||
- arch: arm_cortex-a15_neon-vfpv4
|
- arch: arm_cortex-a15_neon-vfpv4
|
||||||
openwrt: "target=armsr subtarget=armv7"
|
openwrt: "target=ipq806x subtarget=generic"
|
||||||
target_cpu: arm
|
target_cpu: arm
|
||||||
extra: 'arm_version=0 arm_cpu="cortex-a15" arm_fpu="neon-vfpv4" arm_float_abi="hard" arm_use_neon=true'
|
extra: 'arm_version=0 arm_cpu="cortex-a15" arm_fpu="neon-vfpv4" arm_float_abi="hard" arm_use_neon=true'
|
||||||
- arch: arm_cortex-a5_vfpv4
|
- arch: arm_cortex-a5_vfpv4
|
||||||
openwrt: "target=at91 subtarget=sama5"
|
openwrt: "target=at91 subtarget=sama5d3"
|
||||||
target_cpu: arm
|
target_cpu: arm
|
||||||
extra: 'arm_version=0 arm_cpu="cortex-a5" arm_fpu="vfpv4" arm_float_abi="hard" arm_use_neon=false'
|
extra: 'arm_version=0 arm_cpu="cortex-a5" arm_fpu="vfpv4" arm_float_abi="hard" arm_use_neon=false'
|
||||||
- arch: arm_cortex-a7
|
- arch: arm_cortex-a7
|
||||||
openwrt: "target=mediatek subtarget=mt7629"
|
openwrt: "target=mediatek subtarget=mt7629"
|
||||||
target_cpu: arm
|
target_cpu: arm
|
||||||
extra: 'arm_version=0 arm_cpu="cortex-a7" arm_float_abi="soft" arm_use_neon=false'
|
extra: 'arm_version=0 arm_cpu="cortex-a7" arm_float_abi="soft" arm_use_neon=false'
|
||||||
|
openwrt_release: '21.02.0'
|
||||||
|
openwrt_gcc_ver: '8.4.0'
|
||||||
- arch: arm_cortex-a7_neon-vfpv4
|
- arch: arm_cortex-a7_neon-vfpv4
|
||||||
openwrt: "target=sunxi subtarget=cortexa7"
|
openwrt: "target=sunxi subtarget=cortexa7"
|
||||||
target_cpu: arm
|
target_cpu: arm
|
||||||
extra: 'arm_version=0 arm_cpu="cortex-a7" arm_fpu="neon-vfpv4" arm_float_abi="hard" arm_use_neon=true'
|
extra: 'arm_version=0 arm_cpu="cortex-a7" arm_fpu="neon-vfpv4" arm_float_abi="hard" arm_use_neon=true'
|
||||||
|
- arch: arm_cortex-a7_neon-vfpv4-static
|
||||||
|
openwrt: "target=sunxi subtarget=cortexa7"
|
||||||
|
target_cpu: arm
|
||||||
|
extra: 'arm_version=0 arm_cpu="cortex-a7" arm_fpu="neon-vfpv4" arm_float_abi="hard" arm_use_neon=true build_static=true use_allocator_shim=false use_partition_alloc=false'
|
||||||
|
openwrt_release: '23.05.0'
|
||||||
|
openwrt_gcc_ver: '12.3.0'
|
||||||
- arch: arm_cortex-a7_vfpv4
|
- arch: arm_cortex-a7_vfpv4
|
||||||
openwrt: "target=at91 subtarget=sama7"
|
openwrt: "target=at91 subtarget=sama7"
|
||||||
target_cpu: arm
|
target_cpu: arm
|
||||||
extra: 'arm_version=0 arm_cpu="cortex-a7" arm_fpu="vfpv4" arm_float_abi="hard" arm_use_neon=false'
|
extra: 'arm_version=0 arm_cpu="cortex-a7" arm_fpu="vfpv4" arm_float_abi="hard" arm_use_neon=false'
|
||||||
- arch: arm_cortex-a7_neon-vfpv4-static
|
openwrt_release: '22.03.0'
|
||||||
openwrt: "target=sunxi subtarget=cortexa7"
|
openwrt_gcc_ver: '11.2.0'
|
||||||
target_cpu: arm
|
|
||||||
extra: 'arm_version=0 arm_cpu="cortex-a7" arm_fpu="neon-vfpv4" arm_float_abi="hard" arm_use_neon=true build_static=true no_madvise_syscall=true'
|
|
||||||
- arch: arm_cortex-a8_vfpv3
|
- arch: arm_cortex-a8_vfpv3
|
||||||
openwrt: "target=sunxi subtarget=cortexa8"
|
openwrt: "target=sunxi subtarget=cortexa8"
|
||||||
target_cpu: arm
|
target_cpu: arm
|
||||||
@ -454,13 +466,15 @@ jobs:
|
|||||||
- arch: arm_cortex-a9-static
|
- arch: arm_cortex-a9-static
|
||||||
openwrt: "target=bcm53xx subtarget=generic"
|
openwrt: "target=bcm53xx subtarget=generic"
|
||||||
target_cpu: arm
|
target_cpu: arm
|
||||||
extra: 'arm_version=0 arm_cpu="cortex-a9" arm_float_abi="soft" arm_use_neon=false build_static=true no_madvise_syscall=true'
|
extra: 'arm_version=0 arm_cpu="cortex-a9" arm_float_abi="soft" arm_use_neon=false build_static=true use_allocator_shim=false use_partition_alloc=false'
|
||||||
|
openwrt_release: '23.05.0'
|
||||||
|
openwrt_gcc_ver: '12.3.0'
|
||||||
- arch: arm_cortex-a9_neon
|
- arch: arm_cortex-a9_neon
|
||||||
openwrt: "target=zynq subtarget=generic"
|
openwrt: "target=imx6 subtarget=generic"
|
||||||
target_cpu: arm
|
target_cpu: arm
|
||||||
extra: 'arm_version=0 arm_cpu="cortex-a9" arm_fpu="neon" arm_float_abi="hard" arm_use_neon=true'
|
extra: 'arm_version=0 arm_cpu="cortex-a9" arm_fpu="neon" arm_float_abi="hard" arm_use_neon=true'
|
||||||
- arch: arm_cortex-a9_vfpv3-d16
|
- arch: arm_cortex-a9_vfpv3-d16
|
||||||
openwrt: "target=tegra subtarget=generic"
|
openwrt: "target=mvebu subtarget=cortexa9"
|
||||||
target_cpu: arm
|
target_cpu: arm
|
||||||
extra: 'arm_version=0 arm_cpu="cortex-a9" arm_fpu="vfpv3-d16" arm_float_abi="hard" arm_use_neon=false'
|
extra: 'arm_version=0 arm_cpu="cortex-a9" arm_fpu="vfpv3-d16" arm_float_abi="hard" arm_use_neon=false'
|
||||||
- arch: arm_mpcore
|
- arch: arm_mpcore
|
||||||
@ -478,17 +492,21 @@ jobs:
|
|||||||
- arch: mipsel_24kc-static
|
- arch: mipsel_24kc-static
|
||||||
openwrt: "target=ramips subtarget=rt305x"
|
openwrt: "target=ramips subtarget=rt305x"
|
||||||
target_cpu: mipsel
|
target_cpu: mipsel
|
||||||
extra: 'mips_arch_variant="r2" mips_float_abi="soft" build_static=true no_madvise_syscall=true'
|
extra: 'mips_arch_variant="r2" mips_float_abi="soft" build_static=true use_allocator_shim=false use_partition_alloc=false'
|
||||||
|
openwrt_release: '23.05.0'
|
||||||
|
openwrt_gcc_ver: '12.3.0'
|
||||||
- arch: mipsel_mips32
|
- arch: mipsel_mips32
|
||||||
openwrt: "target=bcm47xx subtarget=generic"
|
openwrt: "target=brcm47xx subtarget=legacy"
|
||||||
target_cpu: mipsel
|
target_cpu: mipsel
|
||||||
extra: 'mips_arch_variant="r1" mips_float_abi="soft"'
|
extra: 'mips_arch_variant="r1" mips_float_abi="soft"'
|
||||||
- arch: riscv64
|
- arch: riscv64
|
||||||
openwrt: "target=sifiveu subtarget=generic"
|
openwrt: "target=sifiveu subtarget=generic"
|
||||||
target_cpu: riscv64
|
target_cpu: riscv64
|
||||||
|
openwrt_release: '23.05.0'
|
||||||
|
openwrt_gcc_ver: '12.3.0'
|
||||||
env:
|
env:
|
||||||
EXTRA_FLAGS: target_cpu="${{ matrix.target_cpu }}" target_os="openwrt" ${{ matrix.extra }}
|
EXTRA_FLAGS: target_cpu="${{ matrix.target_cpu }}" target_os="openwrt" ${{ matrix.extra }}
|
||||||
OPENWRT_FLAGS: arch=${{ matrix.arch }} release=23.05.0 gcc_ver=12.3.0 ${{ matrix.openwrt }}
|
OPENWRT_FLAGS: arch=${{ matrix.arch }} release=${{ matrix.openwrt_release || '18.06.0' }} gcc_ver=${{ matrix.openwrt_gcc_ver || '7.3.0' }} ${{ matrix.openwrt }}
|
||||||
BUNDLE: naiveproxy-${{ github.event.release.tag_name }}-${{ github.job }}-${{ matrix.arch }}
|
BUNDLE: naiveproxy-${{ github.event.release.tag_name }}-${{ github.job }}-${{ matrix.arch }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -15,17 +15,33 @@ arm_*) abi=musl_eabi;;
|
|||||||
*) abi=musl;;
|
*) abi=musl;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ "$subtarget" ]; then
|
major=${release%%.*}
|
||||||
SDK_PATH=openwrt-toolchain-$release-$target-${subtarget}_gcc-${gcc_ver}_${abi}.Linux-x86_64
|
if [ "$major" -ge 22 ]; then
|
||||||
|
path_suffix=toolchain
|
||||||
else
|
else
|
||||||
subtarget='generic'
|
path_suffix=sdk
|
||||||
SDK_PATH=openwrt-toolchain-$release-${target}_gcc-${gcc_ver}_${abi}.Linux-x86_64
|
fi
|
||||||
|
|
||||||
|
if [ ! "$subtarget" ]; then
|
||||||
|
subtarget=generic
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$subtarget" != generic -o "$major" -ge 22 ]; then
|
||||||
|
SDK_PATH=openwrt-$path_suffix-$release-$target-${subtarget}_gcc-${gcc_ver}_${abi}.Linux-x86_64
|
||||||
|
else
|
||||||
|
SDK_PATH=openwrt-$path_suffix-$release-${target}_gcc-${gcc_ver}_${abi}.Linux-x86_64
|
||||||
fi
|
fi
|
||||||
SDK_URL=https://downloads.openwrt.org/releases/$release/targets/$target/$subtarget/$SDK_PATH.tar.xz
|
SDK_URL=https://downloads.openwrt.org/releases/$release/targets/$target/$subtarget/$SDK_PATH.tar.xz
|
||||||
rm -rf $SDK_PATH
|
rm -rf $SDK_PATH
|
||||||
curl $SDK_URL | tar xJf -
|
curl $SDK_URL | tar xJf -
|
||||||
cd $SDK_PATH
|
|
||||||
full_root=toolchain-*_gcc-${gcc_ver}_${abi}
|
full_root=toolchain-*_gcc-${gcc_ver}_${abi}
|
||||||
|
|
||||||
|
if [ "$major" -lt 22 ]; then
|
||||||
|
mv $SDK_PATH/staging_dir/$full_root $SDK_PATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $SDK_PATH
|
||||||
cat >include.txt <<EOF
|
cat >include.txt <<EOF
|
||||||
./include
|
./include
|
||||||
./lib/*.o
|
./lib/*.o
|
||||||
|
Loading…
Reference in New Issue
Block a user