This is the mail archive of the libstdc++@sources.redhat.com mailing list for the libstdc++ project.


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

libtool patches for FreeBSD configuration (found while tuning libstdc++-v3 for this platform)


Mark Mitchell asked that libtool changes required to build
libstdc++-v3 on various platforms be CC'd to Alexandre Oliva via
libtool-patches@gnu.org.  Thanks Alexandre for giving these patches
due consideration.  They should be fairly non-controversial since they
only affect freebsd* configuration.  Please note that I was careful to
only "improved" things when I knew the exact history and current state.

With these two libtool configuration patches, I see the same few
libstdc++-v3 testsuite failures (currently 6 run-time and 3
build-time) with both -static and without (i.e. using the shared
version of the library) on FreeBSD against both the threaded and
non-threaded C library and `make check-g++' now looks as expected.

Without the first patch, shared libstdc++-v3 is completely broken
(oddly enough, it gets built but without any of the g++-compiled items
- it seems that libstdc++-v3 should reject being buildable in this
case when --enable-shared was given to configure but I don't know how
to make that so).  Without the second patch, the standard gcc
--enable-threads option is not supported correctly in conjunction with
a pending libstdc++-v3 patch to better support FreeBSD.

Thanks,
Loren

2000-11-15  Loren J. Rittle  <ljrittle@acm.org>

	* ltcf-cxx.sh: Support creation of C++ shared libraries on
	recent versions of FreeBSD (release 3 or later).
	* ltconfig: On FreeBSD, -lc must not be provided when building
	a shared library or else the standard -pthread gcc option is
	rendered worthless to later users of the built library.

Index: ltcf-cxx.sh
===================================================================
RCS file: /cvs/gcc/egcs/ltcf-cxx.sh,v
retrieving revision 1.5
diff -c -r1.5 ltcf-cxx.sh
*** ltcf-cxx.sh	2000/11/09 21:41:11	1.5
--- ltcf-cxx.sh	2000/11/16 04:45:47
***************
*** 167,176 ****
          ;;
      esac
      ;;
!   freebsd*)
!     # FreeBSD uses GNU C++ and GNU ld
      # FIXME: insert proper C++ library support
      ld_shlibs=no
      ;;
    hpux*)
      case "$cc_basename" in
--- 167,183 ----
          ;;
      esac
      ;;
!   freebsd1*)
!     # C++ shared libraries reported to be fairly broken back then
!     ld_shlibs=no
!     ;;
!   freebsd2*)
      # FIXME: insert proper C++ library support
      ld_shlibs=no
+     ;;
+   freebsd*)
+     # FreeBSD 3 and later use GNU C++ and GNU ld with standard conventions
+     ld_shlibs=yes
      ;;
    hpux*)
      case "$cc_basename" in
Index: ltconfig
===================================================================
RCS file: /cvs/gcc/egcs/ltconfig,v
retrieving revision 1.11
diff -c -r1.11 ltconfig
*** ltconfig	2000/11/09 21:41:11	1.11
--- ltconfig	2000/11/16 04:45:48
***************
*** 1012,1017 ****
--- 1012,1018 ----
      freebsd-elf*)
        library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
        need_version=no
+       need_lc=no
        need_lib_prefix=no
        ;;
      freebsd-*)

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