On 2012-10-22 09:00, Jan Beich wrote:
...
atf-run fails to link when using -stdlib=libc++. It works if I remove
`throw' from check_stream(). Any clue?

test-program.o: In function `(anonymous 
namespace)::check_stream(std::__1::basic_ostream<char, std::__1::char_traits<char> 
>&)':
/usr/src/usr.bin/atf/atf-run/../../../contrib/atf/atf-run/test-program.cpp:76: undefined 
reference to `std::__1::basic_ios<char, std::__1::char_traits<char> 
>::clear(unsigned int)'
clang++: error: linker command failed with exit code 1 (use -v to see 
invocation)

Strange, for me it compiles (with a bunch of warnings, which I have
fixed locally), and links just fine.  However, I always use -std=c++11,
which -std= flag are you using, if any?

That said, I am planning on importing a new drop of libc++ soon, but I
would rather see this fixed sooner than later.  So I will cherry-pick
a few fixes tonight.

Meanwhile, here are the local diffs I have for making atf build.

-Dimitry

PS: As far as I can see, atf doesn't build at all with clang and
libstdc++, because there are many warnings caused by -Wsystem-headers...
Is there any incentive to fix these?
Index: contrib/atf/atf-report/atf-report.cpp
===================================================================
--- contrib/atf/atf-report/atf-report.cpp	(revision 241864)
+++ contrib/atf/atf-report/atf-report.cpp	(working copy)
@@ -381,7 +381,6 @@ class ticker_writer : public writer {
 class xml_writer : public writer {
     ostream_ptr m_os;
 
-    size_t m_curtp, m_ntps;
     std::string m_tcname, m_tpname;
 
     static
Index: contrib/atf/atf-run/io.hpp
===================================================================
--- contrib/atf/atf-run/io.hpp	(revision 241864)
+++ contrib/atf/atf-run/io.hpp	(working copy)
@@ -378,11 +378,6 @@ class pistream :
     public std::istream, utils::noncopyable
 {
     //!
-    //! \brief The file handle managed by this stream.
-    //!
-    int m_fd;
-
-    //!
     //! \brief The systembuf object used to manage this stream's data.
     //!
     systembuf m_systembuf;
Index: contrib/libc++/include/fstream
===================================================================
--- contrib/libc++/include/fstream	(revision 241864)
+++ contrib/libc++/include/fstream	(working copy)
@@ -594,7 +594,6 @@ basic_filebuf<_CharT, _Traits>::underflow()
             size_t __nmemb = _VSTD::min(static_cast<size_t>(this->egptr() - this->eback() - __unget_sz),
                                  static_cast<size_t>(__extbufend_ - __extbufnext_));
             codecvt_base::result __r;
-            state_type __svs = __st_;
             size_t __nr = fread((void*)__extbufnext_, 1, __nmemb, __file_);
             if (__nr != 0)
             {
Index: contrib/libc++/include/locale
===================================================================
--- contrib/libc++/include/locale	(revision 241864)
+++ contrib/libc++/include/locale	(working copy)
@@ -2830,9 +2830,9 @@ class _LIBCPP_VISIBLE moneypunct
     virtual string_type do_negative_sign() const {return string_type(1, '-');}
     virtual int         do_frac_digits()   const {return 0;}
     virtual pattern     do_pos_format()    const
-        {pattern __p = {symbol, sign, none, value}; return __p;}
+        {pattern __p = {{symbol, sign, none, value}}; return __p;}
     virtual pattern     do_neg_format()    const
-        {pattern __p = {symbol, sign, none, value}; return __p;}
+        {pattern __p = {{symbol, sign, none, value}}; return __p;}
 };
 
 template <class _CharT, bool _International>
@@ -3146,7 +3146,6 @@ money_get<_CharT, _InputIterator>::__do_get(iter_t
             bool __sb = __flags & ios_base::showbase;
             if (__sb || __more_needed)
             {
-                ios_base::iostate __et = ios_base::goodbit;
                 typename string_type::const_iterator __sym_space_end = __sym.begin();
                 if (__p > 0 && (__pat.field[__p - 1] == money_base::none ||
                                 __pat.field[__p - 1] == money_base::space)) {
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to