This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Installation of libstdc++-v3 headers
- From: Marcus Meissner <meissner at suse dot de>
- To: Michael Matz <matz at suse dot de>
- Cc: gcc at gcc dot gnu dot org, bkoz at redhat dot com
- Date: Thu, 14 Nov 2002 15:37:11 +0100
- Subject: Re: Installation of libstdc++-v3 headers
- References: <Pine.LNX.4.33.0211141514260.32309-100000@wotan.suse.de>
On Thu, Nov 14, 2002 at 03:29:20PM +0100, Michael Matz wrote:
> Hi Benjamin, others,
>
> I just went to current head for my development, and for the first time
> since some months also tried the C++ part of it with a real install. I
> think it's broken, in that the C++ headers are installed into
> ${prefix}/include/ directly instead of into
> ${prefix}/include/c++/3.3 .
> But the cc1plus itself _does_ search the .../c++/3.3/ directory. I've
> configured the thing with
> ..../configure --prefix=/spec/ra/inst --enable-languages=c,c++,f77
>
> The reason for the breakage is, that in toplevel/configure.in
> $gxx_include_dir is set to '${prefix}/include/${libstdcxx_incdir}', which
> means, that libstdcxx_incdir is _not_ substituted at this point. Ergo the
> Makefile (after configuring) contains
>
> gxx_include_dir=${prefix}/include/${libstdcxx_incdir}
>
> The problem of course is, that libstdcxx_incdir is not AC_SUBSTed (Ok,
> the equivalent which is used in the toplevel) in the toplevel
> configure.in, which in turn means, in the Makefile it remains empty. As
> ${gxx_include_dir} is passed down to the submakes, also the
> install-data-local in ${target}/libstdc++-v3/include gets that definition
> (instead of the local one, which would probably be correct).
>
> In the gcc/ dir libstdcxx_incdir _is_ AC_SUBSTed, and hence cc1plus gets
> the full paths in which it will search. Ergo compiling a C++ program will
> most probably fail (and does for me), because not finding includes.
>
> To fix this, top-level configure.in either needs to do:
>
> gxx_include_dir='${prefix}/include/'"${libstdcxx_incdir}"
>
> or, better to add the AC_SUBST equivalent at the end:
> +s%@libstdcxx_incdir@%${libstdcxx_incdir}%
>
> And of course add a 'libstdcxx_incdir=@libstdcxx_incdir@' at the
> Makefile.in.
>
> If I read the ChangeLog correctly this state exists since five months, so
> I really wonder why noone noticed that yet.
I sent the appended patch some months ago which fixes our crosscompiler.
Ciao, Marcus
============================================================
Index: libstdc++-v3/Makefile.am
--- libstdc++-v3/Makefile.am 21 Sep 2002 19:17:55 -0000 1.29.8.3
+++ libstdc++-v3/Makefile.am 27 Sep 2002 08:36:22 -0000
@@ -154,6 +154,7 @@ AM_MAKEFLAGS = \
"includedir=$(includedir)" \
"prefix=$(prefix)" \
"tooldir=$(tooldir)" \
+ "gxx_include_dir=$(gxx_include_dir)" \
"AR=$(AR)" \
"AS=$(AS)" \
"LD=$(LD)" \
@@ -165,3 +166,4 @@ AM_MAKEFLAGS = \
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
"DESTDIR=$(DESTDIR)" \
"WERROR=$(WERROR)"
+FLAGS_TO_PASS = $(AM_MAKEFLAGS)
============================================================
Index: libstdc++-v3/Makefile.in
--- libstdc++-v3/Makefile.in 17 Oct 2002 02:03:17 -0000 1.93.2.5.2.7
+++ libstdc++-v3/Makefile.in 21 Oct 2002 10:02:21 -0000
@@ -184,6 +184,7 @@ AM_MAKEFLAGS = \
"includedir=$(includedir)" \
"prefix=$(prefix)" \
"tooldir=$(tooldir)" \
+ "gxx_include_dir=$(gxx_include_dir)" \
"AR=$(AR)" \
"AS=$(AS)" \
"LD=$(LD)" \
@@ -195,7 +196,7 @@ AM_MAKEFLAGS = \
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
"DESTDIR=$(DESTDIR)" \
"WERROR=$(WERROR)"
-
+FLAGS_TO_PASS = $(AM_MAKEFLAGS)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = mkcheck testsuite_flags
--- libstdc++-v3/libsupc++/Makefile.am.~1.29.8.3.~ 2002-07-02 11:27:42.000000000 +0200
+++ libstdc++-v3/libsupc++/Makefile.am 2002-07-30 16:31:43.000000000 +0200
@@ -97,7 +97,8 @@ sources = \
libsupc___la_SOURCES = $(sources) $(c_sources)
libsupc__convenience_la_SOURCES = $(sources) $(c_sources)
-glibcppinstalldir = @gxx_include_dir@
+gxx_include_dir = @gxx_include_dir@
+glibcppinstalldir = $(gxx_include_dir)
glibcppinstall_HEADERS = $(headers)
LIBSUPCXX_CXXFLAGS = $(LIBSUPCXX_PICFLAGS)
--- libstdc++-v3/libsupc++/Makefile.in.~1.72.2.7.~ 2002-07-02 11:27:42.000000000 +0200
+++ libstdc++-v3/libsupc++/Makefile.in 2002-07-30 16:31:58.000000000 +0200
@@ -207,7 +207,8 @@ sources = \
libsupc___la_SOURCES = $(sources) $(c_sources)
libsupc__convenience_la_SOURCES = $(sources) $(c_sources)
-glibcppinstalldir = @gxx_include_dir@
+gxx_include_dir = @gxx_include_dir@
+glibcppinstalldir = $(gxx_include_dir)
glibcppinstall_HEADERS = $(headers)
LIBSUPCXX_CXXFLAGS = $(LIBSUPCXX_PICFLAGS)