Etapa G: gmp diferido con diagnóstico (configure probe falla link bajo gcc15)

Primera lib C del track base. El probe de configure de gmp no linkea su conftest
(undefined reference to main) bajo gcc 15.2/C23 + el sandbox; el patch Alpine no
alcanza. Track de libs base confirma ser el trabajo no-trivial (no cores).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-24 08:30:46 -04:00
co-authored by Claude Opus 4.8
parent d0ad93c7c5
commit 4617c4173a
2 changed files with 61 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
# HG changeset patch
# User Marc Glisse <marc.glisse@inria.fr>
# Date 1738186682 -3600
# Node ID 8e7bb4ae7a18b1405ea7f9cbcda450b7d920a901
# Parent e84c5c785bbe8ed8c3620194e50b65adfc2f5d83
Complete function prototype in acinclude.m4 for C23 compatibility
diff -r e84c5c785bbe -r 8e7bb4ae7a18 acinclude.m4
--- a/acinclude.m4 Wed Dec 04 18:26:27 2024 +0100
+++ b/acinclude.m4 Wed Jan 29 22:38:02 2025 +0100
@@ -609,7 +609,7 @@
#if defined (__GNUC__) && ! defined (__cplusplus)
typedef unsigned long long t1;typedef t1*t2;
-void g(){}
+void g(int,t1 const*,t1,t2,t1 const*,int){}
void h(){}
static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
+40
View File
@@ -0,0 +1,40 @@
# gmp 6.3.0 — biblioteca de aritmética de precisión múltiple (C). Lib FUNDACIONAL: destraba
# calculadoras (kalker, qalc) y la cola C que depende de -lgmp. De-Alpinizada (Etapa G):
# - compiler=gcc: gmp tiene ensamblador + detección de CPU; zig-cc miscompila libs C (patrón file/jq).
# - sin --enable-cxx: el frente C++ (libgmpxx) bajo zig c++ choca; los consumidores piden libgmp (C).
# - --disable-shared --enable-static: el lab linkea estático; queremos libgmp.a en /usr/lib.
# - gcc15.patch (Alpine): completa un prototipo en acinclude.m4 para compat C23.
name = "gmp"
version = "6.3.0"
[source]
tarball = "https://ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz"
sha256 = "a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898"
patches = ["gcc15.patch"]
[build]
compiler = "gcc"
target = "x86_64-linux-musl"
link = "static"
flags = []
[build.phases]
# autoreconf regenera configure desde el acinclude.m4 ya parcheado (gcc15/C23); sin esto el
# configure pre-generado del tarball falla el "long long reliability test" con gcc 15. Los
# autotools (autoconf/automake/libtool/m4) viven en el rootfs (bootstrap-devfs), no como deps.
compile = '''
./configure CC="gcc -std=gnu17" \
--build=$CBUILD --host=$CHOST \
--prefix=/usr \
--disable-shared --enable-static \
--with-pic
make
'''
install = 'make DESTDIR=/out install'
# DEFERIDO (2026-06-24): el probe GMP_PROG_CC_WORKS de configure falla al LINKEAR su conftest
# con gcc 15.2/musl del rootfs: "crt1.c: undefined reference to main" (el conftest no expone main
# válido bajo C23). El gcc15.patch de Alpine (acinclude.m4) no alcanza en este sandbox; el lab
# además corre su propio ./configure (heurística autotools §G-Fase3) que no toma el CC= del phase.
# Ángulos a probar: (1) CFLAGS=-std=gnu17 vía env del lab (no como arg), (2) más hunks del patch
# de Alpine sobre configure (no solo acinclude.m4), (3) build dedicado en el VPS con su gcc15.