[FIX] gcc: 32-bit paths hidden in brace expansions; more host libraries

Two more shapes of the same multilib assumption, and the second is a
trap worth naming.

Some _pick lines write the 32-bit path in full:

  mv: cannot stat 'usr/lib/gcc/s390x-ibm-linux-gnu/16/32/finclude/'

Others write BOTH paths in one line with a brace expansion --
$_libdir/{,32/}finclude/ expands to the normal path and the 32-bit one.
Deleting such a line would silently lose the path that DOES exist, so
only the alternative is removed: {,32/} and {,32} become nothing.

That distinction matters. A blanket "delete every line mentioning 32"
would have dropped gcc-fortran's finclude, libcaf and libgfortran.spec
from the package, and the loss would only have surfaced later, in
something that failed to link.

Host libraries again: libcryptsetup for util-linux, libgcrypt, libksba
and npth for gnupg, libpam for shadow.

--- FR ---

Deux formes de plus de la meme hypothese multilib, et la seconde est un
piege qui merite d etre nomme.

Certaines lignes _pick ecrivent le chemin 32 bits en entier :

  mv: cannot stat 'usr/lib/gcc/s390x-ibm-linux-gnu/16/32/finclude/'

D autres ecrivent les DEUX chemins d un coup par expansion d accolades
-- $_libdir/{,32/}finclude/ produit le chemin normal et celui en 32
bits. Supprimer une telle ligne perdrait en silence le chemin qui
EXISTE, donc seule l alternative disparait : {,32/} et {,32} deviennent
rien.

La distinction compte. Un « supprimer toute ligne mentionnant 32 »
aurait retire finclude, libcaf et libgfortran.spec du paquet
gcc-fortran, et la perte ne serait apparue que plus tard, dans quelque
chose qui refuse de se lier.

Bibliotheques d hote, encore : libcryptsetup pour util-linux, libgcrypt,
libksba et npth pour gnupg, libpam pour shadow.

Assisted-by: Claude Opus 5
This commit is contained in:
Mathieu Benoit 2026-08-16 05:19:20 -04:00
parent fd18e61dd9
commit a67bd94f8b

View file

@ -86,6 +86,17 @@ sed -i '/lib32-gcc-libs: for generating code/d' PKGBUILD
# usr/lib32 line right after it, in the same loop. Reading the error alone # usr/lib32 line right after it, in the same loop. Reading the error alone
# sends you hunting for a missing libatomic that is in fact present. # sends you hunting for a missing libatomic that is in fact present.
sed -i '/usr\/lib32/d; /_libdir\/32/d' PKGBUILD sed -i '/usr\/lib32/d; /_libdir\/32/d' PKGBUILD
# Some 32-bit paths are written out in full rather than through
# $_libdir/32, so the pattern above misses them:
# mv: cannot stat 'usr/lib/gcc/s390x-ibm-linux-gnu/16/32/finclude/'
sed -i '/_pick .*\/32\//d' PKGBUILD
# Others write BOTH paths with a brace expansion -- $_libdir/{,32/}finclude/
# expands to the normal and the 32-bit path in one go. Deleting the line
# would lose the normal path too, so only the 32-bit alternative goes.
sed -i 's|{,32/}||g; s|{,32}||g' PKGBUILD
if grep -qE '_pick .*(\{,32|/32/)' PKGBUILD; then
echo "gcc: a 32-bit _pick path remains" >&2; exit 1
fi
# The same loop links the D runtimes, which do not exist now that the D # The same loop links the D runtimes, which do not exist now that the D
# front end is off. # front end is off.