On Sun, Sep 21, 2025 at 02:35:34PM +0200, John Paul Adrian Glaubitz wrote:
> Hi,
> 
> On Wed, 2025-03-12 at 15:46 +0200, Adrian Bunk wrote:
> > This is a continuation of #1040062, with two parts:
> > 
> > First, I would appreciate if an x32 porter could take a look
> > and approve that pie-{compile,link}.spec should also be dropped
> > on x32.
> 
> Sure. I'm fine with whatever change gets us to build more packages
> successfully on x32. I also appreciate these efforts, so thank
> you very much!
> 
> > Changing gcc to default to PIE on x32 would likely work,
> > but the current situation with x32 being the only half-PIE
> > architecture due to the random set of packages with
> > hardening=+all being PIE and others not causes breakage.
> 
> Yeah, that mixed configuration sounds like a bad idea.
> 
> > Examples of packages broken due to that:
> > https://buildd.debian.org/freefem++
> > https://buildd.debian.org/gpgme1.0
> > https://buildd.debian.org/gprbuild
> > https://buildd.debian.org/libedlib
> > https://buildd.debian.org/libgpiod
> > https://buildd.debian.org/marisa
> > https://buildd.debian.org/python-pylibacl
> > https://buildd.debian.org/python-pyxattr
> > https://buildd.debian.org/roc-toolkit
> > https://buildd.debian.org/uncalled
> > 
> > It also causes extra work when people workaround this
> > breakage for individual packages:
> > https://bugs.debian.org/1092588
> > https://bugs.debian.org/1095522
> 
> Agreed.
> 
> > Second, even on architectures like m68k and sh4 where the pie
> > specs do not make a difference there is the occasional breakage like
> > https://buildd.debian.org/status/package.php?p=pylsqpack&suite=sid
> > 
> > While this might technically be a bug in a package,
> > obscure breakage only on some of the most exotic ports
> > rarely lead to fixing.
> 
> Agreed. Let's turn it off on architectures where it currently causes
> more problems than it solves.
>...

Guillem, the patch below does:

1. Disable PIE on x32, to fix this mixed half-PIE setup that breaks in 
various places.

2. Also disable PIE on m68k and sh4, these targets do not support PIE at 
all making the spec files claim enabling PIE even though they don't.

Thanks
Adrian

--- dpkg-1.23.1/scripts/Dpkg/Vendor/Debian.pm   2025-12-16 02:50:46.000000000 
+0200
+++ dpkg-1.23.1+test/scripts/Dpkg/Vendor/Debian.pm      2025-12-17 
14:10:07.000000000 +0200
@@ -373,9 +373,9 @@
 
     # Mask features that are not available on certain architectures.
     if (none { $os eq $_ } qw(linux hurd) or
-        any { $cpu eq $_ } qw(alpha hppa ia64)) {
+        any { $cpu eq $_ } qw(alpha hppa ia64 m68k sh4 x32)) {
         # Disabled on non-(linux/hurd).
-        # Disabled on alpha, hppa, ia64.
+        # Disabled on alpha, hppa, ia64, m68k, sh4, x32.
         $use_feature{hardening}{pie} = 0;
     }
     if (any { $cpu eq $_ } qw(ia64 alpha hppa nios2) or $arch eq 'arm') {
File /tmp/RwFA5IWxpQ/dpkg-1.23.1/tests/t-unpack-fifo/pkg-fifo/test-fifo is a 
fifo while file 
/tmp/g7J8Qys7pp/dpkg-1.23.1+test/tests/t-unpack-fifo/pkg-fifo/test-fifo is a 
fifo
File 
/tmp/RwFA5IWxpQ/dpkg-1.23.1/tests/t-unpack-hardlink/pkg-hardlink/test-fifo-link0
 is a fifo while file 
/tmp/g7J8Qys7pp/dpkg-1.23.1+test/tests/t-unpack-hardlink/pkg-hardlink/test-fifo-link0
 is a fifo
File 
/tmp/RwFA5IWxpQ/dpkg-1.23.1/tests/t-unpack-hardlink/pkg-hardlink/test-fifo-link1
 is a fifo while file 
/tmp/g7J8Qys7pp/dpkg-1.23.1+test/tests/t-unpack-hardlink/pkg-hardlink/test-fifo-link1
 is a fifo

Reply via email to