[patch] amd64, ppc64 - find 32bit system libraries

Matthias Klose doko@cs.tu-berlin.de
Sat Sep 8 17:13:00 GMT 2007


Currently gcc fails to build on Debian amd64-linux-gnu and
ppc64-linux-gnu when configured with --enable-targets=all.  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, Debian doesn't do so.  Afaics
the LSB does not enforce the use of /lib64 and /usr/lib64, it doesn't
tell anything about the 32bit libraries on those systems.

If the approach choosen is not robust, that could be guarded with a
`ifneq ($(wildcard /etc/debian_version),)'.

Ok for the trunk?

  Matthias


2007-09-08  Matthias Klose  <doko@debian.org>

	* config/i386/t-linux64 (MULTILIB_OSDIRNAMES): Use ../lib32 as the
	multilib osdirname if it exists.
	* config/rs6000/t-linux64 (MULTILIB_OSDIRNAMES): Likewise.

Index: config/i386/t-linux64
===================================================================
--- config/i386/t-linux64	(revision 128274)
+++ config/i386/t-linux64	(working copy)
@@ -6,7 +6,7 @@
 
 MULTILIB_OPTIONS = m64/m32
 MULTILIB_DIRNAMES = 64 32 
-MULTILIB_OSDIRNAMES = ../lib64 ../lib
+MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard /usr/lib32),../lib32,../lib)
 
 LIBGCC = stmp-multilib
 INSTALL_LIBGCC = install-multilib
Index: config/rs6000/t-linux64
===================================================================
--- config/rs6000/t-linux64	(revision 128274)
+++ config/rs6000/t-linux64	(working copy)
@@ -12,7 +12,7 @@
 MULTILIB_EXTRA_OPTS     = fPIC mstrict-align
 MULTILIB_EXCEPTIONS     = m64/msoft-float
 MULTILIB_EXCLUSIONS     = m64/!m32/msoft-float
-MULTILIB_OSDIRNAMES	= ../lib64 ../lib nof
+MULTILIB_OSDIRNAMES	= ../lib64 $(if $(wildcard /usr/lib32),../lib32,../lib) nof
 MULTILIB_MATCHES        = $(MULTILIB_MATCHES_FLOAT)
 
 softfp_wrap_start := '\#ifndef __powerpc64__'



More information about the Gcc-patches mailing list