From 2fd738bf829975b04951a3010aa4a13cc6c65e53 Mon Sep 17 00:00:00 2001 From: Sergio Date: Fri, 4 Sep 2026 21:53:59 +0000 Subject: [PATCH] =?UTF-8?q?firefox:=20quitar=20--enable-linker=3Dlld=20?= =?UTF-8?q?=E2=80=94=20el=20sondeo=20de=20Mozilla=20no=20reconoce=20a=20zi?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Primer intento de build: configure murió con «Could not use lld as linker». NO era que faltara lld. toolchain.configure sondea con `$CC -fuse-ld=lld -Wl,--version` y clasifica por la SALIDA, buscando «mold», «GNU ld», «GNU gold» o «LLD». zig se identifica como `zig ld 0.16.0`, que no casa con ninguno ⇒ kind = "unknown". «unknown» por sí solo NO rompe: el código lo acepta explícitamente. Lo que rompe es PEDIR el linker por nombre, porque eso vuelve fatal cualquier fallo del sondeo: if linker: result = try_linker(linker) if result is None: die("Could not use %s as linker") Sin el flag, unas líneas más abajo Firefox prueba lld igual —c_compiler.type es clang y la versión 21.1.0 pasa el umbral de 15.0— y si el sondeo falla sigue a gold y al linker por defecto, que es exactamente el lld que zig trae adentro. Mismo linker, sin el die. Diagnóstico hecho leyendo toolchain.configure en el árbol del worker, no suponiendo: el comando sondeado devuelve rc=0 y sí imprime la versión cuando se corre a mano. --- recipes/firefox.toml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/recipes/firefox.toml b/recipes/firefox.toml index 300c83b0..4863b47d 100644 --- a/recipes/firefox.toml +++ b/recipes/firefox.toml @@ -48,7 +48,17 @@ # --disable-crashreporter manda telemetría a Mozilla; además pide breakpad. # --disable-updater la distro actualiza por hammer, no por un updater propio. # --disable-tests no entran al artefacto. -# --enable-linker=lld zig ES lld; pedir bfd/gold sería pedir algo que no hay. +# (SIN --enable-linker) Alpine pone `--enable-linker=lld` y acá NO se puede, aunque zig +# use lld por dentro. `toolchain.configure` sondea el linker con +# `$CC -fuse-ld=lld -Wl,--version` y clasifica por la SALIDA: busca +# «mold», «GNU ld», «GNU gold» o «LLD». zig se identifica como +# **`zig ld 0.16.0`**, que no casa con ninguno ⇒ `kind = "unknown"`. +# Eso solo no rompe (el código acepta «unknown»), pero **pedir el +# linker por nombre vuelve FATAL cualquier fallo del sondeo**: +# `if linker: … if result is None: die("Could not use lld as +# linker")`. Sin el flag, Firefox prueba lld igual unas líneas más +# abajo y, si el sondeo falla, sigue a gold y al linker por defecto +# — que es justamente el lld que zig trae. Mismo linker, sin el die. name = "firefox" version = "154.0" license = "MPL-2.0" @@ -105,7 +115,6 @@ ac_add_options --enable-application=browser ac_add_options --enable-default-toolkit=cairo-gtk3-wayland ac_add_options --enable-release ac_add_options --enable-optimize -ac_add_options --enable-linker=lld ac_add_options --enable-hardening ac_add_options --with-branding=browser/branding/unofficial ac_add_options --with-libclang-path=/usr/lib