This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
PATCH: Recent conversion to explicit instantiation model broke alpha*-*-freebsd*
- To: libstdc++ at gcc dot gnu dot org
- Subject: PATCH: Recent conversion to explicit instantiation model broke alpha*-*-freebsd*
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- Date: Wed, 7 Feb 2001 17:55:41 -0600 (CST)
- CC: gcc-patches at gcc dot gnu dot org
- Reply-to: rittle at rsch dot comm dot mot dot com
Some static builds now fail with:
/usr/home/rittle/tmp/gcc-build-clerc-milon-0206/alpha-unknown-freebsd4.2/libstdc
++-v3/src/.libs/libstdc++.a(locale-inst.o):/usr/home/rittle/outside-cvs-src/egcs
/libstdc++-v3/include/bits/stl_uninitialized.h:190: undefined reference to `std:
:__normal_iterator<std::locale::facet**, std::vector<std::locale::facet*, std::a
llocator<std::locale::facet*> > > std::fill_n<std::__normal_iterator<std::locale
::facet**, std::vector<std::locale::facet*, std::allocator<std::locale::facet*>
> >, unsigned long, std::locale::facet*>(std::__normal_iterator<std::locale::fac
et**, std::vector<std::locale::facet*, std::allocator<std::locale::facet*> > >,
unsigned long, std::locale::facet* const&)'
and all shared builds now fail with something similar (except the
helpful source line reference to [...]/stl_uninitialized.h:190 is missing).
This patch fixes the problem for alpha*-*-freebsd*:
(However, it is unclear if all targets should be explicitly
instantiating both [...]unsigned[...] and [...]unsigned long[...]
versions of the template since, at least, alpha*-*-freebsd* doesn't
appear to require the former. I have no clue on how to trace
template instantiations chains, statically or with gdb, back to the
root typedef, which in this case is ``unsigned'' on most platforms
but ``unsigned long'' on alpha*-*-freebsd* thus this is the best
patch I can produce.)
2001-02-07 Loren J. Rittle <ljrittle@acm.org>
* src/locale-inst.cc: Explicitly instantiate more functions.
Index: libstdc++-v3/src/locale-inst.cc
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/src/locale-inst.cc,v
retrieving revision 1.14
diff -c -r1.14 locale-inst.cc
*** locale-inst.cc 2001/02/07 01:54:21 1.14
--- locale-inst.cc 2001/02/07 22:44:52
***************
*** 306,311 ****
--- 306,318 ----
unsigned, locale::facet* const&);
template
+ __normal_iterator<locale::facet**,
+ vector<locale::facet*> >
+ fill_n(__normal_iterator<locale::facet**,
+ vector<locale::facet*> >,
+ unsigned long, locale::facet* const&);
+
+ template
void
fill (__normal_iterator<locale::facet**,
vector<locale::facet*> >,