This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[JAVA/C++ PATCH] Make a true bootstrap work


Hi there,

I recently removed all installations  of libstdc++{,-v3} on my system,
and then started a clean build from a checkout of gcc-v_3-branch as of
2001/02/19 11:17:14 +0100.

When  it    came  to  building libjava,    some   include  files  from
libstdc++{,-v3} cannot be found:

../../../gcc-3.0/libjava/gnu/gcj/xlib/natClip.cc:15:18: vector: No such file or directory
../../../gcc-3.0/libjava/gnu/gcj/xlib/natClip.cc:26: syntax error before `;' token

If you look at the command line you'll see that no -I... arguments are
used to tell gcc where  to look for  files from libstdc++{,-v3} (sorry
for the long line):

/home/gnu/work/GNU/gcc-3.0-i586-redhat7-linux-gnu/gcc/g++ -B/home/gnu/work/GNU/gcc-3.0-i586-redhat7-linux-gnu/gcc/ -nostdinc++ -L/home/gnu/work/GNU/gcc-3.0-i586-redhat7-linux-gnu/i586-redhat7-linux-gnu/libstdc++-v3/src -L/home/gnu/work/GNU/gcc-3.0-i586-redhat7-linux-gnu/i586-redhat7-linux-gnu/libstdc++-v3/src/.libs -B/opt/gnu/H-ia32-linux/i586-redhat7-linux-gnu/bin/ -B/opt/gnu/H-ia32-linux/i586-redhat7-linux-gnu/lib/ -isystem /opt/gnu/H-ia32-linux/i586-redhat7-linux-gnu/include -DHAVE_CONFIG_H -I. -I../../../gcc-3.0/libjava -I./include -I../../../gcc-3.0/libjava -Iinclude -I../../../gcc-3.0/libjava/include -I../../../gcc-3.0/libjava/../boehm-gc -I./../boehm-gc -DLINUX_THREADS=1 -D_REENTRANT=1 -DSILENT=1 -DNO_SIGNALS=1 -DJAVA_FINALIZATION=1 -DGC_GCJ_SUPPORT=1 -I../../../gcc-3.0/libjava/libltdl -I../../../gcc-3.0/libjava/libltdl -I../../../gcc-3.0/libjava/../gcc -I../../../gcc-3.0/libjava/../include -I../../../gcc-3.0/libjava/../libffi/include -I../libffi/include -fno-rtti -fvtable-thunks -fasynchronous-exceptions -fdollars-in-identifiers -D__NO_MATH_INLINES -ffloat-store -W -Wall -D_GNU_SOURCE -O2 -march=i586 -g -fvtable-thunks -D_GNU_SOURCE -Wp,-MD,.deps/natClip.pp -c ../../../gcc-3.0/libjava/gnu/gcj/xlib/natClip.cc  -fPIC -DPIC -o gnu/gcj/xlib/.libs/natClip.o

This  means that   gcc  is silently   using  files  from  an   earlier
installation if it finds them on the system  instead of the files from
the source/build tree.

The patch attached to this email fixed it for me.

OK to install?

Cheers.

l8er
manfred
2001-02-19  Manfred Hollstein  <manfredh@redhat.com>

	* Makefile.am (GLIBCPP_INCLUDE_DIR, C_INCLUDE_DIR,
	CSTD_INCLUDES, LIBMATH_INCLUDES, LIBSUPCXX_INCLUDES,
	LIBIO_INCLUDES, LIBSTDCXXINCS): New macros for libstdc++-v3
	include directories.
	(INCLUDES): Use them.
	* Makefile.in: Re-generate.

diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el gcc-3.0.orig/libjava/Makefile.am gcc-3.0/libjava/Makefile.am
--- gcc-3.0.orig/libjava/Makefile.am	Sat Feb 17 18:56:13 2001
+++ gcc-3.0/libjava/Makefile.am	Mon Feb 19 15:28:16 2001
@@ -110,9 +110,19 @@ JC1FLAGS = -g @LIBGCJ_JAVAFLAGS@
 
 LIBFFIINCS = -I$(top_srcdir)/../libffi/include -I$(MULTIBUILDTOP)../libffi/include
 
+# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
+GLIBCPP_INCLUDE_DIR = $(top_srcdir)/../libstdc++-v3/include
+C_INCLUDE_DIR = ${GLIBCPP_INCLUDE_DIR}/c_std
+CSTD_INCLUDES = -I$(GLIBCPP_INCLUDE_DIR)/std -I$(C_INCLUDE_DIR)
+LIBMATH_INCLUDES = -I$(top_srcdir)/../libstdc++-v3/libmath
+LIBSUPCXX_INCLUDES = -I$(top_srcdir)/../libstdc++-v3/libsupc++
+LIBIO_INCLUDES = -I$(MULTIBUILDTOP)../libstdc++-v3/libio -I$(top_srcdir)/../libstdc++-v3/libio
+
+LIBSTDCXXINCS = -I$(MULTIBUILDTOP)../libstdc++-v3/include -I$(GLIBCPP_INCLUDE_DIR) $(CSTD_INCLUDES) -I$(top_builddir)/include $(LIBSUPCXX_INCLUDES) $(LIBIO_INCLUDES) $(LIBMATH_INCLUDES)
+
 INCLUDES = -I$(top_srcdir) -Iinclude -I$(top_srcdir)/include \
 	$(GCINCS) $(THREADINCS) $(INCLTDL) \
-	$(EH_COMMON_INCLUDE) $(ZINCS) $(LIBFFIINCS)
+	$(EH_COMMON_INCLUDE) $(ZINCS) $(LIBFFIINCS) $(LIBSTDCXXINCS)
 
 
 ## ################################################################
diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el gcc-3.0.orig/libjava/Makefile.in gcc-3.0/libjava/Makefile.in
--- gcc-3.0.orig/libjava/Makefile.in	Sat Feb 17 18:56:30 2001
+++ gcc-3.0/libjava/Makefile.in	Mon Feb 19 15:28:28 2001
@@ -168,9 +168,19 @@ JC1FLAGS = -g @LIBGCJ_JAVAFLAGS@
 
 LIBFFIINCS = -I$(top_srcdir)/../libffi/include -I$(MULTIBUILDTOP)../libffi/include
 
+# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
+GLIBCPP_INCLUDE_DIR = $(top_srcdir)/../libstdc++-v3/include
+C_INCLUDE_DIR = ${GLIBCPP_INCLUDE_DIR}/c_std
+CSTD_INCLUDES = -I$(GLIBCPP_INCLUDE_DIR)/std -I$(C_INCLUDE_DIR)
+LIBMATH_INCLUDES = -I$(top_srcdir)/../libstdc++-v3/libmath
+LIBSUPCXX_INCLUDES = -I$(top_srcdir)/../libstdc++-v3/libsupc++
+LIBIO_INCLUDES = -I$(MULTIBUILDTOP)../libstdc++-v3/libio -I$(top_srcdir)/../libstdc++-v3/libio
+
+LIBSTDCXXINCS = -I$(MULTIBUILDTOP)../libstdc++-v3/include -I$(GLIBCPP_INCLUDE_DIR) $(CSTD_INCLUDES) -I$(top_builddir)/include $(LIBSUPCXX_INCLUDES) $(LIBIO_INCLUDES) $(LIBMATH_INCLUDES)
+
 INCLUDES = -I$(top_srcdir) -Iinclude -I$(top_srcdir)/include \
 	$(GCINCS) $(THREADINCS) $(INCLTDL) \
-	$(EH_COMMON_INCLUDE) $(ZINCS) $(LIBFFIINCS)
+	$(EH_COMMON_INCLUDE) $(ZINCS) $(LIBFFIINCS) $(LIBSTDCXXINCS)
 
 
 nat_files = $(nat_source_files:.cc=.lo)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]