改用 musl 全静态构建,零依赖跨发行版
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -50,6 +50,13 @@ find tests -type f -name "*.cpp" -exec sed -i 's/"Monero '"'"'/"Mond '"'"'/g' {}
|
||||
# Uncomment the following lines if you want to remove Monero Project copyright
|
||||
# find . -type f \( -name "*.cpp" -o -name "*.h" \) -exec sed -i '/Copyright.*The Monero Project/d' {} \;
|
||||
|
||||
# 8. musl fully-static patch(配合 docker/Dockerfile,产出无 interpreter、零外部依赖的 static-pie)
|
||||
# monero 官方"不支持 fully static":STATIC=ON 在 Linux 仅给 -static-libgcc/-static-libstdc++,且强制 -pie。
|
||||
# 去掉 -pie(否则强制动态 PIE/带 musl interpreter,无法跨发行版)
|
||||
sed -i 's|add_linker_flag_if_supported("-pie" LD_SECURITY_FLAGS)|# -pie removed for fully-static|' CMakeLists.txt
|
||||
# Linux STATIC_FLAGS 从 -static-libgcc/-static-libstdc++ 改真 -static
|
||||
sed -i 's|set(STATIC_FLAGS "-static-libgcc -static-libstdc++")|set(STATIC_FLAGS "-static")|' CMakeLists.txt
|
||||
|
||||
echo "Project successfully modified from Monero to Mond!"
|
||||
echo "Binary output name: mond"
|
||||
echo "Project name: mond"
|
||||
|
||||
Reference in New Issue
Block a user