This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: libstdc++ multilibs installed where gcc won't find them
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: Benjamin Kosnik <bkoz at redhat dot com>, gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Date: 27 Jan 2003 21:18:11 -0200
- Subject: Re: libstdc++ multilibs installed where gcc won't find them
- Organization: GCC Team, Red Hat
- References: <orwuksl850.fsf@free.redhat.lsd.ic.unicamp.br><20030127103953.18383991.bkoz@redhat.com><or4r7u8pzu.fsf@free.redhat.lsd.ic.unicamp.br><m3znpm1ogg.fsf@uniton.integrable-solutions.net><orznpm78tz.fsf@free.redhat.lsd.ic.unicamp.br><m3iswa1j7w.fsf@uniton.integrable-solutions.net><oradhm7453.fsf@free.redhat.lsd.ic.unicamp.br><m3vg0az6se.fsf@uniton.integrable-solutions.net><orr8ay5jkx.fsf@free.redhat.lsd.ic.unicamp.br><m3n0lmxlpn.fsf@uniton.integrable-solutions.net>
On Jan 27, 2003, Gabriel Dos Reis <gdr@integrable-solutions.net> wrote:
> You just convinced me it was a serious bug; now, you are not going to
> try to change (again) my mind; are you? ;-)
Well, it was a vain attempt to save myself some work in back-porting
the patch (as opposed to say just reverting libstdc++-v3), but it
turned out to be trivial to back-port. It would have been simpler had
the DESTDIR patch gone in, since I had to resolve conflicts by hand in
libiberty, but the rest just applied cleanly.
> I would apprecaite if you could backport the patch to 3.2 to line up all
> affected target libraries with libgcc.
Here's the back-port of the patch to the 3.2 branch, for your
appreciation. Ok to install, if it builds and installs ok?
Index: boehm-gc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* configure.in (toolexecdir, toolexeclibdir): Set and AC_SUBST.
Remove USE_LIBDIR conditional.
* Makefile.am (toolexecdir, toolexeclibdir): Don't override.
* Makefile.in, configure: Rebuilt.
Index: boehm-gc/Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/Makefile.am,v
retrieving revision 1.33.2.2.4.1
diff -u -p -r1.33.2.2.4.1 Makefile.am
--- boehm-gc/Makefile.am 7 Oct 2002 04:37:02 -0000 1.33.2.2.4.1
+++ boehm-gc/Makefile.am 27 Jan 2003 23:14:57 -0000
@@ -16,15 +16,6 @@ MULTISUBDIR =
MULTIDO = true
MULTICLEAN = true
-## Install a library built with a cross compiler in tooldir, not
-## libdir.
-if USE_LIBDIR
-toolexeclibdir = $(libdir)$(MULTISUBDIR)
-else
-toolexecdir = $(exec_prefix)/$(target_alias)
-toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
-endif
-
noinst_LTLIBRARIES = libgcjgc.la libgcjgc_convenience.la
GC_SOURCES = allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
Index: boehm-gc/configure.in
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/configure.in,v
retrieving revision 1.39.2.2
diff -u -p -r1.39.2.2 configure.in
--- boehm-gc/configure.in 8 May 2002 04:25:22 -0000 1.39.2.2
+++ boehm-gc/configure.in 27 Jan 2003 23:14:57 -0000
@@ -1,4 +1,4 @@
-# Copyright (c) 1999, 2000, 2001, 2002 by Red Hat, Inc. All rights reserved.
+# Copyright (c) 1999, 2000, 2001, 2002, 2003 by Red Hat, Inc. All rights reserved.
#
# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
# OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
@@ -265,7 +265,17 @@ AC_ARG_ENABLE(full-debug,
esac ]
fi)
-AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
+if test -n "$with_cross_host" &&
+ test x"$with_cross_host" != x"no"; then
+ toolexecdir='$(exec_prefix)/$(target_alias)'
+ toolexeclibdir='$(toolexecdir)/lib'
+else
+ toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
+ toolexeclibdir='$(libdir)'
+fi
+toolexeclibdir=$toolexeclibdir/`$CC -print-multi-os-directory`
+AC_SUBST(toolexecdir)
+AC_SUBST(toolexeclibdir)
if test "${multilib}" = "yes"; then
multilib_arg="--enable-multilib"
Index: libf2c/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* Makefile.in ($(LIBG2C)): -rpath is glibcpp_toolexeclibdir.
* aclocal.m4 (glibcpp_toolexeclibdir): Instead of
$(MULTISUBDIR), use `$CC -print-multi-os-directory`, unless
version_specific_libs is enabled.
* configure: Rebuilt.
Index: libf2c/Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/libf2c/Makefile.in,v
retrieving revision 1.48.2.1.4.1
diff -u -p -r1.48.2.1.4.1 Makefile.in
--- libf2c/Makefile.in 7 Oct 2002 04:37:02 -0000 1.48.2.1.4.1
+++ libf2c/Makefile.in 27 Jan 2003 23:15:05 -0000
@@ -1,5 +1,5 @@
# Makefile for GNU F77 compiler runtime.
-# Copyright (C) 1995-1998, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1995-1998, 2001, 2002, 2003 Free Software Foundation, Inc.
# Contributed by Dave Love (d.love@dl.ac.uk).
#
#This file is part of GNU Fortran.
@@ -149,7 +149,7 @@ i77 f77 u77: g2c.h
$(LIBG2C): s-libi77 s-libf77 s-libu77 s-libe77
$(LIBTOOL) --mode=link $(CC) -o $@ \
-version-info $(VERSION_MAJOR):$(VERSION_MINOR):$(VERSION_SUB) \
- -rpath $(libdir)$(MULTISUBDIR) \
+ -rpath $(glibcpp_toolexeclibdir) \
-objectlist s-libe77 \
-objectlist s-libf77 \
-objectlist s-libi77 \
Index: libf2c/aclocal.m4
===================================================================
RCS file: /cvs/gcc/gcc/libf2c/aclocal.m4,v
retrieving revision 1.2.2.2
diff -u -p -r1.2.2.2 aclocal.m4
--- libf2c/aclocal.m4 26 Jun 2002 04:15:29 -0000 1.2.2.2
+++ libf2c/aclocal.m4 27 Jan 2003 23:15:05 -0000
@@ -207,11 +207,12 @@ if test x"$glibcpp_toolexecdir" = x"no";
if test -n "$with_cross_host" &&
test x"$with_cross_host" != x"no"; then
glibcpp_toolexecdir='$(exec_prefix)/$(target_alias)'
- glibcpp_toolexeclibdir='$(toolexecdir)/lib$(MULTISUBDIR)'
+ glibcpp_toolexeclibdir='$(toolexecdir)/lib'
else
glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
- glibcpp_toolexeclibdir='$(libdir)$(MULTISUBDIR)'
+ glibcpp_toolexeclibdir='$(libdir)'
fi
+ glibcpp_toolexeclibdir=$glibcpp_toolexeclibdir/`$CC -print-multi-os-directory`
fi
AC_SUBST(glibcpp_prefixdir)
Index: libffi/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* configure.in (toolexecdir, toolexeclibdir): Set and AC_SUBST.
Remove USE_LIBDIR conditional.
* Makefile.am (toolexecdir, toolexeclibdir): Don't override.
* Makefile.in, configure: Rebuilt.
Index: libffi/Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libffi/Makefile.am,v
retrieving revision 1.15.2.3.4.1
diff -u -p -r1.15.2.3.4.1 Makefile.am
--- libffi/Makefile.am 7 Oct 2002 04:37:02 -0000 1.15.2.3.4.1
+++ libffi/Makefile.am 27 Jan 2003 23:15:06 -0000
@@ -73,15 +73,6 @@ MULTISUBDIR =
MULTIDO = true
MULTICLEAN = true
-## Install a library built with a cross compiler in tooldir, not
-## libdir.
-if USE_LIBDIR
-toolexeclibdir = $(libdir)$(MULTISUBDIR)
-else
-toolexecdir = $(exec_prefix)/$(target_alias)
-toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
-endif
-
toolexeclib_LTLIBRARIES = libffi.la
noinst_LTLIBRARIES = libffi_convenience.la
Index: libffi/configure.in
===================================================================
RCS file: /cvs/gcc/gcc/libffi/configure.in,v
retrieving revision 1.19.2.5
diff -u -p -r1.19.2.5 configure.in
--- libffi/configure.in 8 May 2002 04:25:49 -0000 1.19.2.5
+++ libffi/configure.in 27 Jan 2003 23:15:06 -0000
@@ -149,7 +149,17 @@ AC_ARG_ENABLE(purify-safety,
AC_DEFINE(USING_PURIFY)
fi)
-AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
+if test -n "$with_cross_host" &&
+ test x"$with_cross_host" != x"no"; then
+ toolexecdir='$(exec_prefix)/$(target_alias)'
+ toolexeclibdir='$(toolexecdir)/lib'
+else
+ toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
+ toolexeclibdir='$(libdir)'
+fi
+toolexeclibdir=$toolexeclibdir/`$CC -print-multi-os-directory`
+AC_SUBST(toolexecdir)
+AC_SUBST(toolexeclibdir)
if test "${multilib}" = "yes"; then
multilib_arg="--enable-multilib"
Index: libiberty/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* Makefile.in (install_to_tooldir): Instead of $(MULTISUBDIR), use
/`$$CC -print-multi-os-directory`.
Index: libiberty/Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/Makefile.in,v
retrieving revision 1.73.6.1
diff -u -p -r1.73.6.1 Makefile.in
--- libiberty/Makefile.in 7 Oct 2002 04:37:03 -0000 1.73.6.1
+++ libiberty/Makefile.in 27 Jan 2003 23:15:10 -0000
@@ -1,6 +1,6 @@
#
# Makefile
-# Copyright (C) 1990, 91-99, 2000, 2001
+# Copyright (C) 1990, 91-99, 2000, 2001, 2003
# Free Software Foundation
#
# This file is part of the libiberty library.
@@ -243,9 +243,9 @@ install_to_libdir: all
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
install_to_tooldir: all
- $(INSTALL_DATA) $(TARGETLIB) $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n
- ( cd $(tooldir)/lib$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n )
- mv -f $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)
+ $(INSTALL_DATA) $(TARGETLIB) $(tooldir)/lib/`$$CC -print-multi-os-directory`/$(TARGETLIB)n
+ ( cd $(tooldir)/lib/`$$CC -print-multi-os-directory` ; $(RANLIB) $(TARGETLIB)n )
+ mv -f $(tooldir)/lib/`$$CC -print-multi-os-directory`/$(TARGETLIB)n $(tooldir)/lib/`$$CC -print-multi-os-directory`/$(TARGETLIB)
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
# needed-list is used by libstdc++. NEEDED is the list of functions
Index: libjava/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* configure.in (toolexecdir, toolexeclibdir): Set and AC_SUBST.
Remove USE_LIBDIR conditional.
* Makefile.am (toolexecdir, toolexeclibdir): Don't override.
* Makefile.in, configure: Rebuilt.
Index: libjava/Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Makefile.am,v
retrieving revision 1.202.2.13.2.1
diff -u -p -r1.202.2.13.2.1 Makefile.am
--- libjava/Makefile.am 7 Oct 2002 04:37:03 -0000 1.202.2.13.2.1
+++ libjava/Makefile.am 27 Jan 2003 23:15:13 -0000
@@ -14,15 +14,6 @@ endif
## What gets installed, and where.
##
-## Install a library built with a cross compiler in tooldir, not
-## libdir.
-if USE_LIBDIR
-toolexeclibdir = $(libdir)$(MULTISUBDIR)
-else
-toolexecdir = $(exec_prefix)/$(target_alias)
-toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
-endif
-
if XLIB_AWT
cond_x_ltlibrary = libgcjx.la
else
Index: libjava/configure.in
===================================================================
RCS file: /cvs/gcc/gcc/libjava/configure.in,v
retrieving revision 1.114.2.16
diff -u -p -r1.114.2.16 configure.in
--- libjava/configure.in 8 May 2002 04:26:24 -0000 1.114.2.16
+++ libjava/configure.in 27 Jan 2003 23:15:14 -0000
@@ -771,9 +771,20 @@ AC_SUBST(EXCEPTIONSPEC)
AM_CONDITIONAL(CANADIAN, test "$CANADIAN" = yes)
AM_CONDITIONAL(NULL_TARGET, test "$NULL_TARGET" = yes)
AM_CONDITIONAL(NATIVE, test "$NATIVE" = yes || test "$NULL_TARGET" = yes)
-AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
AM_CONDITIONAL(NEEDS_DATA_START, test "$NEEDS_DATA_START" = yes && test "$NATIVE" = yes)
AC_SUBST(GCC_UNWIND_INCLUDE)
+
+if test -n "$with_cross_host" &&
+ test x"$with_cross_host" != x"no"; then
+ toolexecdir='$(exec_prefix)/$(target_alias)'
+ toolexeclibdir='$(toolexecdir)/lib'
+else
+ toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
+ toolexeclibdir='$(libdir)'
+fi
+toolexeclibdir=$toolexeclibdir/`$CC -print-multi-os-directory`
+AC_SUBST(toolexecdir)
+AC_SUBST(toolexeclibdir)
AC_SUBST(AM_RUNTESTFLAGS)
Index: libobjc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* aclocal.m4 (glibcpp_toolexeclibdir): Instead of
$(MULTISUBDIR), use `$CC -print-multi-os-directory`, unless
version_specific_libs is enabled.
* configure: Rebuilt.
Index: libobjc/aclocal.m4
===================================================================
RCS file: /cvs/gcc/gcc/libobjc/aclocal.m4,v
retrieving revision 1.3.2.1
diff -u -p -r1.3.2.1 aclocal.m4
--- libobjc/aclocal.m4 26 Jun 2002 04:15:30 -0000 1.3.2.1
+++ libobjc/aclocal.m4 27 Jan 2003 23:15:16 -0000
@@ -207,11 +207,12 @@ if test x"$glibcpp_toolexecdir" = x"no";
if test -n "$with_cross_host" &&
test x"$with_cross_host" != x"no"; then
glibcpp_toolexecdir='$(exec_prefix)/$(target_alias)'
- glibcpp_toolexeclibdir='$(toolexecdir)/lib$(MULTISUBDIR)'
+ glibcpp_toolexeclibdir='$(toolexecdir)/lib'
else
glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
- glibcpp_toolexeclibdir='$(libdir)$(MULTISUBDIR)'
+ glibcpp_toolexeclibdir='$(libdir)'
fi
+ glibcpp_toolexeclibdir=$glibcpp_toolexeclibdir/`$CC -print-multi-os-directory`
fi
AC_SUBST(glibcpp_prefixdir)
Index: zlib/ChangeLog.gcj
from Alexandre Oliva <aoliva@redhat.com>
* configure.in (toolexecdir, toolexeclibdir): Set and AC_SUBST.
Remove USE_LIBDIR conditional.
* Makefile.am (toolexecdir, toolexeclibdir): Don't override.
* Makefile.in, configure: Rebuilt.
Index: zlib/Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/zlib/Makefile.am,v
retrieving revision 1.7.28.1.4.1
diff -u -p -r1.7.28.1.4.1 Makefile.am
--- zlib/Makefile.am 7 Oct 2002 04:37:05 -0000 1.7.28.1.4.1
+++ zlib/Makefile.am 27 Jan 2003 23:15:17 -0000
@@ -10,15 +10,6 @@ MULTISUBDIR =
MULTIDO = true
MULTICLEAN = true
-## Install a library built with a cross compiler in tooldir, not
-## libdir.
-if USE_LIBDIR
-toolexeclibdir = $(libdir)$(MULTISUBDIR)
-else
-toolexecdir = $(exec_prefix)/$(target_alias)
-toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
-endif
-
ZLIB_SOURCES = adler32.c compress.c crc32.c deflate.c deflate.h \
gzio.c infblock.c infblock.h infcodes.c infcodes.h inffast.c inffast.h \
inffixed.h inflate.c inftrees.c inftrees.h infutil.c infutil.h trees.c \
Index: zlib/configure.in
===================================================================
RCS file: /cvs/gcc/gcc/zlib/configure.in,v
retrieving revision 1.12.16.1
diff -u -p -r1.12.16.1 configure.in
--- zlib/configure.in 8 May 2002 04:28:44 -0000 1.12.16.1
+++ zlib/configure.in 27 Jan 2003 23:15:17 -0000
@@ -113,7 +113,18 @@ AC_SUBST(target_all)
AC_CHECK_HEADERS(unistd.h)
-AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
+if test -n "$with_cross_host" &&
+ test x"$with_cross_host" != x"no"; then
+ toolexecdir='$(exec_prefix)/$(target_alias)'
+ toolexeclibdir='$(toolexecdir)/lib'
+else
+ toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
+ toolexeclibdir='$(libdir)'
+fi
+toolexeclibdir=$toolexeclibdir/`$CC -print-multi-os-directory 2>/dev/null || echo .`
+AC_SUBST(toolexecdir)
+AC_SUBST(toolexeclibdir)
+
AM_CONDITIONAL(TARGET_LIBRARY, test -n "$with_target_subdir")
if test "${multilib}" = "yes"; then
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer