[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1057004: marked as done (gcc-13: hurd-amd64 support)



Your message dated Sat, 02 Dec 2023 23:04:17 +0000
with message-id <E1r9Z21-004iJV-18@fasolo.debian.org>
and subject line Bug#1057004: fixed in gcc-13 13.2.0-8
has caused the Debian Bug report #1057004,
regarding gcc-13: hurd-amd64 support
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1057004: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1057004
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: gcc-13
Version: 13.2.0-7
Severity: important
Tags: patch
X-Debbugs-Cc: debian-hurd@lists.debian.org
User: debian-hurd@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-base    13.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  libmpc3        1.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   <none>
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 0000000..e7288ea
--- /dev/null
+++ b/debian/patches/hurd-amd64.diff
@@ -0,0 +1,127 @@
+commit 5707e9db9c398d311defc80c5b7822c9a07ead60
+Author: Samuel Thibault <samuel.thibault@gnu.org>
+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 <samuel.thibault@gnu.org>
+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 00000000000..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
++# <http://www.gnu.org/licenses/>.
++
++# 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 32bit libraries on those systems.  Set
++# MULTILIB_OSDIRNAMES according to what is found on the target.
++
++# To support i386, x86-64 and x32 libraries, the directory structrue
++# should be:
++#
++# 	/lib has i386 libraries.
++# 	/lib64 has x86-64 libraries.
++# 	/libx32 has x32 libraries.
++#
++comma=,
++MULTILIB_OPTIONS    = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
++MULTILIB_DIRNAMES   = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
++MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-gnu)
++MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-gnu)
++MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-gnux32)
+
+
+diff --git a/src/gcc/config/i386/gnu.h b/src/gcc/config/i386/gnu.h
+index 8dc6d9ee4e3..e776144f96c 100644
+--- a/src/gcc/config/i386/gnu.h
++++ b/src/gcc/config/i386/gnu.h
+@@ -27,12 +27,12 @@ along with GCC.  If not, see <http://www.gnu.org/licenses/>.
+ #undef	STARTFILE_SPEC
+ #if defined HAVE_LD_PIE
+ #define STARTFILE_SPEC \
+-  "%{!shared: %{pg|p|profile:%{static:gcrt0.o%s;:gcrt1.o%s};pie:Scrt1.o%s;static:crt0.o%s;:crt1.o%s}} \
+-   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
++  "%{!shared: %{pg|p|profile:%{static-pie:grcrt0.o%s;static:gcrt0.o%s;:gcrt1.o%s};static-pie:rcrt0.o%s;static:crt0.o%s;" PIE_SPEC ":Scrt1.o%s;:crt1.o%s}} \
++   crti.o%s %{static:crtbeginT.o%s;shared|static-pie|" PIE_SPEC ":crtbeginS.o%s;:crtbegin.o%s}"
+ #else
+ #define STARTFILE_SPEC \
+   "%{!shared: %{pg|p|profile:%{static:gcrt0.o%s;:gcrt1.o%s};static:crt0.o%s;:crt1.o%s}} \
+-   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
++   crti.o%s %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}"
+ #endif
+ 
+ #ifdef TARGET_LIBC_PROVIDES_SSP
+diff --git a/src/gcc/config/i386/gnu64.h b/src/gcc/config/i386/gnu64.h
+index a411f0e802a..332372fa067 100644
+--- a/src/gcc/config/i386/gnu64.h
++++ b/src/gcc/config/i386/gnu64.h
+@@ -31,10 +31,10 @@ along with GCC.  If not, see <http://www.gnu.org/licenses/>.
+ #undef	STARTFILE_SPEC
+ #if defined HAVE_LD_PIE
+ #define STARTFILE_SPEC \
+-  "%{!shared: %{pg|p|profile:%{static:gcrt0.o%s;:gcrt1.o%s};pie:Scrt1.o%s;static:crt0.o%s;:crt1.o%s}} \
+-   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
++  "%{!shared: %{pg|p|profile:%{static-pie:grcrt0.o%s;static:gcrt0.o%s;:gcrt1.o%s};static-pie:rcrt0.o%s;static:crt0.o%s;" PIE_SPEC ":Scrt1.o%s;:crt1.o%s}} \
++   crti.o%s %{static:crtbeginT.o%s;shared|static-pie|" PIE_SPEC ":crtbeginS.o%s;:crtbegin.o%s}"
+ #else
+ #define STARTFILE_SPEC \
+   "%{!shared: %{pg|p|profile:%{static:gcrt0.o%s;:gcrt1.o%s};static:crt0.o%s;:crt1.o%s}} \
+-   crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
++   crti.o%s %{static:crtbeginT.o%s;shared|static-pie|" PIE_SPEC ":crtbeginS.o%s;:crtbegin.o%s}"
+ #endif
diff --git a/debian/patches/hurd-multiarch.diff b/debian/patches/hurd-multiarch.diff
new file mode 100644
index 0000000..d814c6e
--- /dev/null
+++ b/debian/patches/hurd-multiarch.diff
@@ -0,0 +1,16 @@
+--- a/src/gcc/config/i386/t-gnu64	2023-05-06 22:43:39.395795420 +0200
++++ b/src/gcc/config/i386/t-gnu64	2023-05-06 22:43:39.395795420 +0200
+@@ -36,3 +36,13 @@
+ MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-gnu)
+ MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-gnu)
+ MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-gnux32)
++
++ifneq (,$(findstring x86_64,$(target)))
++  ifneq (,$(findstring biarchx32.h,$(tm_include_list)))
++  MULTIARCH_DIRNAME = $(call if_multiarch,x86_64-gnux32)
++  else
++  MULTIARCH_DIRNAME = $(call if_multiarch,x86_64-gnu)
++  endif
++else
++  MULTIARCH_DIRNAME = $(call if_multiarch,i386-gnu)
++endif
diff --git a/debian/patches/hurd-multilib-multiarch.diff b/debian/patches/hurd-multilib-multiarch.diff
new file mode 100644
index 0000000..6975ce8
--- /dev/null
+++ b/debian/patches/hurd-multilib-multiarch.diff
@@ -0,0 +1,23 @@
+--- a/src/gcc/config/i386/t-gnu64	2023-05-06 22:43:39.395795420 +0200
++++ b/src/gcc/config/i386/t-gnu64	2023-05-06 22:43:39.395795420 +0200
+@@ -33,9 +33,19 @@
+ comma=,
+ MULTILIB_OPTIONS    = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
+ MULTILIB_DIRNAMES   = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
++ifneq (,$(findstring gnux32,$(target)))
+ MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-gnu)
+-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-gnu)
++MULTILIB_OSDIRNAMES+= m32=../lib32$(call if_multiarch,:i386-gnu)
++MULTILIB_OSDIRNAMES+= mx32=../lib$(call if_multiarch,:x86_64-gnux32)
++else ifneq (,$(findstring x86_64,$(target)))
++MULTILIB_OSDIRNAMES = m64=../lib$(call if_multiarch,:x86_64-gnu)
++MULTILIB_OSDIRNAMES+= m32=../lib32$(call if_multiarch,:i386-gnu)
+ MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-gnux32)
++else
++MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-gnu)
++MULTILIB_OSDIRNAMES+= m32=../lib$(call if_multiarch,:i386-gnu)
++MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-gnux32)
++endif
+ 
+ ifneq (,$(findstring x86_64,$(target)))
+   ifneq (,$(findstring biarchx32.h,$(tm_include_list)))
diff --git a/debian/rules.patch b/debian/rules.patch
index 213dafd..a762ac0 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -203,6 +203,9 @@ endif
 
 ifeq ($(DEB_TARGET_ARCH_OS),hurd)
   debian_patches += hurd-changes
+  debian_patches += hurd-amd64
+  debian_patches += hurd-multiarch
+  debian_patches += hurd-multilib-multiarch
   # FIXME: #1005297, PR 104660
   debian_patches += libgo-hurd-hack
 endif

--- End Message ---
--- Begin Message ---
Source: gcc-13
Source-Version: 13.2.0-8
Done: Matthias Klose <doko@debian.org>

We believe that the bug you reported is fixed in the latest version of
gcc-13, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1057004@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Matthias Klose <doko@debian.org> (supplier of updated gcc-13 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sat, 02 Dec 2023 23:46:29 +0100
Source: gcc-13
Architecture: source
Version: 13.2.0-8
Distribution: unstable
Urgency: medium
Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
Changed-By: Matthias Klose <doko@debian.org>
Closes: 1056769 1057004
Changes:
 gcc-13 (13.2.0-8) unstable; urgency=medium
 .
   * Update to git 20231202 from the gcc-13 branch.
     - Fix PR middle-end/111497, PR tree-optimization/111465,
       PR tree-optimization/111137, PR c++/111703, PR c++/107939, PR c++/112269,
       PR fortran/111880, PR fortran/112764, PR libstdc++/112607.
   * Add changes for hurd-amd64 (Samuel Thibault). Closes: #1057004.
   * Remove references to obsolete CPUs m32r and tilegx. Closes: #1056769.
   * Make the libsframe and gprofng toplevel directories known.
   * Build the nvptx offload compiler on arm64.
   * Add support to build from a combined binutils/GCC tree.
Checksums-Sha1:
 317931f29316e7045adf34d4b3a7b8467a41f6c3 27262 gcc-13_13.2.0-8.dsc
 7953527d7eb3333026f99ef9c048c78d76ec32d8 1727980 gcc-13_13.2.0-8.debian.tar.xz
 cd6edf1a861703b0b8dc2d3325183ed9535b8ed0 9633 gcc-13_13.2.0-8_source.buildinfo
Checksums-Sha256:
 311479f2fc0fc1c768d017e34cc1d598d4db2b7b1e80fe5c29596f0743a15f1d 27262 gcc-13_13.2.0-8.dsc
 6b2f14d2070755aef55a64cbecc3ecff0be3bedfa5fd4f068b7db83171f94802 1727980 gcc-13_13.2.0-8.debian.tar.xz
 9449a99ac8c6dcb941aeffd7c86af5000e22ff996a774b4560de928ad903d337 9633 gcc-13_13.2.0-8_source.buildinfo
Files:
 df7aecdf8fc7d64def294ddb2f10c5aa 27262 devel optional gcc-13_13.2.0-8.dsc
 2b43ad492d2af795e73e07d13669c2fc 1727980 devel optional gcc-13_13.2.0-8.debian.tar.xz
 cce67c1c4a0c6e5d5208610a4ec5c3cf 9633 devel optional gcc-13_13.2.0-8_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJEBAEBCgAuFiEE1WVxuIqLuvFAv2PWvX6qYHePpvUFAmVrtAQQHGRva29AZGVi
aWFuLm9yZwAKCRC9fqpgd4+m9UlrD/9vNkIj3NuAjglR8gPUS6KZ+sNsfd2Y4PRt
QZSJeGd2DPknLMpoXmiIPQm/0tWY/Q+7e3qMYHDFUUHaXsUraiZy7L3gMkDWHn9E
9JbhH7+dluGuagF8XRLlAeyXoecp7g0AkrgxFpxXbEtj16nH1uvNR5BlMdQs+acI
d0tNid6a4j8kbwNc3jUzLqLjwcxW8+dS3t3YmrVe9ZmPTIfD+d7yFnjoVmQq1vun
mUtW6EZFEkDFIsXlfKo39qd8pnwZ7Vun3PlPXOulSar09rKRf7+MbuNcd7ph42rm
2zjgQoKFszEuISk/A3+UGVTdgzUoImqf1Y4w99znKaeW9sZ5FFOqc5DehAR78gsN
u8UP1YM/UGjgfMbGwRlLxQuUr/vb/hYrwoNOFPcfNds8mxosvupdd1t1/51w2iqW
wine/7jEOTTo9ES1PKTbgBskCG3OPMSc3xE8ZOT0my2bJA5WI3BLoKzfGZ86kpLv
Fh61GNHTrP/dUBEDy46i0HNyPGjTr8DuAeWLh1oLgh2edKuDHPWU0CAbat+mBasr
QhGWYk9B+BETWkXwjCN+87kzTPZfHkBULSpGRSWlv0FBSFiCm1ubJ5wQRfC0FmqU
c1rSDLdLkqrf9Qar+rWLuoeBxevbsPRsQnrSkkVi++aIutLO9y7WDEHXBSV6kkq/
/m9bFisVBg==
=aJMa
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: