一些编译脚本
编译zlib
export CC=aarch64-linux-musl-gcc
export CROSS_PREFIX=aarch64-none-linux-gnu-
export CFLAGS="-Wall -g"
./configure \
--prefix=$(pwd)/zlib_arm
编译ffi
./configure \
--prefix=$(pwd)/ffi_arm \
--build=x86_64-pc-linux-gnu \
--host=aarch64-none-linux-gnu \
--target=aarch64-none-linux-gnu \
CC=aarch64-linux-musl-gcc \
CXX=aarch64-linux-musl-g++ \
RANLIB=aarch64-linux-musl-ranlib \
STRIP=aarch64-linux-musl-strip \
AR=aarch64-linux-musl-ar \
CFLAGS="-Wall -g" \
CPPFLAGS="-Wall -g"
编译ptyhon
(手动关闭了两个模块: py_cv_module__lzma='n/a' py_cv_module__uuid='n/a')
./configure --prefix=/vendor --host=aarch64-none-linux-gnu --build=x86_64-pc-linux-gnu --disable-ipv6 CC=aarch64-linux-musl-gcc CXX=aarch64-linux-musl-g++ RANLIB=aarch64-linux-musl-ranlib STRIP=aarch64-linux-musl-strip AR=aarch64-linux-musl-ar LDFLAGS="-L/home/ltong/src/zlib-1.3.1/zlib_arm/lib -L/home/ltong/src/libffi/ffi_arm/lib/" LIBS="-lz -lffi" CFLAGS="-Wall -g \
-I/home/ltong/src/zlib-1.3.1/zlib_arm/include -I/home/ltong/src/libffi/ffi_arm/include" CPPFLAGS="-Wall -g \
-I/home/ltong/src/zlib-1.3.1/zlib_arm/include -I/home/ltong/src/libffi/ffi_arm/include" ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no py_cv_module__lzma='n/a' py_cv_module__uuid='n/a' ac_cv_func_pwritev2=no ac_cv_func_preadv2=no --with-build-python=/home/ltong/src/py313/Python-3.13.1/build_pc/bin/python3
编译go
:~$ history |grep export
1069 export GO_GCFLAGS="-Wno-size-array-div"
1070 export GO_CCFLAGS="-Wno-size-array-div"
1073 export GOOS=linux
1075 export GOARCH=arm
1084 export GO_CCFLAGS="-Wno-sizeof-array-div"
1086 export GO_CCFLAGS="-Wno-sizeof-array-div"
1110 export $GOARCH=X86
1197 export PATH=$PATH:~/radxa2/go/bin
1198 export GOROOT=/home/ltong/radxa2/go
1199 export GOOS=linux
1200 export GOARCH=arm64
1201 export GOROOT_BOOTSTRAP=/home/ltong/radxa2/go
1269 history |grep export
1313 export CC=aarch64-none-elf-gcc-14.2.1
1314 export CROSS_PREFIX=aarch64-none-elf-
1216 git checkout -bgo1.21.9 go1.21.9
1217 git status
1218 git pull
1219 git log
1220 CC=musl-gcc ./make.bash
1221 ls /home/ltong/radxa2/go2/src/cmd/dist
1222 git status
1223 git clean -fdx
1224 git reset --hard
1225 CC=musl-gcc ./make.bash
1226 git checkout -bgo1.16 go1.16
1227 CC=musl-gcc ./make.bash
1228 git checkout -bgo1.17.13 go1.17.13
1229 CC=musl-gcc ./make.bash
1230 echo $GOARCH
1231 ldd ../bin/linux_arm64/go
1232 file ../bin/linux_arm64/go
1233 ll ../bin/linux_arm64/go
1234 ll ../bin/linux_arm64/go -h