Package: debhelper
Version: 13.11.7
Severity: important
X-Debbugs-Cc: vor...@debian.org

Hi Steve,

I was made aware that your extension to dh_makeshlibs was wrong and
since I happened to upload it, I figured it was my duty to report the
issue.

We may think if time bits as 64bit architectures have 64bit time already
and that's right. However, the converse is wrong. Some 32bit
architectures have 64bit time as well. In particular, Linux mandates a
time64 ABI for new architectures. That happens to cover at least x32,
riscv32 and arc. If new architectures are about to appear later, we
should also assume them to be 64bit time.

Uwe Kleine-König was kind enough to update
https://wiki.debian.org/ArchitectureSpecificsMemo with a column
concerning time_t. He also suggested a test:

    printf '#include <bits/timesize.h>\n__TIMESIZE' | cpp | tail -n1

I ran this for architectures that Debian has cross toolchains for:

    aarch64-linux-gnu-cpp 64
    alpha-linux-gnu-cpp 64
    arc-linux-gnu-cpp 64
    arm-linux-gnueabi-cpp 32
    arm-linux-gnueabihf-cpp 32
    hppa-linux-gnu-cpp 32
    i686-linux-gnu-cpp 32
    m68k-linux-gnu-cpp 32
    mips-linux-gnu-cpp 32
    mips64-linux-gnuabi64-cpp 64
    mips64el-linux-gnuabi64-cpp 64
    mipsel-linux-gnu-cpp 32
    mipsisa32r6-linux-gnu-cpp 32
    mipsisa32r6el-linux-gnu-cpp 32
    mipsisa64r6-linux-gnuabi64-cpp 64
    mipsisa64r6el-linux-gnuabi64-cpp 64
    powerpc-linux-gnu-cpp 32
    powerpc64-linux-gnu-cpp 64
    powerpc64le-linux-gnu-cpp 64
    riscv64-linux-gnu-cpp 64
    s390x-linux-gnu-cpp 64
    sh4-linux-gnu-cpp 32
    sparc64-linux-gnu-cpp 64
    x86_64-linux-gnux32-cpp 64

So I think rather than evaluating the bits here, I think we should
enumerate all architectures that currently are time32 and assume that
all others (and future ones) will be time64. That list would be:

 * arm    <- I know it's dead. Completeness.
 * arm64ilp32
 * armel
 * armhf
 * hppa
 * i386   <- You want to delete this.
 * m68k
 * mips
 * mips32r6
 * mips32r6el
 * mipsel
 * mipsn32
 * mipsn32el
 * powerpc
 * s390
 * sh3
 * sh4
 * sparc

Also notably absent from this list is musl-linux-any, which will be
time64 everywhere.

So I recommend changing that condition from cpu_bits!=32 to a non-member
test of this list.

I'll be doing a debhelper upload soon to change dh_installsystemd.

Helmut

Reply via email to