This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] amd64, ppc64 - find 32bit system libraries
Matthias Klose writes:
> Joseph S. Myers writes:
> > On Sat, 8 Sep 2007, Matthias Klose wrote:
> >
> > > -MULTILIB_OSDIRNAMES = ../lib64 ../lib
> > > +MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(TARGET_SYSTEM_ROOT)/usr/lib32),../lib32,../lib)
> >
> > TARGET_SYSTEM_ROOT is the configured location that will be used after
> > install. You need to allow for --with-build-sysroot to get the location
> > used at build time.
>
> now based the test in terms of SYSTEM_HEADER_DIR.
tested the following patch with
- a native x86_64-linux build with lib64/lib32 os dirs
- a cross x86_64 (with lib32) -> i486 build
- a cross i486 -> x86_64 (with lib32) build
ok for the trunk?
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: gcc/config/i386/t-linux64
===================================================================
--- gcc/config/i386/t-linux64 (revision 128511)
+++ gcc/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 $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
Index: gcc/config/rs6000/t-linux64
===================================================================
--- gcc/config/rs6000/t-linux64 (revision 128511)
+++ gcc/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 $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) nof
MULTILIB_MATCHES = $(MULTILIB_MATCHES_FLOAT)
softfp_wrap_start := '\#ifndef __powerpc64__'