Aislado: NO es curl/regex/-pie/libs externas (gcc -static -no-pie -lpcre2-8 -lz linkea OK). El muro es libgit.a (objetos propios de git) con relocación incompatible con -static -no-pie. Pase dedicado: V=1 + readelf -r del .o ofensor, o -static-pie. Se puede; es iteración cara.
40 lines
1.9 KiB
TOML
40 lines
1.9 KiB
TOML
# git 2.54.0 — VCS (C, Makefile con knobs, NO autotools). LEAN estático: core sin gui/docs/perl/i18n.
|
|
# Libs del corpus: zlib + curl (https) + openssl (crypto) + expat (http-push) + pcre2 (grep -P).
|
|
# De-Alpinizada: gcc, -static -no-pie (zlib non-PIC). NO_PERL/PYTHON/TCLTK/GETTEXT = lean.
|
|
name = "git"
|
|
version = "2.54.0"
|
|
[source]
|
|
tarball = "https://www.kernel.org/pub/software/scm/git/git-2.54.0.tar.xz"
|
|
sha256 = "f689162364c10de79ef89aa8dbf48731eb057e34edbbd20aca510ce0154681a3"
|
|
[build]
|
|
compiler = "gcc"
|
|
target = "x86_64-linux-musl"
|
|
link = "static"
|
|
flags = []
|
|
[build.phases]
|
|
compile = '''
|
|
sed -i '/^PROGRAM_OBJS += daemon.o/d' Makefile
|
|
make -j"$(nproc)" prefix=/usr CC=gcc \
|
|
NO_GETTEXT=1 NO_TCLTK=1 NO_PYTHON=1 NO_PERL=1 NO_GITWEB=1 NO_SYS_POLL_H=1 NO_REGEX=NeedsStartEnd NO_CURL=1 NO_EXPAT=1 \
|
|
USE_LIBPCRE2=1 \
|
|
CFLAGS="-O2 -fno-pie" \
|
|
LDFLAGS="-static -no-pie -Wl,-z,norelro -L/usr/lib" \
|
|
all
|
|
'''
|
|
install = '''
|
|
make prefix=/usr DESTDIR=/out NO_GETTEXT=1 NO_TCLTK=1 NO_PYTHON=1 NO_PERL=1 NO_GITWEB=1 \
|
|
NO_CURL=1 NO_REGEX=NeedsStartEnd NO_INSTALL_HARDLINKS=1 install
|
|
'''
|
|
[deps]
|
|
build = ["zlib", "openssl", "pcre2"]
|
|
|
|
|
|
# DEFERIDO EN SERIO (2026-06-26): git COMPILA entero. Muro = link -static de los binarios que usan
|
|
# libgit.a (git-http-backend/daemon/git-%): `ld: failed to set dynamic section sizes: bad value`.
|
|
# DIAGNÓSTICO AFINADO: NO es curl/regex/-pie/-z relro NI las libs externas — `gcc -static -no-pie
|
|
# -lpcre2-8 -lz` linkea OK en aislamiento. El culpable es libgit.a (objetos PROPIOS de git): algún
|
|
# .o tiene una relocación que rompe -static -no-pie (sospecha: PIC mixto / IFUNC / TLS bajo gcc15+musl,
|
|
# pese a CFLAGS=-fno-pie). PRÓXIMO PASE DEDICADO: build con V=1, identificar el .o ofensor (readelf
|
|
# -r), y/o probar -static-pie en vez de -static -no-pie, y/o forzar -fno-pic en TODOS los objetos.
|
|
# SE PUEDE (muchas distros static-linkean git); es iteración cara, no imposible.
|