Date: Mon, 16 Mar 2015 07:03:49 -0700 From: Mark Millard <markmi@dsl-only.net> To: FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, freebsd-toolchain@freebsd.org Subject: powerpc64-xtoolchain-gcc (gcc 4.9.1) reports: /usr/srcC/lib/libnv/tests/dnv_tests.cc:453:2: error: ambiguous overload Message-ID: <90144A01-AD41-4B9A-B040-D342B60EAE02@dsl-only.net>
next in thread | raw e-mail | index | archive | help
Basic context (more is listed later): # freebsd-version -ku ; uname -ap 11.0-CURRENT 11.0-CURRENT FreeBSD FBSDG5C0 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r279514M: Wed Mar = 11 19:23:14 PDT 2015 = root@FBSDG4C0:/usr/obj/powerpc.powerpc64/usr/srcC/sys/GENERIC64vtsc-NODEBU= G powerpc powerpc64 With my limping-along powerpc64-xtoolchain-gcc being used on a powerpc64 = with CROSS_TOOLCHAIN=3Dpowerpc64-gcc I recently got it as far as... The reported ambiguous overload... In file included from = /usr/obj/usr/srcC/tmp/usr/include/atf-c++.hpp:29:0,^M from /usr/srcC/lib/libnv/tests/dnv_tests.cc:30:^M /usr/srcC/lib/libnv/tests/dnv_tests.cc: In member function 'virtual void = {anonymous}::atfu_tc_dnvlist_take_nvlist__empty::body() const':^M /usr/srcC/lib/libnv/tests/dnv_tests.cc:453:2: error: ambiguous overload = for 'operator<<' (operand types are 'std::__1::basic_ostream<char>' and = 'std::nullptr_t')^M ATF_REQUIRE_EQ(actual_val, NULL);^M ^^M /usr/srcC/lib/libnv/tests/dnv_tests.cc:453:2: note: candidates are:^M In file included from = /usr/obj/usr/srcC/tmp/usr/include/c++/v1/sstream:174:0,^M from = /usr/obj/usr/srcC/tmp/usr/include/atf-c++/macros.hpp:29,^M from = /usr/obj/usr/srcC/tmp/usr/include/atf-c++.hpp:29,^M from /usr/srcC/lib/libnv/tests/dnv_tests.cc:30:^M /usr/obj/usr/srcC/tmp/usr/include/c++/v1/ostream:320:1: note: = std::__1::basic_ostream<_CharT, _Traits>& = std::__1::basic_ostream<_CharT, = _Traits>::operator<<(std::__1::basic_ostream<_CharT, _Traits>& ( *)(std::__1::basic_ostream<_CharT, _Traits>&)) [with _CharT =3D char; = _Traits =3D std::__1::char_traits<char>]^M basic_ostream<_CharT, _Traits>::operator<<(basic_ostream& = (*__pf)(basic_ostream&))^M ^^M /usr/obj/usr/srcC/tmp/usr/include/c++/v1/ostream:328:1: note: = std::__1::basic_ostream<_CharT, _Traits>& = std::__1::basic_ostream<_CharT, = _Traits>::operator<<(std::__1::basic_ios<_CharT, _Traits>& (*)(s td::__1::basic_ios<_CharT, _Traits>&)) [with _CharT =3D char; _Traits =3D = std::__1::char_traits<char>]^M basic_ostream<_CharT, _Traits>::operator<<(basic_ios<char_type, = traits_type>&^M ^^M /usr/obj/usr/srcC/tmp/usr/include/c++/v1/ostream:338:1: note: = std::__1::basic_ostream<_CharT, _Traits>& = std::__1::basic_ostream<_CharT, _Traits>::operator<<(std::__1::ios_base& = (*)(std::__1::ios_base& )) [with _CharT =3D char; _Traits =3D std::__1::char_traits<char>]^M basic_ostream<_CharT, _Traits>::operator<<(ios_base& = (*__pf)(ios_base&))^M ^^M /usr/obj/usr/srcC/tmp/usr/include/c++/v1/ostream:398:1: note: = std::__1::basic_ostream<_CharT, _Traits>& = std::__1::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = =3D char; _Traits =3D std::_ _1::char_traits<char>]^M basic_ostream<_CharT, _Traits>::operator<<(bool __n)^M ^^M /usr/obj/usr/srcC/tmp/usr/include/c++/v1/ostream:718:1: note: = std::__1::basic_ostream<_CharT, _Traits>& = std::__1::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with = _CharT =3D char; _Traits =3D std::__1::char_traits<char>]^M basic_ostream<_CharT, _Traits>::operator<<(const void* __n)^M ^^M /usr/obj/usr/srcC/tmp/usr/include/c++/v1/ostream:346:1: note: = std::__1::basic_ostream<_CharT, _Traits>& = std::__1::basic_ostream<_CharT, = _Traits>::operator<<(std::__1::basic_streambuf<_CharT, _Traits>* ) [with _CharT =3D char; _Traits =3D std::__1::char_traits<char>]^M basic_ostream<_CharT, _Traits>::operator<<(basic_streambuf<char_type, = traits_type>* __sb)^M ^^M /usr/obj/usr/srcC/tmp/usr/include/c++/v1/ostream:907:1: note: = std::__1::basic_ostream<char, _Traits>& = std::__1::operator<<(std::__1::basic_ostream<char, _Traits>&, const = unsigned char*) [with _Traits =3D std::__1::char_traits<char>]^M operator<<(basic_ostream<char, _Traits>& __os, const unsigned char* = __str)^M ^^M /usr/obj/usr/srcC/tmp/usr/include/c++/v1/ostream:899:1: note: = std::__1::basic_ostream<char, _Traits>& = std::__1::operator<<(std::__1::basic_ostream<char, _Traits>&, const = signed char*) [with _Traits =3D std::__1::char_traits<char>]^M operator<<(basic_ostream<char, _Traits>& __os, const signed char* = __str)^M ^^M /usr/obj/usr/srcC/tmp/usr/include/c++/v1/ostream:892:1: note: = std::__1::basic_ostream<char, _Traits>& = std::__1::operator<<(std::__1::basic_ostream<char, _Traits>&, const = char*) [with _Traits =3D std::__ 1::char_traits<char>]^M operator<<(basic_ostream<char, _Traits>& __os, const char* __str)^M ^^M /usr/obj/usr/srcC/tmp/usr/include/c++/v1/ostream:846:1: note: = std::__1::basic_ostream<_CharT, _Traits>& = std::__1::operator<<(std::__1::basic_ostream<_CharT, _Traits>&, const = char*) [with _CharT =3D char ; _Traits =3D std::__1::char_traits<char>]^M operator<<(basic_ostream<_CharT, _Traits>& __os, const char* __strn)^M ^^M Other context details: make CROSS_TOOLCHAIN=3Dpowerpc64-gcc \ WITHOUT_CLANG_BOOTSTRAP=3D \ WITHOUT_CLANG_IS_CC=3D WITHOUT_CLANG=3D WITHOUT_CLANG_EXTRAS=3D = WITHOUT_CLANG_FULL=3D \ WITHOUT_LLDB=3D \ WITHOUT_GCC_BOOTSTRAP=3D WITHOUT_GCC=3D \ WITHOUT_BINUTILS_BOOTSTRAP=3D WITHOUT_BINUTILS=3D buildworld buildkernel KERNCONF=3DGENERIC64vtsc-NODEBUG \ TARGET=3Dpowerpc TARGET_ARCH=3Dpowerpc64 (Yes I was being paranoid about various automatic settings that are = based on other ones. Any form of WITH_CLANG=3D blocks getting as far as = I did above.) This is a clang-not-in-use context (in fact not built at all, not even = an old one present), but in order to get by an issue where gcc 4.2.1 is = unfortunately used but was being told -std=3Dc++11 based on = clang.build.mk during some of my experiments, I have the local/personal = hack: # svnlite diff lib/clang/clang.build.mk Index: lib/clang/clang.build.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- lib/clang/clang.build.mk (revision 279514) +++ lib/clang/clang.build.mk (working copy) @@ -34,8 +34,8 @@ CFLAGS+=3D -DLLVM_DEFAULT_TARGET_TRIPLE=3D\"${TARGET_TRIPLE}\" \ -DLLVM_HOST_TRIPLE=3D\"${BUILD_TRIPLE}\" \ -DDEFAULT_SYSROOT=3D\"${TOOLS_PREFIX}\" -CXXFLAGS+=3D -std=3Dc++11 -fno-exceptions -fno-rtti -CXXFLAGS.clang+=3D -stdlib=3Dlibc++ +CXXFLAGS+=3D -fno-exceptions -fno-rtti +CXXFLAGS.clang+=3D -std=3Dc++11 -stdlib=3Dlibc++ =20 .PATH: ${LLVM_SRCS}/${SRCDIR} As has been pointed out by Dimitry Andric: this hack is not appropriate = to the FreeBSD code base since it would only set up -std=3Dc++11 for = clang contexts were CXXFLAGS+=3D${CXXFLAGS.${COMPILER_TYPE}} was also in = use. =3D=3D=3D Mark Millard markmi at dsl-only.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?90144A01-AD41-4B9A-B040-D342B60EAE02>