Bug#1057004: gcc-13: hurd-amd64 support

2023-11-27 Thread Samuel Thibault
Package: gcc-13
Version: 13.2.0-7
Severity: important
Tags: patch
X-Debbugs-Cc: debian-h...@lists.debian.org
User: debian-h...@lists.debian.org
Usertags: hurd

Hello,

The attached patch adds support for hurd-amd64, could you apply it?

The part in hurd-amd64.diff comes from the upstream master commits,
which will thus be included in gcc 14.

The parts in hurd-multiarch.diff and hurd-multilib-multiarch.diff are
for long term, like gcc-multiarch.diff and gcc-multilib-multiarch.diff
for other archs.

Thanks,
Samuel

-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'unreleased'), 
(500, 'testing-debug'), (500, 'stable-security'), (500, 'stable-debug'), (500, 
'oldstable-proposed-updates-debug'), (500, 'oldstable-proposed-updates'), (500, 
'oldoldstable-proposed-updates'), (500, 'oldoldstable'), (500, 
'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 
'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, arm64

Kernel: Linux 6.5.0-1-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gcc-13 depends on:
ii  binutils   2.41-7
ii  cpp-13 13.2.0-7
ii  gcc-13-base13.2.0-7
ii  libc6  2.37-12+b1
ii  libcc1-0   13.2.0-7
ii  libgcc-13-dev  13.2.0-7
ii  libgcc-s1  13.2.0-7
ii  libgmp10   2:6.3.0+dfsg-2
ii  libisl23   0.26-3
ii  libmpc31.3.1-1
ii  libmpfr6   4.2.1-1
ii  libstdc++6 13.2.0-7
ii  libzstd1   1.5.5+dfsg2-2
ii  zlib1g 1:1.2.13.dfsg-3

Versions of packages gcc-13 recommends:
ii  libc6-dev  2.37-12+b1

Versions of packages gcc-13 suggests:
ii  gcc-13-doc   13.2.0-1
pn  gcc-13-locales   
ii  gcc-13-multilib  13.2.0-7

-- no debconf information

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.
diff --git a/debian/patches/hurd-amd64.diff b/debian/patches/hurd-amd64.diff
new file mode 100644
index 000..e7288ea
--- /dev/null
+++ b/debian/patches/hurd-amd64.diff
@@ -0,0 +1,127 @@
+commit 5707e9db9c398d311defc80c5b7822c9a07ead60
+Author: Samuel Thibault 
+Date:   Sat May 6 13:50:36 2023 +0200
+
+hurd: Add multilib paths for gnu-x86_64
+
+We need the multilib paths in gcc to find e.g. glibc crt files on
+Debian.  This is essentially based on t-linux64 version.
+
+gcc/ChangeLog:
+
+* config/i386/t-gnu64: New file.
+* config.gcc [x86_64-*-gnu*]: Add i386/t-gnu64 to
+tmake_file.
+
+commit c768917402d4cba69a92c737e56e177f5b8ab0df
+Author: Samuel Thibault 
+Date:   Sat May 6 13:55:44 2023 +0200
+
+hurd: Ad default-pie and static-pie support
+
+This fixes the Hurd spec in the default-pie case, and adds static-pie
+support.
+
+gcc/ChangeLog:
+
+* config/i386/gnu.h: Use PIE_SPEC, add static-pie case.
+* config/i386/gnu64.h: Use PIE_SPEC, add static-pie case.
+
+diff --git a/src/gcc/config.gcc b/src/gcc/config.gcc
+index 3000379cafc..e62849c1230 100644
+--- a/src/gcc/config.gcc
 b/src/gcc/config.gcc
+@@ -5973,6 +5973,9 @@ case ${target} in
+   visium-*-*)
+   target_cpu_default2="TARGET_CPU_$with_cpu"
+   ;;
++  x86_64-*-gnu*)
++  tmake_file="$tmake_file i386/t-gnu64"
++  ;;
+ esac
+ 
+ t=
+diff --git a/src/gcc/config/i386/t-gnu64 b/src/gcc/config/i386/t-gnu64
+new file mode 100644
+index 000..23ee6823d65
+--- /dev/null
 b/src/gcc/config/i386/t-gnu64
+@@ -0,0 +1,38 @@
++# Copyright (C) 2002-2023 Free Software Foundation, Inc.
++#
++# This file is part of GCC.
++#
++# GCC is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 3, or (at your option)
++# any later version.
++#
++# GCC is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with GCC; see the file COPYING3.  If not see
++# .
++
++# On Debian, Ubuntu and other derivative distributions, the 32bit libraries
++# are found in /lib32 and /usr/lib32, /lib64 and /usr/lib64 are symlinks to
++# /lib and /usr/lib, while other distributions install libraries into /lib64
++# and /usr/lib64.  The LSB does not enforce the use of /lib64 and /usr/lib64,
++# it doesn't tell anything about the 32b

Bug#1053405: darktable: FTBFS on arm64 (gcc bug?)

2023-11-27 Thread Boyuan Yang
On Thu, 5 Oct 2023 08:56:00 +0200 Gianfranco Costamagna
 wrote:
> control: reassign -1 src:gcc-13
> control: found -1 13.2.0-4
> control: affects -1 src:darktable.
> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111677
> According to upstream, we need a patch that was added some days ago on 13
branch

Can we disable openmp support in darktable for now? This bug has been blocking
many transitions (that I care) for way too long.

Thanks,
Boyuan Yang

 
> On Wed, 4 Oct 2023 08:21:31 +0200 Gianfranco Costamagna
 wrote:
> > Hello,
> > 
> > > 
> > > Do you think maybe there should be a debian gcc bug? after all, the
> > > distinction you point to is a difference of debian version.
> > > 
> > 
> > Not really sure, somewhat it fails with gcc-12 too, so it might be
something that was even backported to older gcc, or something else
> > 
> > 
> > For sure, it builds if we disable OPENMP support
> > 
> > diff -Nru darktable-4.4.2/debian/changelog darktable-
4.4.2/debian/changelog
> > --- darktable-4.4.2/debian/changelog2023-08-20 12:26:40.0
+
> > +++ darktable-4.4.2/debian/changelog2023-10-03 15:58:01.0
+
> > @@ -1,3 +1,10 @@
> > +darktable (4.4.2-1.1) unstable; urgency=medium
> > +
> > +  * Disable openmp for arm64 builds (LP: #2038351)
> > +    See Debian bug: #1053405
> > +
> > + -- Mitchell Dzurick   Tue, 03 Oct 2023
08:58:01 -0700
> > +
> >   darktable (4.4.2-1) unstable; urgency=medium
> >   
> > * Update to new upstream version 4.4.2.
> > diff -Nru darktable-4.4.2/debian/rules darktable-4.4.2/debian/rules
> > --- darktable-4.4.2/debian/rules2023-08-20 12:26:40.0 +
> > +++ darktable-4.4.2/debian/rules2023-10-03 15:58:01.0 +
> > @@ -20,7 +20,12 @@
> > dh $@
> >   
> >   override_dh_auto_configure: cmake/version.cmake
> > +ifeq ($(DEB_HOST_ARCH),arm64)
> > +   # Disable OPENMP for arm64 builds. See LP: #2038351
> > +   dh_auto_configure -- -DBINARY_PACKAGE_BUILD=1 -
DCMAKE_BUILD_TYPE=Release -DRAWSPEED_ENABLE_LTO=ON -DUSE_OPENMP=OFF
> > +else
> > dh_auto_configure -- -DBINARY_PACKAGE_BUILD=1 -
DCMAKE_BUILD_TYPE=Release -DRAWSPEED_ENABLE_LTO=ON
> > +endif
> >   
> >   describe-current-version:
> > git describe --tags upstream | sed 's,^release-,,;s,-,+,;s,-,~,;'



signature.asc
Description: This is a digitally signed message part