V3 PATCH: libio configury

Mark P Mitchell mark@codesourcery.com
Wed Nov 15 17:46:00 GMT 2000


When you say --enable-cstdio=stdio, you don't need most of libio,
although it looks like we do still use libio for wide-character stuff.
When you don't use wide-character stuff either (IRIX), you don't need
any bits of libio.  The makefiles still create libio.a (which nothing
in it), but the IRIX linker doesn't like to link in empty archives.

So, here are some configury bits to not link in libio at all in that
case.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

Wed Nov 15 18:39:34 2000  Mark P Mitchell  <mark@codesourcery.com>

	* acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Substitute libio_la.
	* src/Makefile.am (libstdc___la_LIBADD): Use it.
	* aclocal.m4: Regenerated.
	* configure: Likewise.
	* Makefile.in: Likewise.
	* libio/Makefile.in: Likewise.
	* libmath/Makefile.in: Likewise.
	* libsupc++/Makefile.in: Likewise.
	* src/Makfile.in: Likewise.
	
Index: acinclude.m4
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/acinclude.m4,v
retrieving revision 1.91
diff -c -p -r1.91 acinclude.m4
*** acinclude.m4	2000/11/14 21:05:04	1.91
--- acinclude.m4	2000/11/16 01:32:13
*************** AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
*** 1316,1321 ****
--- 1316,1327 ----
  
    AM_CONDITIONAL(GLIBCPP_NEED_LIBIO, test "$need_libio" = yes)
    AM_CONDITIONAL(GLIBCPP_NEED_WLIBIO, test "$need_wlibio" = yes)
+   if test "$need_libio" = yes || test "$need_wlibio" = yes; then
+ 	libio_la=../libio/libio.la
+   else
+ 	libio_la=
+   fi
+   AC_SUBST(libio_la)
  ])
  
  
Index: src/Makefile.am
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/src/Makefile.am,v
retrieving revision 1.47
diff -c -p -r1.47 Makefile.am
*** Makefile.am	2000/11/13 23:38:41	1.47
--- Makefile.am	2000/11/16 01:32:17
*************** libstdc___la_SOURCES = $(sources)
*** 195,201 ****
  libinst_wstring_la_SOURCES = $(wstring_sources)
  
  libstdc___la_LIBADD = \
! 	../libmath/libmath.la ../libio/libio.la \
  	../libsupc++/libsupc++convenience.la \
  	@libinst_wstring_la@
  
--- 195,201 ----
  libinst_wstring_la_SOURCES = $(wstring_sources)
  
  libstdc___la_LIBADD = \
! 	../libmath/libmath.la @libio_la@ \
  	../libsupc++/libsupc++convenience.la \
  	@libinst_wstring_la@
  


More information about the Libstdc++ mailing list