archlinux-s390x/patches/pkgbuild/binutils.sh

203 lines
10 KiB
Bash
Raw Permalink Normal View History

[ADD] port patches: gcc front ends, binutils gold, libtool multilib Three more upstream PKGBUILDs assume x86_64, each in a different way, and each is dropped rather than repaired because the thing being dropped is architecture-specific by nature. gcc: Ada and D are written in themselves and need an existing compiler of the same language. Ubuntu ships gnat, but not one GCC 15 accepts, and there is no D bootstrap compiler here at all. Modula-2 and COBOL have the same shape. Front ends reduced to c, c++, fortran, lto, objc and obj-c++, which is everything this port and ERPLibre compile. binutils: gold is x86-centric, deprecated upstream since 2.44, and built by no distribution that ships s390x. ld.bfd is the linker on Z. binutils builds once gold is disabled -- measured. libtool: the lib32-libltdl split package is i686-on-x86_64 multilib. Its build step is already guarded by CARCH, but prepare() copies the tree to src/libtool32 unconditionally and the package function then packages a tree nobody built. Two host-layout bridges were also needed. Ubuntu multiarch puts asm/, bits/, gnu/ and sys/sdt.h under /usr/include/s390x-linux-gnu, while glibc builds with -nostdinc and expects the classic layout: fatal error: asm/errno.h: No such file or directory fatal error: sys/sdt.h: No such file or directory Symlinks make the host look like Arch for those paths. sys/ needed the files linked, not the directory, since /usr/include/sys already exists. --- FR --- Trois PKGBUILD amont de plus supposent x86_64, chacun a sa maniere, et chacun est retire plutot que repare : ce qu on retire est par nature propre a une architecture. gcc : Ada et D sont ecrits en eux-memes et reclament un compilateur existant du meme langage. Ubuntu livre gnat, mais pas une version que GCC 15 accepte, et il n y a ici aucun compilateur D d amorcage. Modula-2 et COBOL posent le meme probleme. Les frontaux se reduisent a c, c++, fortran, lto, objc et obj-c++, ce qui couvre tout ce que ce portage et ERPLibre compilent. binutils : gold est centre sur x86, abandonne en amont depuis 2.44, et construit par aucune distribution livrant s390x. Sur Z, l editeur de liens est ld.bfd. binutils se construit des que gold est desactive -- mesure. libtool : le paquet scinde lib32-libltdl est du multilib i686 sur x86_64. Son etape de compilation est deja gardee par CARCH, mais prepare() copie l arbre vers src/libtool32 sans condition, et la fonction de paquet empaquette ensuite un arbre que personne n a bati. Deux ponts de disposition d hote etaient aussi necessaires. Le multiarch d Ubuntu place asm/, bits/, gnu/ et sys/sdt.h sous /usr/include/s390x-linux-gnu, quand glibc compile avec -nostdinc et attend la disposition classique : fatal error: asm/errno.h: No such file or directory fatal error: sys/sdt.h: No such file or directory Des liens symboliques donnent a l hote l allure d Arch pour ces chemins. Pour sys/ il faut lier les fichiers et non le repertoire, puisque /usr/include/sys existe deja. Assisted-by: Claude Opus 5
2026-08-15 21:01:18 -04:00
#!/usr/bin/env bash
[FIX] one stray .a file broke every pkg-config lookup libxslt reported configure: error: Package requirements (python-3.14) were not met: Package 'python-3.14' not found with python 3.14.7 installed and /usr/lib/pkgconfig/python-3.14.pc present. The chain, none of whose links resembles the others: binutils installs libiberty.a into /usr/lib64, because s390x's default MULTILIB_OSDIRNAME is lib64, creating that path as a REAL directory. meson chooses its default libdir by inspecting the system, and 64-bit plus a real /usr/lib64 means lib64 -- a symlink does not count, which is why Arch never sees this and arch-meson passes no --libdir at all. pkgconf is a meson package, so it installed there and COMPILED IN /usr/lib64/pkgconfig as its search path. Every .pc in the distribution is in /usr/lib/pkgconfig. Fixed at all three levels: binutils pinned to --libdir=/usr/lib, the chroot's arch-meson wrapper pins --libdir lib as a backstop, and the ARTEFACT check -- which said "no Debian multiarch libdir anywhere", truthfully and uselessly -- now also counts paths under usr/lib64. --- FR --- libxslt annonçait configure: error: Package requirements (python-3.14) were not met: Package 'python-3.14' not found avec python 3.14.7 installé et /usr/lib/pkgconfig/python-3.14.pc bien présent. La chaîne, dont aucun maillon ne ressemble aux autres : binutils dépose libiberty.a dans /usr/lib64, le MULTILIB_OSDIRNAME par défaut de s390x, et crée donc ce chemin comme VRAI répertoire. meson choisit son libdir par défaut en inspectant le système : 64 bits plus un vrai /usr/lib64 donne lib64 — un lien ne compte pas, d'où le fait qu'Arch ne voit jamais cela et qu'arch-meson ne passe aucun --libdir. pkgconf étant un paquet meson, il s'y est installé et a COMPILÉ /usr/lib64/pkgconfig comme chemin de recherche. Or tous les .pc de la distribution sont dans /usr/lib/pkgconfig. Corrigé aux trois niveaux : binutils épinglé à --libdir=/usr/lib, l'enveloppe arch-meson du chroot épingle --libdir lib en filet, et le test ARTEFACT — qui répondait « aucun libdir multiarch Debian », véridiquement et inutilement — compte désormais aussi les chemins sous usr/lib64. Assisted-by: Claude Opus 5
2026-08-21 00:47:09 -04:00
# binutils: install into /usr/lib, not /usr/lib64.
[ADD] port patches: gcc front ends, binutils gold, libtool multilib Three more upstream PKGBUILDs assume x86_64, each in a different way, and each is dropped rather than repaired because the thing being dropped is architecture-specific by nature. gcc: Ada and D are written in themselves and need an existing compiler of the same language. Ubuntu ships gnat, but not one GCC 15 accepts, and there is no D bootstrap compiler here at all. Modula-2 and COBOL have the same shape. Front ends reduced to c, c++, fortran, lto, objc and obj-c++, which is everything this port and ERPLibre compile. binutils: gold is x86-centric, deprecated upstream since 2.44, and built by no distribution that ships s390x. ld.bfd is the linker on Z. binutils builds once gold is disabled -- measured. libtool: the lib32-libltdl split package is i686-on-x86_64 multilib. Its build step is already guarded by CARCH, but prepare() copies the tree to src/libtool32 unconditionally and the package function then packages a tree nobody built. Two host-layout bridges were also needed. Ubuntu multiarch puts asm/, bits/, gnu/ and sys/sdt.h under /usr/include/s390x-linux-gnu, while glibc builds with -nostdinc and expects the classic layout: fatal error: asm/errno.h: No such file or directory fatal error: sys/sdt.h: No such file or directory Symlinks make the host look like Arch for those paths. sys/ needed the files linked, not the directory, since /usr/include/sys already exists. --- FR --- Trois PKGBUILD amont de plus supposent x86_64, chacun a sa maniere, et chacun est retire plutot que repare : ce qu on retire est par nature propre a une architecture. gcc : Ada et D sont ecrits en eux-memes et reclament un compilateur existant du meme langage. Ubuntu livre gnat, mais pas une version que GCC 15 accepte, et il n y a ici aucun compilateur D d amorcage. Modula-2 et COBOL posent le meme probleme. Les frontaux se reduisent a c, c++, fortran, lto, objc et obj-c++, ce qui couvre tout ce que ce portage et ERPLibre compilent. binutils : gold est centre sur x86, abandonne en amont depuis 2.44, et construit par aucune distribution livrant s390x. Sur Z, l editeur de liens est ld.bfd. binutils se construit des que gold est desactive -- mesure. libtool : le paquet scinde lib32-libltdl est du multilib i686 sur x86_64. Son etape de compilation est deja gardee par CARCH, mais prepare() copie l arbre vers src/libtool32 sans condition, et la fonction de paquet empaquette ensuite un arbre que personne n a bati. Deux ponts de disposition d hote etaient aussi necessaires. Le multiarch d Ubuntu place asm/, bits/, gnu/ et sys/sdt.h sous /usr/include/s390x-linux-gnu, quand glibc compile avec -nostdinc et attend la disposition classique : fatal error: asm/errno.h: No such file or directory fatal error: sys/sdt.h: No such file or directory Des liens symboliques donnent a l hote l allure d Arch pour ces chemins. Pour sys/ il faut lier les fichiers et non le repertoire, puisque /usr/include/sys existe deja. Assisted-by: Claude Opus 5
2026-08-15 21:01:18 -04:00
#
[FIX] one stray .a file broke every pkg-config lookup libxslt reported configure: error: Package requirements (python-3.14) were not met: Package 'python-3.14' not found with python 3.14.7 installed and /usr/lib/pkgconfig/python-3.14.pc present. The chain, none of whose links resembles the others: binutils installs libiberty.a into /usr/lib64, because s390x's default MULTILIB_OSDIRNAME is lib64, creating that path as a REAL directory. meson chooses its default libdir by inspecting the system, and 64-bit plus a real /usr/lib64 means lib64 -- a symlink does not count, which is why Arch never sees this and arch-meson passes no --libdir at all. pkgconf is a meson package, so it installed there and COMPILED IN /usr/lib64/pkgconfig as its search path. Every .pc in the distribution is in /usr/lib/pkgconfig. Fixed at all three levels: binutils pinned to --libdir=/usr/lib, the chroot's arch-meson wrapper pins --libdir lib as a backstop, and the ARTEFACT check -- which said "no Debian multiarch libdir anywhere", truthfully and uselessly -- now also counts paths under usr/lib64. --- FR --- libxslt annonçait configure: error: Package requirements (python-3.14) were not met: Package 'python-3.14' not found avec python 3.14.7 installé et /usr/lib/pkgconfig/python-3.14.pc bien présent. La chaîne, dont aucun maillon ne ressemble aux autres : binutils dépose libiberty.a dans /usr/lib64, le MULTILIB_OSDIRNAME par défaut de s390x, et crée donc ce chemin comme VRAI répertoire. meson choisit son libdir par défaut en inspectant le système : 64 bits plus un vrai /usr/lib64 donne lib64 — un lien ne compte pas, d'où le fait qu'Arch ne voit jamais cela et qu'arch-meson ne passe aucun --libdir. pkgconf étant un paquet meson, il s'y est installé et a COMPILÉ /usr/lib64/pkgconfig comme chemin de recherche. Or tous les .pc de la distribution sont dans /usr/lib/pkgconfig. Corrigé aux trois niveaux : binutils épinglé à --libdir=/usr/lib, l'enveloppe arch-meson du chroot épingle --libdir lib en filet, et le test ARTEFACT — qui répondait « aucun libdir multiarch Debian », véridiquement et inutilement — compte désormais aussi les chemins sous usr/lib64. Assisted-by: Claude Opus 5
2026-08-21 00:47:09 -04:00
# THIS IS THE ROOT OF A CHAIN, and the chain is worth writing down because
# nothing in it looks related to anything else in it:
[ADD] port patches: gcc front ends, binutils gold, libtool multilib Three more upstream PKGBUILDs assume x86_64, each in a different way, and each is dropped rather than repaired because the thing being dropped is architecture-specific by nature. gcc: Ada and D are written in themselves and need an existing compiler of the same language. Ubuntu ships gnat, but not one GCC 15 accepts, and there is no D bootstrap compiler here at all. Modula-2 and COBOL have the same shape. Front ends reduced to c, c++, fortran, lto, objc and obj-c++, which is everything this port and ERPLibre compile. binutils: gold is x86-centric, deprecated upstream since 2.44, and built by no distribution that ships s390x. ld.bfd is the linker on Z. binutils builds once gold is disabled -- measured. libtool: the lib32-libltdl split package is i686-on-x86_64 multilib. Its build step is already guarded by CARCH, but prepare() copies the tree to src/libtool32 unconditionally and the package function then packages a tree nobody built. Two host-layout bridges were also needed. Ubuntu multiarch puts asm/, bits/, gnu/ and sys/sdt.h under /usr/include/s390x-linux-gnu, while glibc builds with -nostdinc and expects the classic layout: fatal error: asm/errno.h: No such file or directory fatal error: sys/sdt.h: No such file or directory Symlinks make the host look like Arch for those paths. sys/ needed the files linked, not the directory, since /usr/include/sys already exists. --- FR --- Trois PKGBUILD amont de plus supposent x86_64, chacun a sa maniere, et chacun est retire plutot que repare : ce qu on retire est par nature propre a une architecture. gcc : Ada et D sont ecrits en eux-memes et reclament un compilateur existant du meme langage. Ubuntu livre gnat, mais pas une version que GCC 15 accepte, et il n y a ici aucun compilateur D d amorcage. Modula-2 et COBOL posent le meme probleme. Les frontaux se reduisent a c, c++, fortran, lto, objc et obj-c++, ce qui couvre tout ce que ce portage et ERPLibre compilent. binutils : gold est centre sur x86, abandonne en amont depuis 2.44, et construit par aucune distribution livrant s390x. Sur Z, l editeur de liens est ld.bfd. binutils se construit des que gold est desactive -- mesure. libtool : le paquet scinde lib32-libltdl est du multilib i686 sur x86_64. Son etape de compilation est deja gardee par CARCH, mais prepare() copie l arbre vers src/libtool32 sans condition, et la fonction de paquet empaquette ensuite un arbre que personne n a bati. Deux ponts de disposition d hote etaient aussi necessaires. Le multiarch d Ubuntu place asm/, bits/, gnu/ et sys/sdt.h sous /usr/include/s390x-linux-gnu, quand glibc compile avec -nostdinc et attend la disposition classique : fatal error: asm/errno.h: No such file or directory fatal error: sys/sdt.h: No such file or directory Des liens symboliques donnent a l hote l allure d Arch pour ces chemins. Pour sys/ il faut lier les fichiers et non le repertoire, puisque /usr/include/sys existe deja. Assisted-by: Claude Opus 5
2026-08-15 21:01:18 -04:00
#
[FIX] one stray .a file broke every pkg-config lookup libxslt reported configure: error: Package requirements (python-3.14) were not met: Package 'python-3.14' not found with python 3.14.7 installed and /usr/lib/pkgconfig/python-3.14.pc present. The chain, none of whose links resembles the others: binutils installs libiberty.a into /usr/lib64, because s390x's default MULTILIB_OSDIRNAME is lib64, creating that path as a REAL directory. meson chooses its default libdir by inspecting the system, and 64-bit plus a real /usr/lib64 means lib64 -- a symlink does not count, which is why Arch never sees this and arch-meson passes no --libdir at all. pkgconf is a meson package, so it installed there and COMPILED IN /usr/lib64/pkgconfig as its search path. Every .pc in the distribution is in /usr/lib/pkgconfig. Fixed at all three levels: binutils pinned to --libdir=/usr/lib, the chroot's arch-meson wrapper pins --libdir lib as a backstop, and the ARTEFACT check -- which said "no Debian multiarch libdir anywhere", truthfully and uselessly -- now also counts paths under usr/lib64. --- FR --- libxslt annonçait configure: error: Package requirements (python-3.14) were not met: Package 'python-3.14' not found avec python 3.14.7 installé et /usr/lib/pkgconfig/python-3.14.pc bien présent. La chaîne, dont aucun maillon ne ressemble aux autres : binutils dépose libiberty.a dans /usr/lib64, le MULTILIB_OSDIRNAME par défaut de s390x, et crée donc ce chemin comme VRAI répertoire. meson choisit son libdir par défaut en inspectant le système : 64 bits plus un vrai /usr/lib64 donne lib64 — un lien ne compte pas, d'où le fait qu'Arch ne voit jamais cela et qu'arch-meson ne passe aucun --libdir. pkgconf étant un paquet meson, il s'y est installé et a COMPILÉ /usr/lib64/pkgconfig comme chemin de recherche. Or tous les .pc de la distribution sont dans /usr/lib/pkgconfig. Corrigé aux trois niveaux : binutils épinglé à --libdir=/usr/lib, l'enveloppe arch-meson du chroot épingle --libdir lib en filet, et le test ARTEFACT — qui répondait « aucun libdir multiarch Debian », véridiquement et inutilement — compte désormais aussi les chemins sous usr/lib64. Assisted-by: Claude Opus 5
2026-08-21 00:47:09 -04:00
# 1. On s390x, GCC's and binutils' default MULTILIB_OSDIRNAME is lib64, so
# binutils installs libiberty.a into /usr/lib64 -- creating that directory
# as a REAL directory. On Arch, /usr/lib64 is a SYMLINK to lib.
# 2. meson chooses its default libdir by looking at the system: 64-bit plus a
# real /usr/lib64 means "lib64". A symlink does not count, which is why
# Arch never sees this and arch-meson passes no --libdir at all.
# 3. pkgconf is a meson package, so it installed into /usr/lib64 -- and
# COMPILED IN its search path as /usr/lib64/pkgconfig.
# 4. Every .pc file in the distribution is in /usr/lib/pkgconfig. So every
# pkg-config lookup inside the chroot failed. libxslt reported it as
[ADD] port patches: gcc front ends, binutils gold, libtool multilib Three more upstream PKGBUILDs assume x86_64, each in a different way, and each is dropped rather than repaired because the thing being dropped is architecture-specific by nature. gcc: Ada and D are written in themselves and need an existing compiler of the same language. Ubuntu ships gnat, but not one GCC 15 accepts, and there is no D bootstrap compiler here at all. Modula-2 and COBOL have the same shape. Front ends reduced to c, c++, fortran, lto, objc and obj-c++, which is everything this port and ERPLibre compile. binutils: gold is x86-centric, deprecated upstream since 2.44, and built by no distribution that ships s390x. ld.bfd is the linker on Z. binutils builds once gold is disabled -- measured. libtool: the lib32-libltdl split package is i686-on-x86_64 multilib. Its build step is already guarded by CARCH, but prepare() copies the tree to src/libtool32 unconditionally and the package function then packages a tree nobody built. Two host-layout bridges were also needed. Ubuntu multiarch puts asm/, bits/, gnu/ and sys/sdt.h under /usr/include/s390x-linux-gnu, while glibc builds with -nostdinc and expects the classic layout: fatal error: asm/errno.h: No such file or directory fatal error: sys/sdt.h: No such file or directory Symlinks make the host look like Arch for those paths. sys/ needed the files linked, not the directory, since /usr/include/sys already exists. --- FR --- Trois PKGBUILD amont de plus supposent x86_64, chacun a sa maniere, et chacun est retire plutot que repare : ce qu on retire est par nature propre a une architecture. gcc : Ada et D sont ecrits en eux-memes et reclament un compilateur existant du meme langage. Ubuntu livre gnat, mais pas une version que GCC 15 accepte, et il n y a ici aucun compilateur D d amorcage. Modula-2 et COBOL posent le meme probleme. Les frontaux se reduisent a c, c++, fortran, lto, objc et obj-c++, ce qui couvre tout ce que ce portage et ERPLibre compilent. binutils : gold est centre sur x86, abandonne en amont depuis 2.44, et construit par aucune distribution livrant s390x. Sur Z, l editeur de liens est ld.bfd. binutils se construit des que gold est desactive -- mesure. libtool : le paquet scinde lib32-libltdl est du multilib i686 sur x86_64. Son etape de compilation est deja gardee par CARCH, mais prepare() copie l arbre vers src/libtool32 sans condition, et la fonction de paquet empaquette ensuite un arbre que personne n a bati. Deux ponts de disposition d hote etaient aussi necessaires. Le multiarch d Ubuntu place asm/, bits/, gnu/ et sys/sdt.h sous /usr/include/s390x-linux-gnu, quand glibc compile avec -nostdinc et attend la disposition classique : fatal error: asm/errno.h: No such file or directory fatal error: sys/sdt.h: No such file or directory Des liens symboliques donnent a l hote l allure d Arch pour ces chemins. Pour sys/ il faut lier les fichiers et non le repertoire, puisque /usr/include/sys existe deja. Assisted-by: Claude Opus 5
2026-08-15 21:01:18 -04:00
#
[FIX] one stray .a file broke every pkg-config lookup libxslt reported configure: error: Package requirements (python-3.14) were not met: Package 'python-3.14' not found with python 3.14.7 installed and /usr/lib/pkgconfig/python-3.14.pc present. The chain, none of whose links resembles the others: binutils installs libiberty.a into /usr/lib64, because s390x's default MULTILIB_OSDIRNAME is lib64, creating that path as a REAL directory. meson chooses its default libdir by inspecting the system, and 64-bit plus a real /usr/lib64 means lib64 -- a symlink does not count, which is why Arch never sees this and arch-meson passes no --libdir at all. pkgconf is a meson package, so it installed there and COMPILED IN /usr/lib64/pkgconfig as its search path. Every .pc in the distribution is in /usr/lib/pkgconfig. Fixed at all three levels: binutils pinned to --libdir=/usr/lib, the chroot's arch-meson wrapper pins --libdir lib as a backstop, and the ARTEFACT check -- which said "no Debian multiarch libdir anywhere", truthfully and uselessly -- now also counts paths under usr/lib64. --- FR --- libxslt annonçait configure: error: Package requirements (python-3.14) were not met: Package 'python-3.14' not found avec python 3.14.7 installé et /usr/lib/pkgconfig/python-3.14.pc bien présent. La chaîne, dont aucun maillon ne ressemble aux autres : binutils dépose libiberty.a dans /usr/lib64, le MULTILIB_OSDIRNAME par défaut de s390x, et crée donc ce chemin comme VRAI répertoire. meson choisit son libdir par défaut en inspectant le système : 64 bits plus un vrai /usr/lib64 donne lib64 — un lien ne compte pas, d'où le fait qu'Arch ne voit jamais cela et qu'arch-meson ne passe aucun --libdir. pkgconf étant un paquet meson, il s'y est installé et a COMPILÉ /usr/lib64/pkgconfig comme chemin de recherche. Or tous les .pc de la distribution sont dans /usr/lib/pkgconfig. Corrigé aux trois niveaux : binutils épinglé à --libdir=/usr/lib, l'enveloppe arch-meson du chroot épingle --libdir lib en filet, et le test ARTEFACT — qui répondait « aucun libdir multiarch Debian », véridiquement et inutilement — compte désormais aussi les chemins sous usr/lib64. Assisted-by: Claude Opus 5
2026-08-21 00:47:09 -04:00
# configure: error: Package requirements (python-3.14) were not met:
# Package 'python-3.14' not found
#
# with python 3.14.7 installed and /usr/lib/pkgconfig/python-3.14.pc
# sitting right there.
#
# Step 4 reads as a missing dependency. Step 1 is a linker library nobody
# thinks about. Fixing only the visible end -- pkgconf's search path -- would
# leave the real /usr/lib64 there, and the next meson package would land in it.
#
# --libdir is set explicitly rather than left to the target default, which is
# what Arch's layout means: one library directory, /usr/lib, with lib64 as a
# compatibility symlink.
[ADD] port patches: gcc front ends, binutils gold, libtool multilib Three more upstream PKGBUILDs assume x86_64, each in a different way, and each is dropped rather than repaired because the thing being dropped is architecture-specific by nature. gcc: Ada and D are written in themselves and need an existing compiler of the same language. Ubuntu ships gnat, but not one GCC 15 accepts, and there is no D bootstrap compiler here at all. Modula-2 and COBOL have the same shape. Front ends reduced to c, c++, fortran, lto, objc and obj-c++, which is everything this port and ERPLibre compile. binutils: gold is x86-centric, deprecated upstream since 2.44, and built by no distribution that ships s390x. ld.bfd is the linker on Z. binutils builds once gold is disabled -- measured. libtool: the lib32-libltdl split package is i686-on-x86_64 multilib. Its build step is already guarded by CARCH, but prepare() copies the tree to src/libtool32 unconditionally and the package function then packages a tree nobody built. Two host-layout bridges were also needed. Ubuntu multiarch puts asm/, bits/, gnu/ and sys/sdt.h under /usr/include/s390x-linux-gnu, while glibc builds with -nostdinc and expects the classic layout: fatal error: asm/errno.h: No such file or directory fatal error: sys/sdt.h: No such file or directory Symlinks make the host look like Arch for those paths. sys/ needed the files linked, not the directory, since /usr/include/sys already exists. --- FR --- Trois PKGBUILD amont de plus supposent x86_64, chacun a sa maniere, et chacun est retire plutot que repare : ce qu on retire est par nature propre a une architecture. gcc : Ada et D sont ecrits en eux-memes et reclament un compilateur existant du meme langage. Ubuntu livre gnat, mais pas une version que GCC 15 accepte, et il n y a ici aucun compilateur D d amorcage. Modula-2 et COBOL posent le meme probleme. Les frontaux se reduisent a c, c++, fortran, lto, objc et obj-c++, ce qui couvre tout ce que ce portage et ERPLibre compilent. binutils : gold est centre sur x86, abandonne en amont depuis 2.44, et construit par aucune distribution livrant s390x. Sur Z, l editeur de liens est ld.bfd. binutils se construit des que gold est desactive -- mesure. libtool : le paquet scinde lib32-libltdl est du multilib i686 sur x86_64. Son etape de compilation est deja gardee par CARCH, mais prepare() copie l arbre vers src/libtool32 sans condition, et la fonction de paquet empaquette ensuite un arbre que personne n a bati. Deux ponts de disposition d hote etaient aussi necessaires. Le multiarch d Ubuntu place asm/, bits/, gnu/ et sys/sdt.h sous /usr/include/s390x-linux-gnu, quand glibc compile avec -nostdinc et attend la disposition classique : fatal error: asm/errno.h: No such file or directory fatal error: sys/sdt.h: No such file or directory Des liens symboliques donnent a l hote l allure d Arch pour ces chemins. Pour sys/ il faut lier les fichiers et non le repertoire, puisque /usr/include/sys existe deja. Assisted-by: Claude Opus 5
2026-08-15 21:01:18 -04:00
set -euo pipefail
[FIX] one stray .a file broke every pkg-config lookup libxslt reported configure: error: Package requirements (python-3.14) were not met: Package 'python-3.14' not found with python 3.14.7 installed and /usr/lib/pkgconfig/python-3.14.pc present. The chain, none of whose links resembles the others: binutils installs libiberty.a into /usr/lib64, because s390x's default MULTILIB_OSDIRNAME is lib64, creating that path as a REAL directory. meson chooses its default libdir by inspecting the system, and 64-bit plus a real /usr/lib64 means lib64 -- a symlink does not count, which is why Arch never sees this and arch-meson passes no --libdir at all. pkgconf is a meson package, so it installed there and COMPILED IN /usr/lib64/pkgconfig as its search path. Every .pc in the distribution is in /usr/lib/pkgconfig. Fixed at all three levels: binutils pinned to --libdir=/usr/lib, the chroot's arch-meson wrapper pins --libdir lib as a backstop, and the ARTEFACT check -- which said "no Debian multiarch libdir anywhere", truthfully and uselessly -- now also counts paths under usr/lib64. --- FR --- libxslt annonçait configure: error: Package requirements (python-3.14) were not met: Package 'python-3.14' not found avec python 3.14.7 installé et /usr/lib/pkgconfig/python-3.14.pc bien présent. La chaîne, dont aucun maillon ne ressemble aux autres : binutils dépose libiberty.a dans /usr/lib64, le MULTILIB_OSDIRNAME par défaut de s390x, et crée donc ce chemin comme VRAI répertoire. meson choisit son libdir par défaut en inspectant le système : 64 bits plus un vrai /usr/lib64 donne lib64 — un lien ne compte pas, d'où le fait qu'Arch ne voit jamais cela et qu'arch-meson ne passe aucun --libdir. pkgconf étant un paquet meson, il s'y est installé et a COMPILÉ /usr/lib64/pkgconfig comme chemin de recherche. Or tous les .pc de la distribution sont dans /usr/lib/pkgconfig. Corrigé aux trois niveaux : binutils épinglé à --libdir=/usr/lib, l'enveloppe arch-meson du chroot épingle --libdir lib en filet, et le test ARTEFACT — qui répondait « aucun libdir multiarch Debian », véridiquement et inutilement — compte désormais aussi les chemins sous usr/lib64. Assisted-by: Claude Opus 5
2026-08-21 00:47:09 -04:00
python3 - <<'ZZPY'
import io, re
lines = io.open("PKGBUILD", encoding="utf-8").read().split("\n")
hit = [i for i, l in enumerate(lines) if re.search(r"/configure\b", l) and "#" not in l.split("/configure")[0]]
assert len(hit) == 1, "binutils: expected one configure call, got %d" % len(hit)
i = hit[0]
indent = re.match(r"^[ \t]*", lines[i]).group(0)
assert lines[i].rstrip().endswith("\\"), "binutils: configure does not continue"
lines.insert(i + 1, indent + " --libdir=/usr/lib \\")
io.open("PKGBUILD", "w", encoding="utf-8").write("\n".join(lines))
ZZPY
grep -A1 -E "/configure( |\\\\)" PKGBUILD | grep -q -- '--libdir=/usr/lib' || {
echo "binutils: --libdir is not on the configure line" >&2; exit 1; }
echo "binutils: libdir pinned to /usr/lib (keeps /usr/lib64 a symlink)"
[FIX] binutils: no PGO+LTO build, so gold links Built at stage 1, failed at stage 2, in gold: <artificial>:(.text+0xc44e): undefined reference to `void gold::gold_error_at_location<32, true>(...)' `<artificial>` and the .ltrans object names are LTO's, and it does not come from makepkg -- the chroot carries !lto with an empty LTOFLAGS. It comes from the PKGBUILD: --enable-pgo-build=lto. gold's explicitly-instantiated templates do not survive it here. Stage 1 got away with it because the host's GCC did the work; stage 2 uses ours, at -O2 -march=z13 where stage 1 passed no flags. PGO and LTO are build-time optimisations: what changes is how long binutils takes to compile and how fast the linker runs, not what it can do. The alternatives were removing gold, a linker Arch ships, or debugging LTO template instantiation in a linker upstream has deprecated. The first attempt at this hook looked for --with-build-config=bootstrap-lto, which is in gcc's PKGBUILD, not binutils'. Its own assertion caught it. --- FR --- Bâti à l'étage 1, échoué à l'étage 2, dans gold : <artificial>:(.text+0xc44e): undefined reference to `void gold::gold_error_at_location<32, true>(...)' `<artificial>` et les noms d'objets .ltrans sont ceux du LTO, et il ne vient pas de makepkg — le chroot porte !lto avec un LTOFLAGS vide. Il vient du PKGBUILD : --enable-pgo-build=lto. Les gabarits explicitement instanciés de gold n'y survivent pas. L'étage 1 s'en tirait car le GCC de l'hôte faisait le travail ; l'étage 2 utilise le nôtre, à -O2 -march=z13 là où l'étage 1 ne passait rien. PGO et LTO sont des optimisations de construction : ce qui change, c'est la durée de compilation et la vitesse du lieur, pas ce qu'il sait faire. Les options étaient de retirer gold, un lieur qu'Arch livre, ou de déboguer une instanciation de gabarit sous LTO dans un lieur abandonné en amont. La première version de ce hook cherchait --with-build-config=bootstrap-lto, qui est dans le PKGBUILD de gcc, pas de binutils. Sa propre assertion l'a arrêtée. Assisted-by: Claude Opus 5
2026-08-21 04:16:20 -04:00
# --- no PGO+LTO build ---------------------------------------------------------
#
# binutils built at stage 1 and failed at stage 2, in gold:
#
# <artificial>:(.text+0xc44e): undefined reference to
# `void gold::gold_error_at_location<32, true>(...)'
# collect2: error: ld returned 1 exit status
#
# `<artificial>` and the .ltrans object names are LTO's. It does not come from
# makepkg -- the chroot's OPTIONS carry !lto and LTOFLAGS is empty. It comes
# from the PKGBUILD itself: --enable-pgo-build=lto, a profile-guided build with
# link-time optimisation, which passes -flto=jobserver. gold's
# explicitly-instantiated templates do not survive it here.
#
# Stage 1 got away with it because the host's GCC did the work. Stage 2 uses
# ours, on s390x, at -O2 -march=z13 where stage 1 passed no flags at all.
#
# PGO and LTO are BUILD-TIME optimisations: dropping them changes how long
# binutils takes to compile and how fast the resulting linker runs, not what it
# can do. The alternatives were disabling gold -- removing a linker Arch ships
# -- or debugging an LTO template instantiation bug in a linker upstream has
# deprecated. For a bootstrap, a binutils that works beats a binutils that is
# five percent faster; PGO also roughly triples the build, which this port pays
# for on every stage.
python3 - <<'ZZPY'
[FIX] binutils: delete the option, do not comment it out The PGO fix broke the build it was meant to repair: /build/binutils/PKGBUILD: line 107: --enable-plugins: command not found The line it commented out ended in a backslash. A comment inside a backslash-continued command does not comment out an option -- it breaks the continuation, and the next option becomes a command of its own. This port had already documented the mirror image, where commenting the FIRST line of a multi-line assignment leaves the continuations live; same fact, other side. The line is deleted now, and nothing is put in its place: any comment inside the ./configure invocation would break it again. The explanation belongs in the hook. Also removed from that hook: a check ending in `|| true`, which passes always. A guard that cannot fail is worse than no guard, because it reads like verification. --- FR --- Le correctif PGO a cassé la construction qu'il devait réparer : /build/binutils/PKGBUILD: line 107: --enable-plugins: command not found La ligne commentée finissait par une contre-oblique. Un commentaire dans une commande continuée ne supprime pas une option — il brise la continuation, et l'option suivante devient une commande. Ce portage avait déjà documenté l'image inverse, où commenter la PREMIÈRE ligne d'une affectation multiligne laisse les continuations actives ; même fait, autre face. La ligne est désormais supprimée, et rien ne la remplace : tout commentaire dans l'appel à ./configure le briserait de nouveau. L'explication appartient au hook. Retiré aussi de ce hook : un contrôle finissant par `|| true`, donc toujours satisfait. Une garde incapable d'échouer est pire qu'aucune garde, car elle se lit comme une vérification. Assisted-by: Claude Opus 5
2026-08-21 16:53:49 -04:00
import io
# DELETED, not commented.
#
# The first version replaced the line with a comment, and binutils then failed
# with
#
# /build/binutils/PKGBUILD: line 107: --enable-plugins: command not found
#
# because the line ended in a backslash. A comment inside a continued command
# does not comment out an option -- it breaks the continuation, and the NEXT
# option becomes a command of its own. The documented trap in this port was the
# mirror image (commenting the first line of a multi-line assignment leaves the
# continuations live); this is the same fact from the other side.
#
# Nothing is left in its place: the explanation belongs in this hook, and any
# comment placed inside the configure invocation would break it again.
[FIX] binutils: no PGO+LTO build, so gold links Built at stage 1, failed at stage 2, in gold: <artificial>:(.text+0xc44e): undefined reference to `void gold::gold_error_at_location<32, true>(...)' `<artificial>` and the .ltrans object names are LTO's, and it does not come from makepkg -- the chroot carries !lto with an empty LTOFLAGS. It comes from the PKGBUILD: --enable-pgo-build=lto. gold's explicitly-instantiated templates do not survive it here. Stage 1 got away with it because the host's GCC did the work; stage 2 uses ours, at -O2 -march=z13 where stage 1 passed no flags. PGO and LTO are build-time optimisations: what changes is how long binutils takes to compile and how fast the linker runs, not what it can do. The alternatives were removing gold, a linker Arch ships, or debugging LTO template instantiation in a linker upstream has deprecated. The first attempt at this hook looked for --with-build-config=bootstrap-lto, which is in gcc's PKGBUILD, not binutils'. Its own assertion caught it. --- FR --- Bâti à l'étage 1, échoué à l'étage 2, dans gold : <artificial>:(.text+0xc44e): undefined reference to `void gold::gold_error_at_location<32, true>(...)' `<artificial>` et les noms d'objets .ltrans sont ceux du LTO, et il ne vient pas de makepkg — le chroot porte !lto avec un LTOFLAGS vide. Il vient du PKGBUILD : --enable-pgo-build=lto. Les gabarits explicitement instanciés de gold n'y survivent pas. L'étage 1 s'en tirait car le GCC de l'hôte faisait le travail ; l'étage 2 utilise le nôtre, à -O2 -march=z13 là où l'étage 1 ne passait rien. PGO et LTO sont des optimisations de construction : ce qui change, c'est la durée de compilation et la vitesse du lieur, pas ce qu'il sait faire. Les options étaient de retirer gold, un lieur qu'Arch livre, ou de déboguer une instanciation de gabarit sous LTO dans un lieur abandonné en amont. La première version de ce hook cherchait --with-build-config=bootstrap-lto, qui est dans le PKGBUILD de gcc, pas de binutils. Sa propre assertion l'a arrêtée. Assisted-by: Claude Opus 5
2026-08-21 04:16:20 -04:00
lines = io.open("PKGBUILD", encoding="utf-8").read().split("\n")
hit = [i for i, l in enumerate(lines) if "--enable-pgo-build" in l]
assert len(hit) == 1, "binutils: expected one --enable-pgo-build line, got %d" % len(hit)
i = hit[0]
assert lines[i].strip().startswith("--enable-pgo-build"), \
"binutils: --enable-pgo-build shares its line: %r" % lines[i]
[FIX] binutils: delete the option, do not comment it out The PGO fix broke the build it was meant to repair: /build/binutils/PKGBUILD: line 107: --enable-plugins: command not found The line it commented out ended in a backslash. A comment inside a backslash-continued command does not comment out an option -- it breaks the continuation, and the next option becomes a command of its own. This port had already documented the mirror image, where commenting the FIRST line of a multi-line assignment leaves the continuations live; same fact, other side. The line is deleted now, and nothing is put in its place: any comment inside the ./configure invocation would break it again. The explanation belongs in the hook. Also removed from that hook: a check ending in `|| true`, which passes always. A guard that cannot fail is worse than no guard, because it reads like verification. --- FR --- Le correctif PGO a cassé la construction qu'il devait réparer : /build/binutils/PKGBUILD: line 107: --enable-plugins: command not found La ligne commentée finissait par une contre-oblique. Un commentaire dans une commande continuée ne supprime pas une option — il brise la continuation, et l'option suivante devient une commande. Ce portage avait déjà documenté l'image inverse, où commenter la PREMIÈRE ligne d'une affectation multiligne laisse les continuations actives ; même fait, autre face. La ligne est désormais supprimée, et rien ne la remplace : tout commentaire dans l'appel à ./configure le briserait de nouveau. L'explication appartient au hook. Retiré aussi de ce hook : un contrôle finissant par `|| true`, donc toujours satisfait. Une garde incapable d'échouer est pire qu'aucune garde, car elle se lit comme une vérification. Assisted-by: Claude Opus 5
2026-08-21 16:53:49 -04:00
del lines[i]
[FIX] binutils: no PGO+LTO build, so gold links Built at stage 1, failed at stage 2, in gold: <artificial>:(.text+0xc44e): undefined reference to `void gold::gold_error_at_location<32, true>(...)' `<artificial>` and the .ltrans object names are LTO's, and it does not come from makepkg -- the chroot carries !lto with an empty LTOFLAGS. It comes from the PKGBUILD: --enable-pgo-build=lto. gold's explicitly-instantiated templates do not survive it here. Stage 1 got away with it because the host's GCC did the work; stage 2 uses ours, at -O2 -march=z13 where stage 1 passed no flags. PGO and LTO are build-time optimisations: what changes is how long binutils takes to compile and how fast the linker runs, not what it can do. The alternatives were removing gold, a linker Arch ships, or debugging LTO template instantiation in a linker upstream has deprecated. The first attempt at this hook looked for --with-build-config=bootstrap-lto, which is in gcc's PKGBUILD, not binutils'. Its own assertion caught it. --- FR --- Bâti à l'étage 1, échoué à l'étage 2, dans gold : <artificial>:(.text+0xc44e): undefined reference to `void gold::gold_error_at_location<32, true>(...)' `<artificial>` et les noms d'objets .ltrans sont ceux du LTO, et il ne vient pas de makepkg — le chroot porte !lto avec un LTOFLAGS vide. Il vient du PKGBUILD : --enable-pgo-build=lto. Les gabarits explicitement instanciés de gold n'y survivent pas. L'étage 1 s'en tirait car le GCC de l'hôte faisait le travail ; l'étage 2 utilise le nôtre, à -O2 -march=z13 là où l'étage 1 ne passait rien. PGO et LTO sont des optimisations de construction : ce qui change, c'est la durée de compilation et la vitesse du lieur, pas ce qu'il sait faire. Les options étaient de retirer gold, un lieur qu'Arch livre, ou de déboguer une instanciation de gabarit sous LTO dans un lieur abandonné en amont. La première version de ce hook cherchait --with-build-config=bootstrap-lto, qui est dans le PKGBUILD de gcc, pas de binutils. Sa propre assertion l'a arrêtée. Assisted-by: Claude Opus 5
2026-08-21 04:16:20 -04:00
io.open("PKGBUILD", "w", encoding="utf-8").write("\n".join(lines))
ZZPY
grep -qE "^[[:space:]]*--enable-pgo-build" PKGBUILD && {
echo "binutils: an active --enable-pgo-build line survived" >&2; exit 1; }
echo "binutils: PGO+LTO build dropped"
[FIX] binutils' extra targets were x86_64's, and gcc only wanted man pages gold failed to link with s390.cc: undefined reference to `void gold::gold_error_at_location<32, true>' Its s390 target file compiles code for both s390 and s390x and references <32, true> instantiations, which exist only when a 32-bit s390 target is configured. The PKGBUILD asks for --enable-targets=x86_64-pep,bpf-unknown-none. x86_64-pep is the PE+ target for x86_64: it means nothing here, and on x86_64 it is what happens to bring in the 32-bit instantiations gold's target files want. So this was never a gold bug -- it is the -march=x86-64 story one layer further in. s390-linux-gnu is the honest translation of that line. gcc now compiles, Fortran front end included, and stopped in package_gcc() on libstdc++'s doxygen man pages -- two places, build and install, the eighth time this port has met that shape. --- FR --- gold ne se liait pas : s390.cc: undefined reference to `void gold::gold_error_at_location<32, true>' Son fichier de cible s390 compile pour s390 et s390x et référence des instanciations <32, true>, qui n'existent que si une cible s390 32 bits est configurée. Le PKGBUILD demande --enable-targets=x86_64-pep,bpf-unknown-none. x86_64-pep est la cible PE+ d'x86_64 : elle ne veut rien dire ici, et sur x86_64 c'est elle qui amène par hasard les instanciations 32 bits que gold réclame. Ce n'était donc pas un défaut de gold — c'est l'histoire du -march=x86-64 une couche plus loin. s390-linux-gnu est la traduction honnête de cette ligne. gcc compile désormais, front-end Fortran compris, et s'arrêtait dans package_gcc() sur les pages de manuel doxygen de libstdc++ — deux endroits, construction et installation, huitième fois que ce portage rencontre cette forme. Assisted-by: Claude Opus 5
2026-08-22 21:52:39 -04:00
[FIX] binutils: gold's s390 support needs a target binutils is deleting This section was written twice, and the first version was wrong instructively. gold would not link: s390.cc references gold::gold_error_at_location<32, true>, and those instantiations exist only when a 32-bit s390 target is configured. The PKGBUILD asked for --enable-targets=x86_64-pep, so the first fix translated that to s390-linux-gnu -- the honest-looking equivalent. bfd's configure answered: *** Specify --enable-obsolete to build it anyway. *** Support will be REMOVED in the next major release of BINUTILS, *** unless a maintainer comes forward. 32-bit s390 is obsolete in binutils. So gold cannot be built here without enabling a target upstream has announced it is deleting -- and gold is itself deprecated, with bfd ld already the default (--enable-ld=default). Turning on one deprecated thing to build another is not a trade worth making. gold is dropped and the extra target list keeps only bpf-unknown-none. What is lost is /usr/bin/ld.gold, which nothing here invokes. Recorded rather than hidden: the stage-2 binutils will not match Arch's file list, and this is why. --- FR --- Cette section a été écrite deux fois, et la première version se trompait de façon instructive. gold ne se liait pas : s390.cc référence gold::gold_error_at_location<32, true>, instanciations qui n'existent que si une cible s390 32 bits est configurée. Le PKGBUILD demandait --enable-targets=x86_64-pep, donc le premier correctif l'a traduit en s390-linux-gnu — l'équivalent d'apparence honnête. Le configure de bfd a répondu : *** Specify --enable-obsolete to build it anyway. *** Support will be REMOVED in the next major release of BINUTILS, *** unless a maintainer comes forward. Le s390 32 bits est obsolète dans binutils. gold ne peut donc pas être bâti ici sans activer une cible dont l'amont annonce la suppression — et gold est lui-même abandonné, ld de bfd étant déjà le défaut (--enable-ld=default). Activer un objet déprécié pour en bâtir un autre n'est pas un échange qui vaille. gold est retiré et la liste de cibles ne garde que bpf-unknown-none. Ce qui est perdu est /usr/bin/ld.gold, que rien ici n'invoque. Consigné plutôt que masqué : le binutils d'étage 2 ne correspondra pas à la liste de fichiers d'Arch, et voici pourquoi. Assisted-by: Claude Opus 5
2026-08-23 19:48:19 -04:00
# --- no gold, and no s390-specific extra target -------------------------------
[FIX] binutils' extra targets were x86_64's, and gcc only wanted man pages gold failed to link with s390.cc: undefined reference to `void gold::gold_error_at_location<32, true>' Its s390 target file compiles code for both s390 and s390x and references <32, true> instantiations, which exist only when a 32-bit s390 target is configured. The PKGBUILD asks for --enable-targets=x86_64-pep,bpf-unknown-none. x86_64-pep is the PE+ target for x86_64: it means nothing here, and on x86_64 it is what happens to bring in the 32-bit instantiations gold's target files want. So this was never a gold bug -- it is the -march=x86-64 story one layer further in. s390-linux-gnu is the honest translation of that line. gcc now compiles, Fortran front end included, and stopped in package_gcc() on libstdc++'s doxygen man pages -- two places, build and install, the eighth time this port has met that shape. --- FR --- gold ne se liait pas : s390.cc: undefined reference to `void gold::gold_error_at_location<32, true>' Son fichier de cible s390 compile pour s390 et s390x et référence des instanciations <32, true>, qui n'existent que si une cible s390 32 bits est configurée. Le PKGBUILD demande --enable-targets=x86_64-pep,bpf-unknown-none. x86_64-pep est la cible PE+ d'x86_64 : elle ne veut rien dire ici, et sur x86_64 c'est elle qui amène par hasard les instanciations 32 bits que gold réclame. Ce n'était donc pas un défaut de gold — c'est l'histoire du -march=x86-64 une couche plus loin. s390-linux-gnu est la traduction honnête de cette ligne. gcc compile désormais, front-end Fortran compris, et s'arrêtait dans package_gcc() sur les pages de manuel doxygen de libstdc++ — deux endroits, construction et installation, huitième fois que ce portage rencontre cette forme. Assisted-by: Claude Opus 5
2026-08-22 21:52:39 -04:00
#
[FIX] binutils: gold's s390 support needs a target binutils is deleting This section was written twice, and the first version was wrong instructively. gold would not link: s390.cc references gold::gold_error_at_location<32, true>, and those instantiations exist only when a 32-bit s390 target is configured. The PKGBUILD asked for --enable-targets=x86_64-pep, so the first fix translated that to s390-linux-gnu -- the honest-looking equivalent. bfd's configure answered: *** Specify --enable-obsolete to build it anyway. *** Support will be REMOVED in the next major release of BINUTILS, *** unless a maintainer comes forward. 32-bit s390 is obsolete in binutils. So gold cannot be built here without enabling a target upstream has announced it is deleting -- and gold is itself deprecated, with bfd ld already the default (--enable-ld=default). Turning on one deprecated thing to build another is not a trade worth making. gold is dropped and the extra target list keeps only bpf-unknown-none. What is lost is /usr/bin/ld.gold, which nothing here invokes. Recorded rather than hidden: the stage-2 binutils will not match Arch's file list, and this is why. --- FR --- Cette section a été écrite deux fois, et la première version se trompait de façon instructive. gold ne se liait pas : s390.cc référence gold::gold_error_at_location<32, true>, instanciations qui n'existent que si une cible s390 32 bits est configurée. Le PKGBUILD demandait --enable-targets=x86_64-pep, donc le premier correctif l'a traduit en s390-linux-gnu — l'équivalent d'apparence honnête. Le configure de bfd a répondu : *** Specify --enable-obsolete to build it anyway. *** Support will be REMOVED in the next major release of BINUTILS, *** unless a maintainer comes forward. Le s390 32 bits est obsolète dans binutils. gold ne peut donc pas être bâti ici sans activer une cible dont l'amont annonce la suppression — et gold est lui-même abandonné, ld de bfd étant déjà le défaut (--enable-ld=default). Activer un objet déprécié pour en bâtir un autre n'est pas un échange qui vaille. gold est retiré et la liste de cibles ne garde que bpf-unknown-none. Ce qui est perdu est /usr/bin/ld.gold, que rien ici n'invoque. Consigné plutôt que masqué : le binutils d'étage 2 ne correspondra pas à la liste de fichiers d'Arch, et voici pourquoi. Assisted-by: Claude Opus 5
2026-08-23 19:48:19 -04:00
# This section was written twice, and the first version was wrong in an
# instructive way.
#
# gold would not link:
#
# s390.cc: undefined reference to `gold::gold_error_at_location<32, true>'
[FIX] binutils' extra targets were x86_64's, and gcc only wanted man pages gold failed to link with s390.cc: undefined reference to `void gold::gold_error_at_location<32, true>' Its s390 target file compiles code for both s390 and s390x and references <32, true> instantiations, which exist only when a 32-bit s390 target is configured. The PKGBUILD asks for --enable-targets=x86_64-pep,bpf-unknown-none. x86_64-pep is the PE+ target for x86_64: it means nothing here, and on x86_64 it is what happens to bring in the 32-bit instantiations gold's target files want. So this was never a gold bug -- it is the -march=x86-64 story one layer further in. s390-linux-gnu is the honest translation of that line. gcc now compiles, Fortran front end included, and stopped in package_gcc() on libstdc++'s doxygen man pages -- two places, build and install, the eighth time this port has met that shape. --- FR --- gold ne se liait pas : s390.cc: undefined reference to `void gold::gold_error_at_location<32, true>' Son fichier de cible s390 compile pour s390 et s390x et référence des instanciations <32, true>, qui n'existent que si une cible s390 32 bits est configurée. Le PKGBUILD demande --enable-targets=x86_64-pep,bpf-unknown-none. x86_64-pep est la cible PE+ d'x86_64 : elle ne veut rien dire ici, et sur x86_64 c'est elle qui amène par hasard les instanciations 32 bits que gold réclame. Ce n'était donc pas un défaut de gold — c'est l'histoire du -march=x86-64 une couche plus loin. s390-linux-gnu est la traduction honnête de cette ligne. gcc compile désormais, front-end Fortran compris, et s'arrêtait dans package_gcc() sur les pages de manuel doxygen de libstdc++ — deux endroits, construction et installation, huitième fois que ce portage rencontre cette forme. Assisted-by: Claude Opus 5
2026-08-22 21:52:39 -04:00
#
[FIX] binutils: gold's s390 support needs a target binutils is deleting This section was written twice, and the first version was wrong instructively. gold would not link: s390.cc references gold::gold_error_at_location<32, true>, and those instantiations exist only when a 32-bit s390 target is configured. The PKGBUILD asked for --enable-targets=x86_64-pep, so the first fix translated that to s390-linux-gnu -- the honest-looking equivalent. bfd's configure answered: *** Specify --enable-obsolete to build it anyway. *** Support will be REMOVED in the next major release of BINUTILS, *** unless a maintainer comes forward. 32-bit s390 is obsolete in binutils. So gold cannot be built here without enabling a target upstream has announced it is deleting -- and gold is itself deprecated, with bfd ld already the default (--enable-ld=default). Turning on one deprecated thing to build another is not a trade worth making. gold is dropped and the extra target list keeps only bpf-unknown-none. What is lost is /usr/bin/ld.gold, which nothing here invokes. Recorded rather than hidden: the stage-2 binutils will not match Arch's file list, and this is why. --- FR --- Cette section a été écrite deux fois, et la première version se trompait de façon instructive. gold ne se liait pas : s390.cc référence gold::gold_error_at_location<32, true>, instanciations qui n'existent que si une cible s390 32 bits est configurée. Le PKGBUILD demandait --enable-targets=x86_64-pep, donc le premier correctif l'a traduit en s390-linux-gnu — l'équivalent d'apparence honnête. Le configure de bfd a répondu : *** Specify --enable-obsolete to build it anyway. *** Support will be REMOVED in the next major release of BINUTILS, *** unless a maintainer comes forward. Le s390 32 bits est obsolète dans binutils. gold ne peut donc pas être bâti ici sans activer une cible dont l'amont annonce la suppression — et gold est lui-même abandonné, ld de bfd étant déjà le défaut (--enable-ld=default). Activer un objet déprécié pour en bâtir un autre n'est pas un échange qui vaille. gold est retiré et la liste de cibles ne garde que bpf-unknown-none. Ce qui est perdu est /usr/bin/ld.gold, que rien ici n'invoque. Consigné plutôt que masqué : le binutils d'étage 2 ne correspondra pas à la liste de fichiers d'Arch, et voici pourquoi. Assisted-by: Claude Opus 5
2026-08-23 19:48:19 -04:00
# gold's s390 target file compiles for both s390 and s390x and needs <32, true>
# template instantiations, which exist only when a 32-bit s390 target is
# configured. The PKGBUILD asked for --enable-targets=x86_64-pep, so the first
# fix translated that to s390-linux-gnu -- the honest-looking equivalent. bfd's
# configure answered:
[FIX] binutils' extra targets were x86_64's, and gcc only wanted man pages gold failed to link with s390.cc: undefined reference to `void gold::gold_error_at_location<32, true>' Its s390 target file compiles code for both s390 and s390x and references <32, true> instantiations, which exist only when a 32-bit s390 target is configured. The PKGBUILD asks for --enable-targets=x86_64-pep,bpf-unknown-none. x86_64-pep is the PE+ target for x86_64: it means nothing here, and on x86_64 it is what happens to bring in the 32-bit instantiations gold's target files want. So this was never a gold bug -- it is the -march=x86-64 story one layer further in. s390-linux-gnu is the honest translation of that line. gcc now compiles, Fortran front end included, and stopped in package_gcc() on libstdc++'s doxygen man pages -- two places, build and install, the eighth time this port has met that shape. --- FR --- gold ne se liait pas : s390.cc: undefined reference to `void gold::gold_error_at_location<32, true>' Son fichier de cible s390 compile pour s390 et s390x et référence des instanciations <32, true>, qui n'existent que si une cible s390 32 bits est configurée. Le PKGBUILD demande --enable-targets=x86_64-pep,bpf-unknown-none. x86_64-pep est la cible PE+ d'x86_64 : elle ne veut rien dire ici, et sur x86_64 c'est elle qui amène par hasard les instanciations 32 bits que gold réclame. Ce n'était donc pas un défaut de gold — c'est l'histoire du -march=x86-64 une couche plus loin. s390-linux-gnu est la traduction honnête de cette ligne. gcc compile désormais, front-end Fortran compris, et s'arrêtait dans package_gcc() sur les pages de manuel doxygen de libstdc++ — deux endroits, construction et installation, huitième fois que ce portage rencontre cette forme. Assisted-by: Claude Opus 5
2026-08-22 21:52:39 -04:00
#
[FIX] binutils: gold's s390 support needs a target binutils is deleting This section was written twice, and the first version was wrong instructively. gold would not link: s390.cc references gold::gold_error_at_location<32, true>, and those instantiations exist only when a 32-bit s390 target is configured. The PKGBUILD asked for --enable-targets=x86_64-pep, so the first fix translated that to s390-linux-gnu -- the honest-looking equivalent. bfd's configure answered: *** Specify --enable-obsolete to build it anyway. *** Support will be REMOVED in the next major release of BINUTILS, *** unless a maintainer comes forward. 32-bit s390 is obsolete in binutils. So gold cannot be built here without enabling a target upstream has announced it is deleting -- and gold is itself deprecated, with bfd ld already the default (--enable-ld=default). Turning on one deprecated thing to build another is not a trade worth making. gold is dropped and the extra target list keeps only bpf-unknown-none. What is lost is /usr/bin/ld.gold, which nothing here invokes. Recorded rather than hidden: the stage-2 binutils will not match Arch's file list, and this is why. --- FR --- Cette section a été écrite deux fois, et la première version se trompait de façon instructive. gold ne se liait pas : s390.cc référence gold::gold_error_at_location<32, true>, instanciations qui n'existent que si une cible s390 32 bits est configurée. Le PKGBUILD demandait --enable-targets=x86_64-pep, donc le premier correctif l'a traduit en s390-linux-gnu — l'équivalent d'apparence honnête. Le configure de bfd a répondu : *** Specify --enable-obsolete to build it anyway. *** Support will be REMOVED in the next major release of BINUTILS, *** unless a maintainer comes forward. Le s390 32 bits est obsolète dans binutils. gold ne peut donc pas être bâti ici sans activer une cible dont l'amont annonce la suppression — et gold est lui-même abandonné, ld de bfd étant déjà le défaut (--enable-ld=default). Activer un objet déprécié pour en bâtir un autre n'est pas un échange qui vaille. gold est retiré et la liste de cibles ne garde que bpf-unknown-none. Ce qui est perdu est /usr/bin/ld.gold, que rien ici n'invoque. Consigné plutôt que masqué : le binutils d'étage 2 ne correspondra pas à la liste de fichiers d'Arch, et voici pourquoi. Assisted-by: Claude Opus 5
2026-08-23 19:48:19 -04:00
# *** Specify --enable-obsolete to build it anyway.
# *** Support will be REMOVED in the next major release of BINUTILS,
# *** unless a maintainer comes forward.
[FIX] binutils' extra targets were x86_64's, and gcc only wanted man pages gold failed to link with s390.cc: undefined reference to `void gold::gold_error_at_location<32, true>' Its s390 target file compiles code for both s390 and s390x and references <32, true> instantiations, which exist only when a 32-bit s390 target is configured. The PKGBUILD asks for --enable-targets=x86_64-pep,bpf-unknown-none. x86_64-pep is the PE+ target for x86_64: it means nothing here, and on x86_64 it is what happens to bring in the 32-bit instantiations gold's target files want. So this was never a gold bug -- it is the -march=x86-64 story one layer further in. s390-linux-gnu is the honest translation of that line. gcc now compiles, Fortran front end included, and stopped in package_gcc() on libstdc++'s doxygen man pages -- two places, build and install, the eighth time this port has met that shape. --- FR --- gold ne se liait pas : s390.cc: undefined reference to `void gold::gold_error_at_location<32, true>' Son fichier de cible s390 compile pour s390 et s390x et référence des instanciations <32, true>, qui n'existent que si une cible s390 32 bits est configurée. Le PKGBUILD demande --enable-targets=x86_64-pep,bpf-unknown-none. x86_64-pep est la cible PE+ d'x86_64 : elle ne veut rien dire ici, et sur x86_64 c'est elle qui amène par hasard les instanciations 32 bits que gold réclame. Ce n'était donc pas un défaut de gold — c'est l'histoire du -march=x86-64 une couche plus loin. s390-linux-gnu est la traduction honnête de cette ligne. gcc compile désormais, front-end Fortran compris, et s'arrêtait dans package_gcc() sur les pages de manuel doxygen de libstdc++ — deux endroits, construction et installation, huitième fois que ce portage rencontre cette forme. Assisted-by: Claude Opus 5
2026-08-22 21:52:39 -04:00
#
[FIX] binutils: gold's s390 support needs a target binutils is deleting This section was written twice, and the first version was wrong instructively. gold would not link: s390.cc references gold::gold_error_at_location<32, true>, and those instantiations exist only when a 32-bit s390 target is configured. The PKGBUILD asked for --enable-targets=x86_64-pep, so the first fix translated that to s390-linux-gnu -- the honest-looking equivalent. bfd's configure answered: *** Specify --enable-obsolete to build it anyway. *** Support will be REMOVED in the next major release of BINUTILS, *** unless a maintainer comes forward. 32-bit s390 is obsolete in binutils. So gold cannot be built here without enabling a target upstream has announced it is deleting -- and gold is itself deprecated, with bfd ld already the default (--enable-ld=default). Turning on one deprecated thing to build another is not a trade worth making. gold is dropped and the extra target list keeps only bpf-unknown-none. What is lost is /usr/bin/ld.gold, which nothing here invokes. Recorded rather than hidden: the stage-2 binutils will not match Arch's file list, and this is why. --- FR --- Cette section a été écrite deux fois, et la première version se trompait de façon instructive. gold ne se liait pas : s390.cc référence gold::gold_error_at_location<32, true>, instanciations qui n'existent que si une cible s390 32 bits est configurée. Le PKGBUILD demandait --enable-targets=x86_64-pep, donc le premier correctif l'a traduit en s390-linux-gnu — l'équivalent d'apparence honnête. Le configure de bfd a répondu : *** Specify --enable-obsolete to build it anyway. *** Support will be REMOVED in the next major release of BINUTILS, *** unless a maintainer comes forward. Le s390 32 bits est obsolète dans binutils. gold ne peut donc pas être bâti ici sans activer une cible dont l'amont annonce la suppression — et gold est lui-même abandonné, ld de bfd étant déjà le défaut (--enable-ld=default). Activer un objet déprécié pour en bâtir un autre n'est pas un échange qui vaille. gold est retiré et la liste de cibles ne garde que bpf-unknown-none. Ce qui est perdu est /usr/bin/ld.gold, que rien ici n'invoque. Consigné plutôt que masqué : le binutils d'étage 2 ne correspondra pas à la liste de fichiers d'Arch, et voici pourquoi. Assisted-by: Claude Opus 5
2026-08-23 19:48:19 -04:00
# 32-bit s390 is OBSOLETE in binutils. So gold on s390x cannot be built without
# enabling a target upstream has announced it is deleting -- and gold itself is
# deprecated, with bfd ld the default here already (--enable-ld=default). Turning
# on one deprecated thing to build another is not a trade worth making.
[FIX] binutils' extra targets were x86_64's, and gcc only wanted man pages gold failed to link with s390.cc: undefined reference to `void gold::gold_error_at_location<32, true>' Its s390 target file compiles code for both s390 and s390x and references <32, true> instantiations, which exist only when a 32-bit s390 target is configured. The PKGBUILD asks for --enable-targets=x86_64-pep,bpf-unknown-none. x86_64-pep is the PE+ target for x86_64: it means nothing here, and on x86_64 it is what happens to bring in the 32-bit instantiations gold's target files want. So this was never a gold bug -- it is the -march=x86-64 story one layer further in. s390-linux-gnu is the honest translation of that line. gcc now compiles, Fortran front end included, and stopped in package_gcc() on libstdc++'s doxygen man pages -- two places, build and install, the eighth time this port has met that shape. --- FR --- gold ne se liait pas : s390.cc: undefined reference to `void gold::gold_error_at_location<32, true>' Son fichier de cible s390 compile pour s390 et s390x et référence des instanciations <32, true>, qui n'existent que si une cible s390 32 bits est configurée. Le PKGBUILD demande --enable-targets=x86_64-pep,bpf-unknown-none. x86_64-pep est la cible PE+ d'x86_64 : elle ne veut rien dire ici, et sur x86_64 c'est elle qui amène par hasard les instanciations 32 bits que gold réclame. Ce n'était donc pas un défaut de gold — c'est l'histoire du -march=x86-64 une couche plus loin. s390-linux-gnu est la traduction honnête de cette ligne. gcc compile désormais, front-end Fortran compris, et s'arrêtait dans package_gcc() sur les pages de manuel doxygen de libstdc++ — deux endroits, construction et installation, huitième fois que ce portage rencontre cette forme. Assisted-by: Claude Opus 5
2026-08-22 21:52:39 -04:00
#
[FIX] binutils: gold's s390 support needs a target binutils is deleting This section was written twice, and the first version was wrong instructively. gold would not link: s390.cc references gold::gold_error_at_location<32, true>, and those instantiations exist only when a 32-bit s390 target is configured. The PKGBUILD asked for --enable-targets=x86_64-pep, so the first fix translated that to s390-linux-gnu -- the honest-looking equivalent. bfd's configure answered: *** Specify --enable-obsolete to build it anyway. *** Support will be REMOVED in the next major release of BINUTILS, *** unless a maintainer comes forward. 32-bit s390 is obsolete in binutils. So gold cannot be built here without enabling a target upstream has announced it is deleting -- and gold is itself deprecated, with bfd ld already the default (--enable-ld=default). Turning on one deprecated thing to build another is not a trade worth making. gold is dropped and the extra target list keeps only bpf-unknown-none. What is lost is /usr/bin/ld.gold, which nothing here invokes. Recorded rather than hidden: the stage-2 binutils will not match Arch's file list, and this is why. --- FR --- Cette section a été écrite deux fois, et la première version se trompait de façon instructive. gold ne se liait pas : s390.cc référence gold::gold_error_at_location<32, true>, instanciations qui n'existent que si une cible s390 32 bits est configurée. Le PKGBUILD demandait --enable-targets=x86_64-pep, donc le premier correctif l'a traduit en s390-linux-gnu — l'équivalent d'apparence honnête. Le configure de bfd a répondu : *** Specify --enable-obsolete to build it anyway. *** Support will be REMOVED in the next major release of BINUTILS, *** unless a maintainer comes forward. Le s390 32 bits est obsolète dans binutils. gold ne peut donc pas être bâti ici sans activer une cible dont l'amont annonce la suppression — et gold est lui-même abandonné, ld de bfd étant déjà le défaut (--enable-ld=default). Activer un objet déprécié pour en bâtir un autre n'est pas un échange qui vaille. gold est retiré et la liste de cibles ne garde que bpf-unknown-none. Ce qui est perdu est /usr/bin/ld.gold, que rien ici n'invoque. Consigné plutôt que masqué : le binutils d'étage 2 ne correspondra pas à la liste de fichiers d'Arch, et voici pourquoi. Assisted-by: Claude Opus 5
2026-08-23 19:48:19 -04:00
# So: gold is dropped, and the extra target list keeps only bpf-unknown-none,
# which is architecture-neutral. x86_64-pep goes because it names a format for a
# machine this is not.
#
# WHAT IS LOST: /usr/bin/ld.gold. Nothing in this port invokes it, ld is the
# default, and upstream is removing gold. Recorded rather than hidden -- the
# stage-2 binutils will not match Arch's file list, and this is why.
[FIX] binutils' extra targets were x86_64's, and gcc only wanted man pages gold failed to link with s390.cc: undefined reference to `void gold::gold_error_at_location<32, true>' Its s390 target file compiles code for both s390 and s390x and references <32, true> instantiations, which exist only when a 32-bit s390 target is configured. The PKGBUILD asks for --enable-targets=x86_64-pep,bpf-unknown-none. x86_64-pep is the PE+ target for x86_64: it means nothing here, and on x86_64 it is what happens to bring in the 32-bit instantiations gold's target files want. So this was never a gold bug -- it is the -march=x86-64 story one layer further in. s390-linux-gnu is the honest translation of that line. gcc now compiles, Fortran front end included, and stopped in package_gcc() on libstdc++'s doxygen man pages -- two places, build and install, the eighth time this port has met that shape. --- FR --- gold ne se liait pas : s390.cc: undefined reference to `void gold::gold_error_at_location<32, true>' Son fichier de cible s390 compile pour s390 et s390x et référence des instanciations <32, true>, qui n'existent que si une cible s390 32 bits est configurée. Le PKGBUILD demande --enable-targets=x86_64-pep,bpf-unknown-none. x86_64-pep est la cible PE+ d'x86_64 : elle ne veut rien dire ici, et sur x86_64 c'est elle qui amène par hasard les instanciations 32 bits que gold réclame. Ce n'était donc pas un défaut de gold — c'est l'histoire du -march=x86-64 une couche plus loin. s390-linux-gnu est la traduction honnête de cette ligne. gcc compile désormais, front-end Fortran compris, et s'arrêtait dans package_gcc() sur les pages de manuel doxygen de libstdc++ — deux endroits, construction et installation, huitième fois que ce portage rencontre cette forme. Assisted-by: Claude Opus 5
2026-08-22 21:52:39 -04:00
set -euo pipefail
python3 - <<'ZZPY'
[FIX] binutils: gold's s390 support needs a target binutils is deleting This section was written twice, and the first version was wrong instructively. gold would not link: s390.cc references gold::gold_error_at_location<32, true>, and those instantiations exist only when a 32-bit s390 target is configured. The PKGBUILD asked for --enable-targets=x86_64-pep, so the first fix translated that to s390-linux-gnu -- the honest-looking equivalent. bfd's configure answered: *** Specify --enable-obsolete to build it anyway. *** Support will be REMOVED in the next major release of BINUTILS, *** unless a maintainer comes forward. 32-bit s390 is obsolete in binutils. So gold cannot be built here without enabling a target upstream has announced it is deleting -- and gold is itself deprecated, with bfd ld already the default (--enable-ld=default). Turning on one deprecated thing to build another is not a trade worth making. gold is dropped and the extra target list keeps only bpf-unknown-none. What is lost is /usr/bin/ld.gold, which nothing here invokes. Recorded rather than hidden: the stage-2 binutils will not match Arch's file list, and this is why. --- FR --- Cette section a été écrite deux fois, et la première version se trompait de façon instructive. gold ne se liait pas : s390.cc référence gold::gold_error_at_location<32, true>, instanciations qui n'existent que si une cible s390 32 bits est configurée. Le PKGBUILD demandait --enable-targets=x86_64-pep, donc le premier correctif l'a traduit en s390-linux-gnu — l'équivalent d'apparence honnête. Le configure de bfd a répondu : *** Specify --enable-obsolete to build it anyway. *** Support will be REMOVED in the next major release of BINUTILS, *** unless a maintainer comes forward. Le s390 32 bits est obsolète dans binutils. gold ne peut donc pas être bâti ici sans activer une cible dont l'amont annonce la suppression — et gold est lui-même abandonné, ld de bfd étant déjà le défaut (--enable-ld=default). Activer un objet déprécié pour en bâtir un autre n'est pas un échange qui vaille. gold est retiré et la liste de cibles ne garde que bpf-unknown-none. Ce qui est perdu est /usr/bin/ld.gold, que rien ici n'invoque. Consigné plutôt que masqué : le binutils d'étage 2 ne correspondra pas à la liste de fichiers d'Arch, et voici pourquoi. Assisted-by: Claude Opus 5
2026-08-23 19:48:19 -04:00
import io, re
lines = io.open("PKGBUILD", encoding="utf-8").read().split("\n")
t = [i for i, l in enumerate(lines) if "--enable-targets=" in l]
assert len(t) == 1, "binutils: expected one --enable-targets, got %d" % len(t)
assert "x86_64-pep" in lines[t[0]], "binutils: --enable-targets is not the x86 one: %r" % lines[t[0]]
lines[t[0]] = lines[t[0]].replace("x86_64-pep,", "")
g = [i for i, l in enumerate(lines) if re.match(r"^[ \t]*--enable-gold[ \t]*\\?$", l)]
assert len(g) == 1, "binutils: expected one --enable-gold line, got %d" % len(g)
lines[g[0]] = lines[g[0]].replace("--enable-gold", "--disable-gold")
io.open("PKGBUILD", "w", encoding="utf-8").write("\n".join(lines))
[FIX] binutils' extra targets were x86_64's, and gcc only wanted man pages gold failed to link with s390.cc: undefined reference to `void gold::gold_error_at_location<32, true>' Its s390 target file compiles code for both s390 and s390x and references <32, true> instantiations, which exist only when a 32-bit s390 target is configured. The PKGBUILD asks for --enable-targets=x86_64-pep,bpf-unknown-none. x86_64-pep is the PE+ target for x86_64: it means nothing here, and on x86_64 it is what happens to bring in the 32-bit instantiations gold's target files want. So this was never a gold bug -- it is the -march=x86-64 story one layer further in. s390-linux-gnu is the honest translation of that line. gcc now compiles, Fortran front end included, and stopped in package_gcc() on libstdc++'s doxygen man pages -- two places, build and install, the eighth time this port has met that shape. --- FR --- gold ne se liait pas : s390.cc: undefined reference to `void gold::gold_error_at_location<32, true>' Son fichier de cible s390 compile pour s390 et s390x et référence des instanciations <32, true>, qui n'existent que si une cible s390 32 bits est configurée. Le PKGBUILD demande --enable-targets=x86_64-pep,bpf-unknown-none. x86_64-pep est la cible PE+ d'x86_64 : elle ne veut rien dire ici, et sur x86_64 c'est elle qui amène par hasard les instanciations 32 bits que gold réclame. Ce n'était donc pas un défaut de gold — c'est l'histoire du -march=x86-64 une couche plus loin. s390-linux-gnu est la traduction honnête de cette ligne. gcc compile désormais, front-end Fortran compris, et s'arrêtait dans package_gcc() sur les pages de manuel doxygen de libstdc++ — deux endroits, construction et installation, huitième fois que ce portage rencontre cette forme. Assisted-by: Claude Opus 5
2026-08-22 21:52:39 -04:00
ZZPY
[FIX] binutils: gold's s390 support needs a target binutils is deleting This section was written twice, and the first version was wrong instructively. gold would not link: s390.cc references gold::gold_error_at_location<32, true>, and those instantiations exist only when a 32-bit s390 target is configured. The PKGBUILD asked for --enable-targets=x86_64-pep, so the first fix translated that to s390-linux-gnu -- the honest-looking equivalent. bfd's configure answered: *** Specify --enable-obsolete to build it anyway. *** Support will be REMOVED in the next major release of BINUTILS, *** unless a maintainer comes forward. 32-bit s390 is obsolete in binutils. So gold cannot be built here without enabling a target upstream has announced it is deleting -- and gold is itself deprecated, with bfd ld already the default (--enable-ld=default). Turning on one deprecated thing to build another is not a trade worth making. gold is dropped and the extra target list keeps only bpf-unknown-none. What is lost is /usr/bin/ld.gold, which nothing here invokes. Recorded rather than hidden: the stage-2 binutils will not match Arch's file list, and this is why. --- FR --- Cette section a été écrite deux fois, et la première version se trompait de façon instructive. gold ne se liait pas : s390.cc référence gold::gold_error_at_location<32, true>, instanciations qui n'existent que si une cible s390 32 bits est configurée. Le PKGBUILD demandait --enable-targets=x86_64-pep, donc le premier correctif l'a traduit en s390-linux-gnu — l'équivalent d'apparence honnête. Le configure de bfd a répondu : *** Specify --enable-obsolete to build it anyway. *** Support will be REMOVED in the next major release of BINUTILS, *** unless a maintainer comes forward. Le s390 32 bits est obsolète dans binutils. gold ne peut donc pas être bâti ici sans activer une cible dont l'amont annonce la suppression — et gold est lui-même abandonné, ld de bfd étant déjà le défaut (--enable-ld=default). Activer un objet déprécié pour en bâtir un autre n'est pas un échange qui vaille. gold est retiré et la liste de cibles ne garde que bpf-unknown-none. Ce qui est perdu est /usr/bin/ld.gold, que rien ici n'invoque. Consigné plutôt que masqué : le binutils d'étage 2 ne correspondra pas à la liste de fichiers d'Arch, et voici pourquoi. Assisted-by: Claude Opus 5
2026-08-23 19:48:19 -04:00
grep -q "x86_64-pep" PKGBUILD && { echo "binutils: an x86_64 target survived" >&2; exit 1; }
grep -q -- "--disable-gold" PKGBUILD || { echo "binutils: gold not disabled" >&2; exit 1; }
grep -q -- "--enable-gold" PKGBUILD && { echo "binutils: gold still enabled" >&2; exit 1; }
echo "binutils: gold dropped (its s390 support needs an obsolete target)"
[FIX] binutils records a usr/lib64 path, and cmake deletes html it did not make pacman refused the rebuilt binutils: binutils: <root>/usr/lib64 exists in filesystem (owned by filesystem) binutils: <root>/usr/lib64/libiberty.a exists in filesystem --libdir=/usr/lib was not enough. libiberty installs into $(libdir)$(MULTIOSSUBDIR), and gcc reports ../lib64 for -print-multi-os-directory on s390x. In the installed system that resolves through the symlink filesystem now provides, so the file lands in /usr/lib -- but pkgdir has no symlink, so make creates a real pkg/usr/lib64/ and makepkg records the literal path. The two fixes are not alternatives: the symlink is what keeps meson and cmake choosing lib, and this moves the one file that still writes through the multi-os subdirectory. cmake is the eleventh instance of removing a documentation build and leaving its cleanup: with Sphinx off there is no html, and the PKGBUILD deletes _sources from it. rm -rf rather than deleted -- on a machine with Sphinx it is real. The binutils hook also assumed package_binutils(). binutils is not a split package; its own assertion caught that. --- FR --- pacman a refusé le binutils reconstruit : binutils: <root>/usr/lib64 exists in filesystem (owned by filesystem) binutils: <root>/usr/lib64/libiberty.a exists in filesystem --libdir=/usr/lib ne suffisait pas. libiberty s'installe dans $(libdir)$(MULTIOSSUBDIR), et gcc annonce ../lib64 pour -print-multi-os-directory sur s390x. Dans le système installé cela se résout par le lien que filesystem fournit désormais, donc le fichier atterrit dans /usr/lib — mais pkgdir n'a pas de lien : make crée un vrai pkg/usr/lib64/ et makepkg enregistre le chemin littéral. Les deux correctifs ne sont pas des alternatives : le lien est ce qui fait choisir lib à meson et cmake, et celui-ci déplace le seul fichier qui écrive encore par le sous-répertoire multi-os. cmake est la onzième occurrence du retrait d'une documentation sans son nettoyage : sans Sphinx il n'y a pas de html, et le PKGBUILD en supprime _sources. rm -rf plutôt que supprimé — sur une machine dotée de Sphinx, il est réel. Le hook binutils supposait aussi package_binutils(). binutils n'est pas un paquet scindé ; sa propre assertion l'a arrêté. Assisted-by: Claude Opus 5
2026-08-23 22:05:26 -04:00
# --- libiberty still records a usr/lib64 path ---------------------------------
#
# --libdir=/usr/lib above is not enough. pacman refused to install the result:
#
# binutils: <root>/usr/lib64 exists in filesystem (owned by filesystem)
# binutils: <root>/usr/lib64/libiberty.a exists in filesystem
#
# libiberty installs into $(libdir)$(MULTIOSSUBDIR), and on s390x gcc reports
# ../lib64 for -print-multi-os-directory. In the INSTALLED system that resolves
# through the symlink the filesystem package now provides, so the file lands in
# /usr/lib -- but pkgdir has no such symlink, so make creates a real
# pkg/usr/lib64/ and makepkg records `usr/lib64/libiberty.a` as the package's
# own path. Installing it then collides with the symlink.
#
# The two fixes are not alternatives: filesystem's symlink is what keeps meson
# and cmake choosing lib, and this moves the one file that still writes through
# the multi-os subdirectory. Done in package(), on pkgdir, so nothing depends on
# the order the two packages are installed in.
python3 - <<'ZZPY'
import io, re
lines = io.open("PKGBUILD", encoding="utf-8").read().split("\n")
# The last package function is where pkgdir is complete.
# package(), not package_binutils(). binutils is NOT a split package here --
# pkgname=binutils, one function -- and the first version of this assumed the
# split form and asserted its way out. Both shapes are in this port; a hook has
# to look.
hit = [i for i, l in enumerate(lines) if re.match(r"^package(_binutils)?\(\)", l)]
assert len(hit) == 1, "binutils: expected one package function, got %d" % len(hit)
# Find that function's closing brace.
i = hit[0] + 1
while i < len(lines) and lines[i] != "}":
i += 1
assert i < len(lines), "binutils: package_binutils() has no closing brace"
lines[i:i] = [
"",
" # libiberty writes through gcc's multi-os subdirectory (../lib64 on",
" # s390x). In the installed system usr/lib64 is a symlink to lib, but pkgdir",
" # has no symlink, so the path is recorded literally and collides with the",
" # filesystem package. Move it to where it resolves to anyway.",
' if [ -d "$pkgdir/usr/lib64" ]; then',
' install -d "$pkgdir/usr/lib"',
' mv "$pkgdir"/usr/lib64/* "$pkgdir/usr/lib/"',
' rmdir "$pkgdir/usr/lib64"',
' fi',
]
io.open("PKGBUILD", "w", encoding="utf-8").write("\n".join(lines))
ZZPY
grep -q 'rmdir "\$pkgdir/usr/lib64"' PKGBUILD || {
echo "binutils: the lib64 move was not inserted" >&2; exit 1; }
echo "binutils: libiberty moved out of usr/lib64"