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 20:11:42 -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>
On Jan 27, 2003, Gabriel Dos Reis <gdr@integrable-solutions.net> wrote:
> Alexandre Oliva <aoliva@redhat.com> writes:
> | On Jan 27, 2003, Gabriel Dos Reis <gdr@integrable-solutions.net> wrote:
> |
> | > Well, I'm not comfortable with that situation. This patch does not
> | > fix any regression nor any critical bug.
> |
> | Huh? How can you say it is not a critical bug? The fact that the
> | non-default libstdc++ multilib can't be located by g++ on say
> | sparc64-linux-gnu is not a critical bug?
> Sure, it is, now that you clearly spell its purpose.
Phew!
> Obvsiouly, the reasons why that patch was nominated wasn't obvious to
> me (catching up tons of mails) and I was under the impression that it
> is just a matter of "lineing up versions".
Actually, it requires something similar to this (that I'm testing) to
line up all other target libraries with libgcc and (now) libstdc++.
Would you rather have the libstdc++-v3 part reverted, so that it
remains consistent with all other target libraries (except libgcc),
stay as is or get something like this additional patch in. This is
actually for mainline and I'm still testing it, but I wouldn't mind
porting it over to 3.2. As for mainline and 3.3, does any of the
maintainers of libf2c, libobjc and libjava object to it?
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.36
diff -u -p -r1.36 Makefile.am
--- boehm-gc/Makefile.am 23 Sep 2002 03:52:49 -0000 1.36
+++ boehm-gc/Makefile.am 27 Jan 2003 20:29:25 -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.43
diff -u -p -r1.43 configure.in
--- boehm-gc/configure.in 19 Jul 2002 08:54:43 -0000 1.43
+++ boehm-gc/configure.in 27 Jan 2003 20:29:25 -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.
@@ -267,7 +267,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.55
diff -u -p -r1.55 Makefile.in
--- libf2c/Makefile.in 9 Jan 2003 08:08:28 -0000 1.55
+++ libf2c/Makefile.in 27 Jan 2003 20:29:34 -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.
@@ -153,7 +153,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.5
diff -u -p -r1.5 aclocal.m4
--- libf2c/aclocal.m4 26 Jun 2002 03:53:44 -0000 1.5
+++ libf2c/aclocal.m4 27 Jan 2003 20:29:35 -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.23
diff -u -p -r1.23 Makefile.am
--- libffi/Makefile.am 23 Sep 2002 03:52:50 -0000 1.23
+++ libffi/Makefile.am 27 Jan 2003 20:29:36 -0000
@@ -76,15 +76,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.33
diff -u -p -r1.33 configure.in
--- libffi/configure.in 12 Nov 2002 04:45:57 -0000 1.33
+++ libffi/configure.in 27 Jan 2003 20:29:36 -0000
@@ -164,7 +164,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.82
diff -u -p -r1.82 Makefile.in
--- libiberty/Makefile.in 24 Jan 2003 23:23:18 -0000 1.82
+++ libiberty/Makefile.in 27 Jan 2003 20:29:40 -0000
@@ -1,6 +1,6 @@
#
# Makefile
-# Copyright (C) 1990, 91-99, 2000, 2001, 2002
+# Copyright (C) 1990, 91-99, 2000, 2001, 2002, 2003
# Free Software Foundation
#
# This file is part of the libiberty library.
@@ -284,10 +284,10 @@ install_to_libdir: all
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
install_to_tooldir: all
- ${mkinstalldirs} $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)
- $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n
- ( cd $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n )
- mv -f $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)
+ ${mkinstalldirs} $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory`
+ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory`/$(TARGETLIB)n
+ ( cd $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory` ; $(RANLIB) $(TARGETLIB)n )
+ mv -f $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory`/$(TARGETLIB)n $(DESTDIR)$(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.269
diff -u -p -r1.269 Makefile.am
--- libjava/Makefile.am 20 Jan 2003 06:46:26 -0000 1.269
+++ libjava/Makefile.am 27 Jan 2003 20:29:47 -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
## We require libstdc++-v3 to be in the same build tree.
Index: libjava/configure.in
===================================================================
RCS file: /cvs/gcc/gcc/libjava/configure.in,v
retrieving revision 1.144
diff -u -p -r1.144 configure.in
--- libjava/configure.in 14 Jan 2003 13:51:13 -0000 1.144
+++ libjava/configure.in 27 Jan 2003 20:29:48 -0000
@@ -789,9 +789,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)
# Determine gcj version number.
changequote(<<,>>)
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.5
diff -u -p -r1.5 aclocal.m4
--- libobjc/aclocal.m4 26 Jun 2002 03:53:44 -0000 1.5
+++ libobjc/aclocal.m4 27 Jan 2003 20:29:50 -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.10
diff -u -p -r1.10 Makefile.am
--- zlib/Makefile.am 23 Sep 2002 03:52:55 -0000 1.10
+++ zlib/Makefile.am 27 Jan 2003 20:29:51 -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.15
diff -u -p -r1.15 configure.in
--- zlib/configure.in 16 May 2002 17:43:21 -0000 1.15
+++ zlib/configure.in 27 Jan 2003 20:29:51 -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