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

Bug#369064: Patch already in deb but deactivated

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

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

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.  */


Reply to: