From owner-svn-src-all@FreeBSD.ORG Mon Oct 22 07:24:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0C059D57; Mon, 22 Oct 2012 07:24:51 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7EB6F8FC0C; Mon, 22 Oct 2012 07:24:50 +0000 (UTC) Received: by mail-ob0-f182.google.com with SMTP id wc20so2866625obb.13 for ; Mon, 22 Oct 2012 00:24:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=e9lGkccThp3K67pxWRJ+5T63ytRIFtOQLT4b82iVhA4=; b=VH09R/lCv5c3GNLgKb01f7vBZWnbRBvxV4r1dho4YPKNPC+UkDls3HFNongH0bP2Kd fhCSNfzMheSGJlXmkNSRjoB2+GeiyE4m0+AnWQ4PdSfYdKRANVZ7hOY19+sTQXdwh+ji HcKNTewSunLnD3t9yVxDYZhgIpqcRGjp46WtkxGG7eip578PiK85tvdqS0Pfr8j8e+BW u8e+PVpOwx8CM2hv2MrjiUIU2VaCVTNF3XcZUbNZjgK3aVRfVljJlwQuRCGS1XHpiRIw /rOh03J9ksfKnycA/g4TCE1Fp1ETIyhZcjmbU2acAe6IB9pOcUW6RIe7fn8VdgfnDlkv Q0tg== MIME-Version: 1.0 Received: by 10.182.172.74 with SMTP id ba10mr6228777obc.83.1350890684003; Mon, 22 Oct 2012 00:24:44 -0700 (PDT) Received: by 10.76.143.33 with HTTP; Mon, 22 Oct 2012 00:24:43 -0700 (PDT) In-Reply-To: <1TQC0L-000AZG-Q5@internal.tormail.org> References: <201210220118.q9M1Ifh5098857__14926.3614825488$1350868751$gmane$org@svn.freebsd.org> <1TQC0L-000AZG-Q5@internal.tormail.org> Date: Mon, 22 Oct 2012 00:24:43 -0700 Message-ID: Subject: Re: svn commit: r241823 - in head: . etc etc/atf etc/mtree lib lib/atf lib/atf/libatf-c lib/atf/libatf-c++ libexec libexec/atf libexec/atf/atf-check share share/atf share/doc share/doc/atf share/exampl... From: Garrett Cooper To: Jan Beich Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar , Dimitry Andric , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2012 07:24:51 -0000 On Mon, Oct 22, 2012 at 12:00 AM, Jan Beich wrote: > Marcel Moolenaar writes: > >> Author: marcel >> Date: Mon Oct 22 01:18:41 2012 >> New Revision: 241823 >> URL: http://svn.freebsd.org/changeset/base/241823 >> >> Log: >> Add ATF to the build. This is may be a bit rought around the egdes, >> but committing it helps to get everyone on the same page and makes >> sure we make progress. > [...] > > 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 >&)': > /usr/src/usr.bin/atf/atf-run/../../../contrib/atf/atf-run/test-program.cpp:76: undefined reference to `std::__1::basic_ios >::clear(unsigned int)' > clang++: error: linker command failed with exit code 1 (use -v to see invocation) Is it a bug in libc++ where it's doing the wrong thing inlining some values for basic_ios (my guess is based on the snippet example at: http://www.cplusplus.com/reference/iostream/ios/clear/ ): $ p4 diff -du ios --- //depot/user/gcooper/atf-head/src/contrib/libc++/include/ios 2012-05-20 04:37:04.000000000 0000 +++ /scratch/p4/user/gcooper/atf-head/src/contrib/libc++/include/ios 2012-05-20 04:37:04.000000000 0000 @@ -575,10 +575,10 @@ _LIBCPP_ALWAYS_INLINE _LIBCPP_EXPLICIT operator bool() const {return !fail();} - _LIBCPP_ALWAYS_INLINE bool operator!() const {return fail();} - _LIBCPP_ALWAYS_INLINE iostate rdstate() const {return ios_base::rdstate();} - _LIBCPP_ALWAYS_INLINE void clear(iostate __state = goodbit) {ios_base::clear(__state);} - _LIBCPP_ALWAYS_INLINE void setstate(iostate __state) {ios_base::setstate(__state);} + _LIBCPP_INLINE_VISIBILITY bool operator!() const {return fail();} + _LIBCPP_INLINE_VISIBILITY iostate rdstate() const {return ios_base::rdstate();} + void clear(iostate __state = goodbit) {ios_base::clear(__state);} + _LIBCPP_INLINE_VISIBILITY void setstate(iostate __state) {ios_base::setstate(__state);} _LIBCPP_ALWAYS_INLINE bool good() const {return ios_base::good();} _LIBCPP_ALWAYS_INLINE bool eof() const {return ios_base::eof();} _LIBCPP_ALWAYS_INLINE bool fail() const {return ios_base::fail();} I'm building clang and libc++ in my VM to confirm. Thanks! -Garrett