Debian Bug report logs - #369064
gcc: please add support for multiarch

version graph

Package: gcc-4.3; Maintainer for gcc-4.3 is Debian GCC Maintainers <debian-gcc@lists.debian.org>;

Reported by: Aurelien Jarno <aurel32@debian.org>

Date: Sat, 27 May 2006 08:18:05 UTC

Severity: wishlist

Fixed in version 4.3.3-10

Done: Matthias Klose <doko@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, James Troup <james@nocrew.org>:
Bug#369064; Package binutils. Full text and rfc822 format available.

Acknowledgement sent to Aurelien Jarno <aurel32@debian.org>:
New Bug report received and forwarded. Copy sent to James Troup <james@nocrew.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Aurelien Jarno <aurel32@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: binutils: please add support for multiarch
Date: Sat, 27 May 2006 10:16:36 +0200
[Message part 1 (text/plain, inline)]
Package: binutils
Version: 2.16.1cvs20060413-1
Severity: wishlist
Tags: patch

Hi,

Please find attached a patch from Tollef Fog Heen to add multiarch
support to binutils. It adds multiarch directories of the base system
(like (/usr)/lib/x86_64-linux-gnu) to the search path.

Thanks,
Aurelien

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-amd64-k8-smp
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to fr_FR.UTF-8)

Versions of packages binutils depends on:
ii  libc6                         2.3.6-9    GNU C Library: Shared libraries

binutils recommends no packages.

-- debconf information excluded
[124_multiarch.dpatch (application/x-shellscript, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, James Troup <james@nocrew.org>:
Bug#369064; Package binutils. Full text and rfc822 format available.

Acknowledgement sent to Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>:
Extra info received and forwarded to list. Copy sent to James Troup <james@nocrew.org>. Full text and rfc822 format available.

Message #10 received at 369064@bugs.debian.org (full text, mbox):

From: Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>
To: 369064@bugs.debian.org
Subject: Patch for pending NMU of binutils
Date: Wed, 21 Jun 2006 00:48:26 +0200
diff -u binutils-2.16.1cvs20060413/debian/patches/00list binutils-2.16.1cvs20060413/debian/patches/00list
--- binutils-2.16.1cvs20060413/debian/patches/00list
+++ binutils-2.16.1cvs20060413/debian/patches/00list
@@ -8,0 +9 @@
+124_multiarch
diff -u binutils-2.16.1cvs20060413/debian/changelog binutils-2.16.1cvs20060413/debian/changelog
--- binutils-2.16.1cvs20060413/debian/changelog
+++ binutils-2.16.1cvs20060413/debian/changelog
@@ -1,3 +1,10 @@
+binutils (2.16.1cvs20060413-1.1) unstable; urgency=low
+
+  * Non-Maintainer upload
+  * Add multiarch dirs to search path (Closes: #369064)
+
+ -- Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>  Wed, 21 Jun 2006 00:45:01 +0200
+
 binutils (2.16.1cvs20060413-1) unstable; urgency=low
 
   * New upstream CVS snapshot.
only in patch2:
unchanged:
--- binutils-2.16.1cvs20060413.orig/debian/patches/124_multiarch.dpatch
+++ binutils-2.16.1cvs20060413/debian/patches/124_multiarch.dpatch
@@ -0,0 +1,38 @@
+#!/bin/sh -e
+## 124_multiarch.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: Add multiarch directories to the search paths.
+## DP: Author: Tollef Fog Heen <tfheen@debian.org>
+## DP: Upstream status: Debian specific
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+       -patch) patch $patch_opts -p1 < $0;;
+       -unpatch) patch $patch_opts -p1 -R < $0;;
+        *)
+                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+                exit 1;;
+esac
+
+exit 0
+
+@DPATCH@
+--- binutils/ld/genscripts.sh
++++ binutils/ld/genscripts.sh
+@@ -191,7 +191,7 @@
+   esac
+ fi
+ 
+-LIB_SEARCH_DIRS=`echo ${LIB_PATH} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");/g'`
++LIB_SEARCH_DIRS=`echo ${LIB_PATH} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");SEARCH_DIR(\\"\1\\/'${TOOL_LIB}'");/g'`
+ 
+ # We need it for testsuite.
+ set $EMULATION_LIBPATH



Information forwarded to debian-bugs-dist@lists.debian.org, James Troup <james@nocrew.org>:
Bug#369064; Package binutils. Full text and rfc822 format available.

Acknowledgement sent to Matthias Klose <doko@cs.tu-berlin.de>:
Extra info received and forwarded to list. Copy sent to James Troup <james@nocrew.org>. Full text and rfc822 format available.

Message #15 received at 369064@bugs.debian.org (full text, mbox):

From: Matthias Klose <doko@cs.tu-berlin.de>
To: 369064@bugs.debian.org, Aurelien Jarno <aurel32@debian.org>, Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>
Subject: Re: add support for multiarch
Date: Wed, 28 Jun 2006 11:01:53 +0200
The patch looks incomplete. It doesn't look into the libdir for the
non-default architecture. assuming that we drop /usr/lib32 at some
point, the problem fixed in #369052 would show up again. Unsure which
LIBDIR's we want to be searched for binutils-multiarch's ld.

  Matthias



Information forwarded to debian-bugs-dist@lists.debian.org, James Troup <james@nocrew.org>:
Bug#369064; Package binutils. Full text and rfc822 format available.

Acknowledgement sent to Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>:
Extra info received and forwarded to list. Copy sent to James Troup <james@nocrew.org>. Full text and rfc822 format available.

Message #20 received at 369064@bugs.debian.org (full text, mbox):

From: Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>
To: Matthias Klose <doko@cs.tu-berlin.de>
Cc: 369064@bugs.debian.org, Aurelien Jarno <aurel32@debian.org>, Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>
Subject: Re: add support for multiarch
Date: Thu, 29 Jun 2006 05:11:38 +0200
Matthias Klose <doko@cs.tu-berlin.de> writes:

> The patch looks incomplete. It doesn't look into the libdir for the
> non-default architecture. assuming that we drop /usr/lib32 at some
> point, the problem fixed in #369052 would show up again. Unsure which
> LIBDIR's we want to be searched for binutils-multiarch's ld.
>
>   Matthias

The patch in 369052 tells ld to look at lib32 as emulation dir for
lib when doing elf_i386 code so both lib and lib32 are searched. It
does not mean lib32 is included for elf_x86_64, right?

For multiarch ld should search the general (lib) dir and the multiarch
(lib/arch-os-gnu) dir that matches the target type it runs for. I
don't see any need to search /usr/lib/i486-linux-gnu/ when compiling
64 bit code and vice versa.

MfG
        Goswin

PS: The bug and patches for lib32 support are still open in the BTS
although gcc seems to work with lib32 fine now. Are the patches in
binutils or unneeded?



Information forwarded to debian-bugs-dist@lists.debian.org, James Troup <james@nocrew.org>:
Bug#369064; Package binutils. Full text and rfc822 format available.

Acknowledgement sent to Aurelien Jarno <aurel32@debian.org>:
Extra info received and forwarded to list. Copy sent to James Troup <james@nocrew.org>. Full text and rfc822 format available.

Message #25 received at 369064@bugs.debian.org (full text, mbox):

From: Aurelien Jarno <aurel32@debian.org>
To: Matthias Klose <doko@cs.tu-berlin.de>
Cc: 369064@bugs.debian.org, Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>
Subject: Re: add support for multiarch
Date: Thu, 29 Jun 2006 05:45:29 +0200
Matthias Klose wrote:
> The patch looks incomplete. It doesn't look into the libdir for the
> non-default architecture. assuming that we drop /usr/lib32 at some
> point, the problem fixed in #369052 would show up again. Unsure which
> LIBDIR's we want to be searched for binutils-multiarch's ld.

binutils searches for libraries using either its internal list of 
directories, or using /etc/ld.so.conf.

With the current implementation /usr/lib32 should be searched as we are 
doing bi-arch, ie we have a predefinite set of architectures supported 
by the CPU.

For multiarch, the number of non-default architectures is virtually 
infinite, as you can use for example arm binaries on powerpc using qemu. 
That's why you can't add all directories to ld, and you have to use 
/etc/ld.so.conf instead.

Currently the glibc in experimental automatically adds the corresponding 
multiarch directory to /etc/ld.so.conf, so that ld will use it. The 
version in unstable is however broken as it uses /lib/ldconfig/ to do 
the same, which is not understood by other tools. That has to be fixed.

So for my point of view, this patch is complete.

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net



Information forwarded to debian-bugs-dist@lists.debian.org, James Troup <james@nocrew.org>:
Bug#369064; Package binutils. Full text and rfc822 format available.

Acknowledgement sent to Matthias Klose <doko@cs.tu-berlin.de>:
Extra info received and forwarded to list. Copy sent to James Troup <james@nocrew.org>. Full text and rfc822 format available.

Message #30 received at 369064@bugs.debian.org (full text, mbox):

From: Matthias Klose <doko@cs.tu-berlin.de>
To: Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>
Cc: 369064@bugs.debian.org, Aurelien Jarno <aurel32@debian.org>
Subject: Re: add support for multiarch
Date: Thu, 29 Jun 2006 10:43:00 +0200
Goswin von Brederlow writes:
> Matthias Klose <doko@cs.tu-berlin.de> writes:
> 
> > The patch looks incomplete. It doesn't look into the libdir for the
> > non-default architecture. assuming that we drop /usr/lib32 at some
> > point, the problem fixed in #369052 would show up again. Unsure which
> > LIBDIR's we want to be searched for binutils-multiarch's ld.
> >
> >   Matthias
> 
> The patch in 369052 tells ld to look at lib32 as emulation dir for
> lib when doing elf_i386 code so both lib and lib32 are searched. It
> does not mean lib32 is included for elf_x86_64, right?

no, but it doesn't look into /usr/lib/i486-linux-gnu and
/usr/lib/x86_64-linux-gnu at all, or do I miss something?



Information forwarded to debian-bugs-dist@lists.debian.org, James Troup <james@nocrew.org>:
Bug#369064; Package binutils. Full text and rfc822 format available.

Acknowledgement sent to Aurelien Jarno <aurelien@aurel32.net>:
Extra info received and forwarded to list. Copy sent to James Troup <james@nocrew.org>. Full text and rfc822 format available.

Message #35 received at 369064@bugs.debian.org (full text, mbox):

From: Aurelien Jarno <aurelien@aurel32.net>
To: Matthias Klose <doko@cs.tu-berlin.de>
Cc: Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>, 369064@bugs.debian.org, Aurelien Jarno <aurel32@debian.org>
Subject: Re: add support for multiarch
Date: Thu, 29 Jun 2006 10:49:16 +0200
Matthias Klose wrote:
> Goswin von Brederlow writes:
>> Matthias Klose <doko@cs.tu-berlin.de> writes:
>>
>>> The patch looks incomplete. It doesn't look into the libdir for the
>>> non-default architecture. assuming that we drop /usr/lib32 at some
>>> point, the problem fixed in #369052 would show up again. Unsure which
>>> LIBDIR's we want to be searched for binutils-multiarch's ld.
>>>
>>>   Matthias
>> The patch in 369052 tells ld to look at lib32 as emulation dir for
>> lib when doing elf_i386 code so both lib and lib32 are searched. It
>> does not mean lib32 is included for elf_x86_64, right?
> 
> no, but it doesn't look into /usr/lib/i486-linux-gnu and
> /usr/lib/x86_64-linux-gnu at all, or do I miss something?
> 
I haven't time to check now, but I have designed the patch to make 
binutils search into /usr/lib/i486-linux-gnu. For 
/usr/lib/x86_64-linux-gnu, this path is added by installing the 
corresponding glibc.

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net



Information forwarded to debian-bugs-dist@lists.debian.org, James Troup <james@nocrew.org>:
Bug#369064; Package binutils. Full text and rfc822 format available.

Acknowledgement sent to Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>:
Extra info received and forwarded to list. Copy sent to James Troup <james@nocrew.org>. Full text and rfc822 format available.

Message #40 received at 369064@bugs.debian.org (full text, mbox):

From: Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>
To: Matthias Klose <doko@cs.tu-berlin.de>
Cc: Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>, 369064@bugs.debian.org, Aurelien Jarno <aurel32@debian.org>
Subject: Re: add support for multiarch
Date: Thu, 29 Jun 2006 17:34:21 +0200
Matthias Klose <doko@cs.tu-berlin.de> writes:

> Goswin von Brederlow writes:
>> Matthias Klose <doko@cs.tu-berlin.de> writes:
>> 
>> > The patch looks incomplete. It doesn't look into the libdir for the
>> > non-default architecture. assuming that we drop /usr/lib32 at some
>> > point, the problem fixed in #369052 would show up again. Unsure which
>> > LIBDIR's we want to be searched for binutils-multiarch's ld.
>> >
>> >   Matthias
>> 
>> The patch in 369052 tells ld to look at lib32 as emulation dir for
>> lib when doing elf_i386 code so both lib and lib32 are searched. It
>> does not mean lib32 is included for elf_x86_64, right?
>
> no, but it doesn't look into /usr/lib/i486-linux-gnu and
> /usr/lib/x86_64-linux-gnu at all, or do I miss something?

Yeah, I noticed that now too after I moved libc6 into the
i486-linux-gnu dir here. I think the best would be if binutils had
knowledge what specific dir to look into for each target ABI.

But how for example would you differenciate between i486-linux-gnu and
i486-linux-uclibc? Both would be elf_i386 target. Doesn't look like
the multiarch dir can be hardcoded at all.

Should binutils follow all the /lib/ldconfig/* links or all
[/usr]/lib/*-*-*/ or [/usr]/lib/arch-os-*? The first seems more
configurable to the actual system specifics. I don't think any compile
time setting would suffice.


Someone previously said ld would follow /etc/ld.so.conf entires but
that doesn't seem to be the case, at least not for gcc usage:

mrvn@storage:~$ cat /etc/ld.so.conf
/usr/X11R6/lib
/usr/lib/i486-linux-gnu
mrvn@storage:~$ gcc -m32 -O2 -W -Wall -o foo foo.c
/usr/bin/ld: skipping incompatible /usr/bin/../lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/bin/../lib/libc.a when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
/usr/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
mrvn@storage:~$ gcc -m32 -O2 -W -Wall -o foo foo.c -L /usr/lib/i486-linux-gnu/
mrvn@storage:~$ 

Was that just misinformation?

MfG
        Goswin




Information forwarded to debian-bugs-dist@lists.debian.org, James Troup <james@nocrew.org>:
Bug#369064; Package binutils. Full text and rfc822 format available.

Acknowledgement sent to Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>:
Extra info received and forwarded to list. Copy sent to James Troup <james@nocrew.org>. Full text and rfc822 format available.

Message #45 received at 369064@bugs.debian.org (full text, mbox):

From: Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: Matthias Klose <doko@cs.tu-berlin.de>, Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>, 369064@bugs.debian.org, Aurelien Jarno <aurel32@debian.org>
Subject: Re: add support for multiarch
Date: Thu, 29 Jun 2006 22:44:30 +0200
Aurelien Jarno <aurelien@aurel32.net> writes:

> Matthias Klose wrote:
>> Goswin von Brederlow writes:
>>> Matthias Klose <doko@cs.tu-berlin.de> writes:
>>>
>>>> The patch looks incomplete. It doesn't look into the libdir for the
>>>> non-default architecture. assuming that we drop /usr/lib32 at some
>>>> point, the problem fixed in #369052 would show up again. Unsure which
>>>> LIBDIR's we want to be searched for binutils-multiarch's ld.
>>>>
>>>>   Matthias
>>> The patch in 369052 tells ld to look at lib32 as emulation dir for
>>> lib when doing elf_i386 code so both lib and lib32 are searched. It
>>> does not mean lib32 is included for elf_x86_64, right?
>>
>> no, but it doesn't look into /usr/lib/i486-linux-gnu and
>> /usr/lib/x86_64-linux-gnu at all, or do I miss something?
>>
> I haven't time to check now, but I have designed the patch to make
> binutils search into /usr/lib/i486-linux-gnu. For
> /usr/lib/x86_64-linux-gnu, this path is added by installing the
> corresponding glibc.

Just to be clear, what patch and package versions do we talk about
specificaly?

MfG
        Goswin



Information forwarded to debian-bugs-dist@lists.debian.org, James Troup <james@nocrew.org>:
Bug#369064; Package binutils. Full text and rfc822 format available.

Acknowledgement sent to Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>:
Extra info received and forwarded to list. Copy sent to James Troup <james@nocrew.org>. Full text and rfc822 format available.

Message #50 received at 369064@bugs.debian.org (full text, mbox):

From: Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>
To: 369064@bugs.debian.org
Cc: <aurel32@debian.org>, <doko@cs.tu-berlin.de>, Aurelien@informatik.uni-tuebingen.de, Jarno@informatik.uni-tuebingen.de, Klose@informatik.uni-tuebingen.de, Matthias@informatik.uni-tuebingen.de
Subject: This patch IS complete
Date: Mon, 11 Sep 2006 14:26:12 +0200
Hi,

I did some further testing and debugging of the multiarch patch and can
now say for certain that it is complete.

Here is what the patch does:
For every target genscript.sh is called to generate the actual C source file
for that target format. On that call TOOL_LIB will be set to the GNU tripple
for the target format (not the tripplet we build for).

For every dir in LIB_PATH the patch now adds a 'dir/TOOL_LIB' dir. That means
for elf_i386 you get /lib/i386-linux-gnu, /usr/lib/i386-linux-gnu, ...
Similary on elf_x86_64 you get /lib/x86_64-linux-gnu,
/usr/lib/x86_64-linux-gnu, ...


The reason why the patch does not work for /usr/lib/i486-linux-gnu is that
binutils elf_i386 target is build for i386-linux-gnu as it was in sarge.
Either binutils has to chnage its TOOL_LIB or dpkg has to revert to i386.

MfG
	Goswin



Information forwarded to debian-bugs-dist@lists.debian.org, Aurelien Jarno <aurel32@debian.org>, Matthias Klose <doko@cs.tu-berlin.de>, James Troup <james@nocrew.org>:
Bug#369064; Package binutils. Full text and rfc822 format available.

Acknowledgement sent to Goswin Brederlow <brederlo@informatik.uni-tuebingen.de>:
Extra info received and forwarded to list. Copy sent to Aurelien Jarno <aurel32@debian.org>, Matthias Klose <doko@cs.tu-berlin.de>, James Troup <james@nocrew.org>. Full text and rfc822 format available.

Message #55 received at 369064@bugs.debian.org (full text, mbox):

From: Goswin Brederlow <brederlo@informatik.uni-tuebingen.de>
To: Debian Bug Tracking System <369064@bugs.debian.org>
Subject: Updated patch
Date: Mon, 11 Sep 2006 15:58:28 +0200
[Message part 1 (text/plain, inline)]
Package: binutils
Version: 2.17-2
Followup-For: Bug #369064

Hi,

attached is a slightly different rewrite of the patch. I think this
might be more in the existing programming style of genscripts.sh. It
checks for TOOL_LIB to be set and generaly duplicate entries in
LIB_PATH.

The patch also includes a new part for configure.tgt that changes
TOOL_LIB from i386-linux-gnu to i486-linux-gnu for elf_i386 output
following the post sarge change in dpkg and gcc. If you disagree with
this change then just remove that part. Both parts work independantly
from each other.

MfG
	Goswin

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.8-frosties-2
Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-1)

Versions of packages binutils depends on:
ii  libc6                         2.3.6-16   GNU C Library: Shared libraries

binutils recommends no packages.

-- no debconf information
[130_multiarch_dir.dpatch (application/x-shellscript, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, James Troup <james@nocrew.org>:
Bug#369064; Package binutils. Full text and rfc822 format available.

Acknowledgement sent to Aurelien Jarno <aurelien@aurel32.net>:
Extra info received and forwarded to list. Copy sent to James Troup <james@nocrew.org>. Full text and rfc822 format available.

Message #60 received at 369064@bugs.debian.org (full text, mbox):

From: Aurelien Jarno <aurelien@aurel32.net>
To: James Troup <james@nocrew.org>
Cc: Debian Bug Tracking System <369064@bugs.debian.org>
Subject: Multiarch support for binutils
Date: Sun, 29 Apr 2007 00:12:48 +0200
[Message part 1 (text/plain, inline)]
Hi,

Please find attached an updated version of the patch. Tests with a
recent binutils has shown that the i386->i486 part is not needed
anymore.

Could you please fix it as soon as possible? It is the latest missing
part to get a multiarch capable toolchain in Debian.

Thanks,
Aurelien

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net
[130_multiarch_dir.dpatch (text/plain, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#369064; Package binutils. Full text and rfc822 format available.

Acknowledgement sent to James Troup <james@nocrew.org>:
Extra info received and forwarded to list. Full text and rfc822 format available.

Message #65 received at 369064@bugs.debian.org (full text, mbox):

From: James Troup <james@nocrew.org>
To: 369064@bugs.debian.org
Subject: Re: binutils: please add support for multiarch
Date: Thu, 28 Jun 2007 03:43:16 +0100
Aurelien Jarno <aurelien@aurel32.net> writes:

> Hi,
> 
> Please find attached an updated version of the patch. Tests with a
> recent binutils has shown that the i386->i486 part is not needed
> anymore.
> 
> Could you please fix it as soon as possible? It is the latest missing
> part to get a multiarch capable toolchain in Debian.

So, applying this patch results in:

SEARCH_DIR("/usr/i486-linux-gnu/lib32"); SEARCH_DIR("/usr/i486-linux-gnu/lib/i486-linux-gnu"); SEARCH_DIR("/usr/local/lib32"); SEARCH_DIR("/usr/local/lib/i486-linux-gnu"); SEARCH_DIR("/lib32"); SEARCH_DIR("/lib/i486-linux-gnu"); SEARCH_DIR("/usr/lib32"); SEARCH_DIR("/usr/lib/i486-linux-gnu"); SEARCH_DIR("/usr/i486-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");

/usr/i486-linux-gnu/lib/i486-linux-gnu ?

-- 
James



Information forwarded to debian-bugs-dist@lists.debian.org, Aurelien Jarno <aurelien@aurel32.net>, Matthias Klose <doko@cs.tu-berlin.de>, James Troup <james@nocrew.org>:
Bug#369064; Package binutils. Full text and rfc822 format available.

Acknowledgement sent to Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>:
Extra info received and forwarded to list. Copy sent to Aurelien Jarno <aurelien@aurel32.net>, Matthias Klose <doko@cs.tu-berlin.de>, James Troup <james@nocrew.org>. Full text and rfc822 format available.

Message #70 received at 369064@bugs.debian.org (full text, mbox):

From: Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>
To: Debian Bug Tracking System <369064@bugs.debian.org>
Subject: Patch update
Date: Mon, 02 Jul 2007 19:14:35 +0200
[Message part 1 (text/plain, inline)]
Package: binutils
Version: 2.17-3
Followup-For: Bug #369064

Hi,

I added some lines to the patch to avoid search dirs that contain
TOOL_DIR twice, like /usr/i486-linux-gnu/lib/i486-linux-gnu mentioned
in the bugreport.

Note that /usr/<tripplet>/lib/<tripplet> is a combination of
the cross-compile and multi-arch naming schemes.

MfG
	Goswin

-- System Information:
Debian Release: 4.0
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.20.9-xen-1
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages binutils depends on:
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries

binutils recommends no packages.

-- no debconf information
[130_multiarch_dir.dpatch (application/x-shellscript, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, James Troup <james@nocrew.org>:
Bug#369064; Package binutils. Full text and rfc822 format available.

Acknowledgement sent to Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>:
Extra info received and forwarded to list. Copy sent to James Troup <james@nocrew.org>. Full text and rfc822 format available.

Message #75 received at 369064@bugs.debian.org (full text, mbox):

From: Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>
To: Debian Bug Tracking System <369064@bugs.debian.org>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: the i386->i486 part is not needed anymore
Date: Tue, 03 Jul 2007 16:56:36 +0200
Hi,

Aurelien Jarno <aurelien@aurel32.net> wrote:
> Please find attached an updated version of the patch. Tests with a
> recent binutils has shown that the i386->i486 part is not needed
> anymore.

I don't see how that could be true:

$ dpkg -x /var/www/debian/pool/main/b/binutils/binutils_2.17.20070406cvs-2_amd64.deb .

$ rgrep SEARCH .
Binary file ./usr/bin/ld matches
./usr/lib/ldscripts/i386linux.x:SEARCH_DIR("/usr/i386-linux-gnuaout/lib");
./usr/lib/ldscripts/elf_x86_64.xbn:SEARCH_DIR("/usr/x86_64-linux-gnu/lib64"); SEARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); SEARCH_DIR("/usr/x86_64-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
./usr/lib/ldscripts/elf_i386.xsc:SEARCH_DIR("/usr/i386-linux-gnu/lib32"); SEARCH_DIR("/usr/local/lib32"); SEARCH_DIR("/lib32"); SEARCH_DIR("/usr/lib32"); SEARCH_DIR("/usr/i386-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
...

I still only see i386 in there, not i486.

With 130_multiarch_dir applied I get

builddir-single/ld/ldscripts/elf_i386.xbn:SEARCH_DIR("/usr/i386-linux-gnu/lib32"); SEARCH_DIR("/usr/local/lib32"); SEARCH_DIR("/usr/local/lib/i386-linux-gnu"); SEARCH_DIR("/lib32"); SEARCH_DIR("/lib/i386-linux-gnu"); SEARCH_DIR("/usr/lib32"); SEARCH_DIR("/usr/lib/i386-linux-gnu"); SEARCH_DIR("/usr/i386-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");

again, i386 and not i486.



On the other hand on Debian i386:

$ dpkg -x /var/www/debian/pool/main/b/binutils/binutils_2.17.20070406cvs-2_i386.deb .
$ rgrep SEARCH .
Binary file ./usr/bin/ld matches
./usr/lib/ldscripts/i386linux.xn:SEARCH_DIR("/usr/i486-linux-gnuaout/lib");
./usr/lib/ldscripts/i386linux.xbn:SEARCH_DIR("/usr/i486-linux-gnuaout/lib");
./usr/lib/ldscripts/i386linux.x:SEARCH_DIR("/usr/i486-linux-gnuaout/lib");
...
./usr/lib/ldscripts/elf_i386.xsw:SEARCH_DIR("/usr/i486-linux-gnu/lib32"); SEARCH_DIR("/usr/local/lib32"); SEARCH_DIR("/lib32"); SEARCH_DIR("/usr/lib32"); SEARCH_DIR("/usr/i486-linux-gnu/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");

So something is still skewed.

MfG
        Goswin

PS: Nothing to do with multiarch support though. Just becomes noticeable there.



Information forwarded to debian-bugs-dist@lists.debian.org, James Troup <james@nocrew.org>:
Bug#369064; Package binutils. Full text and rfc822 format available.

Acknowledgement sent to Aurelien Jarno <aurelien@aurel32.net>:
Extra info received and forwarded to list. Copy sent to James Troup <james@nocrew.org>. Full text and rfc822 format available.

Message #80 received at 369064@bugs.debian.org (full text, mbox):

From: Aurelien Jarno <aurelien@aurel32.net>
To: Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>
Cc: Debian Bug Tracking System <369064@bugs.debian.org>
Subject: Re: the i386->i486 part is not needed anymore
Date: Tue, 03 Jul 2007 17:24:55 +0200
Goswin von Brederlow a écrit :
> Hi,
> 
> Aurelien Jarno <aurelien@aurel32.net> wrote:
>> Please find attached an updated version of the patch. Tests with a
>> recent binutils has shown that the i386->i486 part is not needed
>> anymore.
> 
> I don't see how that could be true:

The latest version of patch which excludes the cross-compilation
directory seems to be ok, though I haven't found the time to test it yet.

About the i386->i486 part, I don't really understand why we get those
directories, but we really need to understand the problem and not use an
ugly workaround.

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net



Information forwarded to debian-bugs-dist@lists.debian.org, Aurelien Jarno <aurelien@aurel32.net>, James Troup <james@nocrew.org>:
Bug#369064; Package binutils. Full text and rfc822 format available.

Acknowledgement sent to Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>:
Extra info received and forwarded to list. Copy sent to Aurelien Jarno <aurelien@aurel32.net>, James Troup <james@nocrew.org>. Full text and rfc822 format available.

Message #85 received at 369064@bugs.debian.org (full text, mbox):

From: Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>
To: Debian Bug Tracking System <369064@bugs.debian.org>
Subject: Patch update
Date: Thu, 26 Jul 2007 15:56:45 +0200
[Message part 1 (text/plain, inline)]
Package: binutils
Version: 2.17.20070406cvs-2
Followup-For: Bug #369064

Hi,

Attached the multiarch patch and a new patch to change i386 to i486.

MfG
	Goswin

-- System Information:
Debian Release: 4.0
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.20.9-xen-1
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages binutils depends on:
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries

binutils recommends no packages.

-- no debconf information
[130_multiarch_dir.dpatch (application/x-shellscript, attachment)]
[140_amd64_has_i486_subtarget.dpatch (application/x-shellscript, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, James Troup <james@nocrew.org>:
Bug#369064; Package binutils. Full text and rfc822 format available.

Acknowledgement sent to "Hector Oron" <hector.oron@gmail.com>:
Extra info received and forwarded to list. Copy sent to James Troup <james@nocrew.org>. Full text and rfc822 format available.

Message #90 received at 369064@bugs.debian.org (full text, mbox):

From: "Hector Oron" <hector.oron@gmail.com>
To: "Goswin von Brederlow" <goswin-v-b@web.de>
Cc: debian-release@lists.debian.org, debian-devel@lists.debian.org, 369064@bugs.debian.org
Subject: Re: RFH: Multiarch capable toolchain as release goal
Date: Fri, 30 May 2008 19:27:17 +0100
Hello,

Interesting matter ! Multiarch :-)

I have experienced the same treatment from binutils maintainer, he did
not answer to my mails or bug reports (393841,432772). Tired of this
and as it is an upstream matter i sent a patch upstream and it got
accepted. For my surprise, it is very close to 369064 patch for
genscripts.sh.

ld/ChangeLog
2007-12-24  Hector Oron  <hector.oron@gmail.com>
	* genscripts.sh (LIB_PATH): Include both {target_alias} and
	{TOOL_LIB} in the search paths for multilibbed targets.

See patch at http://sourceware.org/ml/binutils/2007-11/msg00239.html

Goswin et al. is it helpful for binutils multiarch for lenny+1 ?

Regards

-- 
 Héctor Orón




Information forwarded to debian-bugs-dist@lists.debian.org, James Troup <james@nocrew.org>:
Bug#369064; Package binutils. Full text and rfc822 format available.

Acknowledgement sent to Matthias Klose <doko@cs.tu-berlin.de>:
Extra info received and forwarded to list. Copy sent to James Troup <james@nocrew.org>. Full text and rfc822 format available.

Message #95 received at 369064@bugs.debian.org (full text, mbox):

From: Matthias Klose <doko@cs.tu-berlin.de>
To: 369064@bugs.debian.org
Cc: control@bugs.debian.org
Subject: Re: binutils: please add support for multiarch
Date: Wed, 18 Jun 2008 21:13:12 +0200
tag 369064 + wontfix
thanks

thanks for bringing this discussion to the binutils ML [1]. According to
upstream this should be done in the compiler, not with linker scripts
in ld (which gold doesn't support). ld shouldn't be used directly for
linking. If packages use ld directly these should care about adding
the correct search path to ld.

  Matthias

[1] http://sourceware.org/ml/binutils/2008-04/msg00412.html




Tags added: wontfix Request was from Matthias Klose <doko@cs.tu-berlin.de> to control@bugs.debian.org. (Wed, 18 Jun 2008 19:15:09 GMT) Full text and rfc822 format available.

Changed Bug title to `gcc: please add support for multiarch' from `binutils: please add support for multiarch'. Request was from Goswin von Brederlow <goswin-v-b@web.de> to control@bugs.debian.org. (Thu, 19 Jun 2008 09:31:51 GMT) Full text and rfc822 format available.

Tags removed: wontfix Request was from Goswin von Brederlow <goswin-v-b@web.de> to control@bugs.debian.org. (Thu, 19 Jun 2008 09:33:11 GMT) Full text and rfc822 format available.

Bug reassigned from package `binutils' to `gcc-4.3'. Request was from Goswin von Brederlow <goswin-v-b@web.de> to control@bugs.debian.org. (Thu, 19 Jun 2008 09:33:13 GMT) Full text and rfc822 format available.

Tags removed: patch Request was from Matthias Klose <doko@cs.tu-berlin.de> to control@bugs.debian.org. (Thu, 19 Jun 2008 13:30:03 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#369064; Package gcc-4.3. Full text and rfc822 format available.

Acknowledgement sent to Goswin von Brederlow <goswin-v-b@web.de>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. Full text and rfc822 format available.

Message #110 received at 369064@bugs.debian.org (full text, mbox):

From: Goswin von Brederlow <goswin-v-b@web.de>
To: 369064@bugs.debian.org
Subject: Patch already in deb but deactivated
Date: Fri, 20 Jun 2008 11:09:29 +0200
Hi,

I believe the gcc source already has a patch for multiarch include and library
directories but they are deactiveated in rules.defs.

Can you comment on the functionality of them?

MfG
        Goswin




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#369064; Package gcc-4.3. Full text and rfc822 format available.

Acknowledgement sent to Matthias Klose <doko@cs.tu-berlin.de>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. Full text and rfc822 format available.

Message #115 received at 369064@bugs.debian.org (full text, mbox):

From: Matthias Klose <doko@cs.tu-berlin.de>
To: Goswin von Brederlow <goswin-v-b@web.de>, 369064@bugs.debian.org
Subject: Re: Bug#369064: Patch already in deb but deactivated
Date: Tue, 24 Jun 2008 02:46:58 +0200
Goswin von Brederlow writes:
> Hi,
> 
> I believe the gcc source already has a patch for multiarch include and library
> directories but they are deactiveated in rules.defs.
> 
> Can you comment on the functionality of them?

no, this one is obsolete. removed in svn.

  Matthias




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#369064; Package gcc-4.3. Full text and rfc822 format available.

Acknowledgement sent to Goswin von Brederlow <goswin-v-b@web.de>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. Full text and rfc822 format available.

Message #120 received at 369064@bugs.debian.org (full text, mbox):

From: Goswin von Brederlow <goswin-v-b@web.de>
To: 369064@bugs.debian.org
Subject: Re: Bug#369064: Patch already in deb but deactivated
Date: Tue, 24 Jun 2008 11:33:49 +0200
Matthias Klose <doko@cs.tu-berlin.de> writes:

> Goswin von Brederlow writes:
>> Hi,
>> 
>> I believe the gcc source already has a patch for multiarch include and library
>> directories but they are deactiveated in rules.defs.
>> 
>> Can you comment on the functionality of them?
>
> no, this one is obsolete. removed in svn.
>
>   Matthias

Obsolete as in gcc already has another fix in svn or bit-rot?

MfG
        Goswin




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#369064; Package gcc-4.3. Full text and rfc822 format available.

Acknowledgement sent to Matthias Klose <doko@cs.tu-berlin.de>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. Full text and rfc822 format available.

Message #125 received at 369064@bugs.debian.org (full text, mbox):

From: Matthias Klose <doko@cs.tu-berlin.de>
To: Goswin von Brederlow <goswin-v-b@web.de>, 369064@bugs.debian.org
Subject: Re: Bug#369064: Patch already in deb but deactivated
Date: Tue, 24 Jun 2008 12:15:28 +0200
Goswin von Brederlow writes:
> Matthias Klose <doko@cs.tu-berlin.de> writes:
> 
> > Goswin von Brederlow writes:
> >> Hi,
> >> 
> >> I believe the gcc source already has a patch for multiarch include and library
> >> directories but they are deactiveated in rules.defs.
> >> 
> >> Can you comment on the functionality of them?
> >
> > no, this one is obsolete. removed in svn.
> >
> >   Matthias
> 
> Obsolete as in gcc already has another fix in svn or bit-rot?

the latter.




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#369064; Package gcc-4.3. Full text and rfc822 format available.

Acknowledgement sent to Goswin von Brederlow <goswin-v-b@web.de>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. Full text and rfc822 format available.

Message #130 received at 369064@bugs.debian.org (full text, mbox):

From: Goswin von Brederlow <goswin-v-b@web.de>
To: Matthias Klose <doko@cs.tu-berlin.de>
Cc: Goswin von Brederlow <goswin-v-b@web.de>, 369064@bugs.debian.org
Subject: Re: Bug#369064: Patch already in deb but deactivated
Date: Thu, 26 Jun 2008 01:16:48 +0200
Matthias Klose <doko@cs.tu-berlin.de> writes:

> Goswin von Brederlow writes:
>> Matthias Klose <doko@cs.tu-berlin.de> writes:
>> 
>> > Goswin von Brederlow writes:
>> >> Hi,
>> >> 
>> >> I believe the gcc source already has a patch for multiarch include and library
>> >> directories but they are deactiveated in rules.defs.
>> >> 
>> >> Can you comment on the functionality of them?
>> >
>> > no, this one is obsolete. removed in svn.
>> >
>> >   Matthias
>> 
>> Obsolete as in gcc already has another fix in svn or bit-rot?
>
> the latter.

I tried to fix the patch but I think it tries to change the wrong
thing.

The old lib/lib32/lib64 biarch directories must remain in gcc's search
list for compatibility reasons and one can't add a second set of
multilib dirs.

Further the directory to use depends not only on the target and
-m64/32/n32 switch, as multilib dirs do, but also on the libc we link
against.

The specs file already has an -mglibc/-muclibc switch to pick the
right dynamic linker and libc to use so I used the same mechanism to
add the multiarch directories. Adding them as -L options is not
perfect, I would have prefered some add_prefix() call, but it is the
only mechanism I could find so far.

Below the changes required for amd64 as example. Other archs and
kernels would need a similar entry.

Index: gcc-4.3-4.3.1/src/gcc/config/i386/linux64.h
===================================================================
--- gcc/config/i386/linux64.h   2008-06-24 22:35:40.000000000 +0200
+++ gcc/config/i386/linux64.h   2008-06-24 22:35:56.000000000 +0200
@@ -72,7 +72,9 @@
       %{rdynamic:-export-dynamic} \
       %{" SPEC_32 ":%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "}} \
       %{" SPEC_64 ":%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}} \
-    %{static:-static}}"
+    %{static:-static}} \
+  %{" SPEC_32 ":" CHOOSE_DYNAMIC_LINKER("-L/usr/i486-linux-gnu/lib","-L/usr/i486-linux-uclibc/lib")"} \
+  %{" SPEC_64 ":" CHOOSE_DYNAMIC_LINKER("-L/usr/x86_64-linux-gnu/lib","-L/usr/x86_64-linux-uclibc/lib")"}"
 
 /* Similar to standard Linux, but adding -ffast-math support.  */
 #undef  ENDFILE_SPEC


MfG
        Goswin




Reply sent to Matthias Klose <doko@debian.org>:
You have taken responsibility. (Sat, 13 Jun 2009 01:33:03 GMT) Full text and rfc822 format available.

Notification sent to Aurelien Jarno <aurel32@debian.org>:
Bug acknowledged by developer. (Sat, 13 Jun 2009 01:33:03 GMT) Full text and rfc822 format available.

Message #135 received at 369064-done@bugs.debian.org (full text, mbox):

From: Matthias Klose <doko@debian.org>
To: 369064-done@bugs.debian.org
Subject: Re: gcc: please add support for multiarch
Date: Fri, 12 Jun 2009 21:31:09 -0400
Version: 4.3.3-10

fixed in 4.3.3-10




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 11 Jul 2009 07:33:37 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 02:58:47 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.