From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 98152 invoked by alias); 11 Jan 2019 11:01:07 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 98104 invoked by uid 89); 11 Jan 2019 11:01:06 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=0.6 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,KAM_SHORT,KAM_STOCKGEN,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=shortly X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 11 Jan 2019 11:01:03 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A4A69C070E2A; Fri, 11 Jan 2019 11:01:01 +0000 (UTC) Received: from localhost (unknown [10.33.36.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 227E060603; Fri, 11 Jan 2019 11:01:00 +0000 (UTC) Date: Fri, 11 Jan 2019 11:01:00 -0000 From: Jonathan Wakely To: Rainer Orth Cc: Ville Voutilainen , libstdc++ , "gcc-patches@gcc.gnu.org" Subject: Re: [v3 PATCH] Implement LWG 2221, No formatted output operator for nullptr Message-ID: <20190111110059.GF15627@redhat.com> References: <20171204230424.GA31922@redhat.com> <20190110131519.GC15627@redhat.com> <20190111000146.GE15627@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.10.1 (2018-07-13) X-SW-Source: 2019-01/txt/msg00612.txt.bz2 On 11/01/19 10:07 +0100, Rainer Orth wrote: >Hi Jonathan, > >>>this patch broke Solaris bootstrap: >>> >>>ld: fatal: libstdc++-symbols.ver-sun: 7117: symbol 'std::basic_ostream >::operator<<(decltype(nullptr))': symbol version conflict >>>ld: fatal: libstdc++-symbols.ver-sun: 7119: symbol 'std::basic_ostream >::operator<<(decltype(nullptr))': symbol version conflict >>> >>>ld: fatal: libstdc++-symbols.ver-sun: 7117: symbol '_ZNSolsEDn': symbol version conflict >>>ld: fatal: libstdc++-symbols.ver-sun: 7119: symbol '_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEDn': symbol version conflict >>> >>>Again, there were two matches for those two symbols: >>> >>> GLIBCXX_3.4 >>> ##_ZNSolsE*[^Dg] (glob) >>> _ZNSolsEDn; >>> GLIBCXX_3.4.26 >>> ##_ZNSolsEDn (glob) >>> _ZNSolsEDn; >>> >>> GLIBCXX_3.4 >>> ##_ZNSt13basic_ostreamIwSt11char_traitsIwEElsE*[^Dg] (glob) >>> _ZNSt13basic_ostreamIwSt11char_traitsIwEElsEDn; >>> GLIBCXX_3.4.26 >>> ##_ZNSt13basic_ostreamIwSt11char_traitsIwEElsEDn (glob) >>> _ZNSt13basic_ostreamIwSt11char_traitsIwEElsEDn; >>> >>>ISTM that the patterns were backwards. The following patch fixes this >>>and allowed i386-pc-solaris2.11 bootstrap to complete without >>>regressions relative to the last successful one. >> >> I think what I should have done is change [^g] to [^gn]. That >> preserves the original behaviour (don't match the ppc64 long double >> symbols) but also excludes the new symbols, which end in 'n'. >> >> Maybe the attached patch would be better though. It matches every >> basic_ostream::operator<<(T) for any scalar T except 'g', and adds a >> second pattern to match basic_ostream::operator<<(T*) for various T. >> But neither of those matches the new operator<<(nullptr_t) overload. > >it allowed me to link libstdc++.so, too. For my patch I'd only been >going from the ld errors and the matching patterns in the generated >libstdc++.map-sun, not knowing the background here. THanks for checking it. I've committed the patch now. >> FWIW I did run my symbol checker script, but it gets lots of false >> positives because it doesn't understand the #if preprocessor >> conditions, so it sees lots of false positive duplicates. I need to >> make it smarter for it to be useful here. > >Indeed: the variation possible here can be a total PITA ;-) I've managed to cobble together a pipeline with sed and cpp that allows me to test the linker script properly. It found some conflicts that still remain but presumably aren't present on Solaris because HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT is not defined. There's one remaining conflict, which https://gcc.gnu.org/PR88125 covers. I'll commit a patch for those shortly.