kde/Plasma: gmp+mpfr a zig-cc (gueto-gcc falla link test libgcc/ssp wrong-format); gmp --disable-assembly

This commit is contained in:
2026-07-13 16:31:02 -04:00
parent e48aa76ee2
commit de169e89ec
2 changed files with 14 additions and 13 deletions
+11 -11
View File
@@ -2,12 +2,11 @@
# Campaña KDE (ADR 0011): sustrato de libqalculate (motor matemático de KCalc/KRunner), que exige el
# interfaz C++ gmpxx.h además del C. También base de mpfr (#2 de esta tanda).
#
# compiler=gcc: GMP trae ensamblador x86_64 a mano (mpn/x86_64) muy afinado; zig-cc tropieza con esos
# .asm. gcc nativo los consume igual que Alpine (gmp-dev). link=dynamic (libtool descarta -static igual).
#
# --enable-cxx: construye libgmpxx.so (interfaz C++). libqalculate hace #include <gmpxx.h> y linkea
# -lgmpxx, así que SIN esto el consumidor re-bloquea. gcc compila el C++ de gmp sin problema.
# La descarga es del mirror GNU (ftp.gnu.org): gmplib.org rechaza curl/hammer-fetch (cuelga en TLS).
# compiler=zig-cc + --disable-assembly: GMP trae asm x86_64 a mano, pero el gueto-gcc del sandbox falla el
# test de configure ("cannot find -lssp_nonshared/-lgcc: file in wrong format" — libgcc/ssp del gcc de
# Alpine en formato incorrecto para el link musl). zig cc compila musl limpio; con --disable-assembly usa
# el mpn en C genérico (más lento, irrelevante para un build-dep de libqalculate). --enable-cxx = libgmpxx.so
# (gmpxx.h que libqalculate exige). La descarga es del mirror GNU (gmplib.org cuelga en TLS con hammer-fetch).
name = "gmp"
version = "6.3.0"
@@ -16,13 +15,14 @@ tarball = "https://ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz"
sha256 = "a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898"
[build]
compiler = "gcc"
target = "x86_64-linux-musl"
link = "dynamic"
flags = []
compiler = "zig-cc"
target = "x86_64-linux-musl"
link = "dynamic"
zig_version = "0.13.0"
flags = []
[build.phases]
configure = './configure --build=$CBUILD --host=$CHOST --prefix=/usr --disable-static --enable-shared --enable-cxx'
configure = './configure --build=$CBUILD --host=$CHOST --prefix=/usr --disable-static --enable-shared --enable-cxx --disable-assembly'
compile = 'make -j"$(nproc)"'
install = "make install DESTDIR=/out && find /out -name '*.la' -delete"
+3 -2
View File
@@ -1,7 +1,7 @@
# GNU MPFR 4.2.2 — floats de precisión arbitraria con redondeo correcto (libmpfr.so), sobre GMP.
# Campaña KDE (ADR 0011): sustrato de libqalculate (motor matemático). Depende de gmp (#1 de esta tanda).
#
# compiler=gcc: MPFR se apoya en el asm de GMP y en modos de coma flotante que zig-cc traduce mal; gcc
# compiler=zig-cc: el gueto-gcc del sandbox falla el link test (libgcc/ssp "wrong format"); zig cc compila
# nativo lo construye idéntico a Alpine (mpfr-dev). link=dynamic (libtool descarta -static).
#
# --with-gmp=/usr: apunta al GMP sellado (headers en /usr/include, libgmp.so en /usr/lib). El flag exacto
@@ -15,7 +15,8 @@ tarball = "https://ftp.gnu.org/gnu/mpfr/mpfr-4.2.2.tar.xz"
sha256 = "b67ba0383ef7e8a8563734e2e889ef5ec3c3b898a01d00fa0a6869ad81c6ce01"
[build]
compiler = "gcc"
compiler = "zig-cc"
zig_version = "0.13.0"
target = "x86_64-linux-musl"
link = "dynamic"
flags = []