From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 5B70C3858C55 for ; Mon, 7 Nov 2022 17:48:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5B70C3858C55 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667843336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=759yf5TaOiTmWyhfhpSw+pqs5ZRehdG4r69Z0ZHaRQ4=; b=NL5C44gwOJjv+F8ZBoQll6puR0VNjBs1XeVyFsuKC3krVep4+tDSPKVfmtvWGnr+1N6xRz VC0DEgjZXu5Z9r5b7PPD/TGFQsGtrh1pakhhjNYUfdp2HoaBHtd1+md5/txc9xGUBwFjp3 LHmcq5VDSuhiTVq9uIKY11doSooJFe4= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-594-QKM3Dwp1PvKIFaOtCBRMNg-1; Mon, 07 Nov 2022 12:48:54 -0500 X-MC-Unique: QKM3Dwp1PvKIFaOtCBRMNg-1 Received: by mail-ed1-f72.google.com with SMTP id dz9-20020a0564021d4900b0045d9a3aded4so8972116edb.22 for ; Mon, 07 Nov 2022 09:48:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=759yf5TaOiTmWyhfhpSw+pqs5ZRehdG4r69Z0ZHaRQ4=; b=wKUzEvJ3OofOar22z7fCZFf97TLSCbQgjxvmKmpUwfGnxyLKlmHYAjT1a9iGvNOBNF /HGYRlmHRZHbuASDL7f7aowDNR/LjbVhjbUi2xd+lTm8Ap0XY0Ct4ZsqZH3rGJJaPHyf qkmbjm/KoTAF2xwWUrxsTwftYNBUfyPwqj1Wfhg3FmHgzgLBw1bgxZ4VKR8YgumfEy6s ySq4wh1buYLISnpOCtPlUv4GmnPHcok+TFbF+QSR21o+5RsUkaNK2H2D78PHPpT+iW/0 Oo0h1m9OEGCoaeqEGNT8Yv48Z4DdRWO+nr8tkUicHaN/A5aW9gZMA8thQKjsRbW8f1+0 F3xg== X-Gm-Message-State: ACrzQf3c03+lYClwjY6MdXeXK/hiniVxFolbjzzKhEZAHGg7n9JsRP3c m31VuSCqpqW9zmh8iyrgL2SxUC4JQUqKxwCF1D11Tu8rGeR+kKiZ2wBDEYbfgnSwWPKI7gAj2ss +w3jra0toWGlrFe2pRdo1NiFI003A6D8= X-Received: by 2002:a05:6402:50d4:b0:461:e349:56b2 with SMTP id h20-20020a05640250d400b00461e34956b2mr52639772edb.17.1667843333759; Mon, 07 Nov 2022 09:48:53 -0800 (PST) X-Google-Smtp-Source: AMsMyM5S0avec32WKPaDZDqqgL09pdbMr49Q7TIGPvegrn6nn5HKBjALAkafdMgNfnpEPw+lhs5NyB7vqjBBlLb04xY= X-Received: by 2002:a05:6402:50d4:b0:461:e349:56b2 with SMTP id h20-20020a05640250d400b00461e34956b2mr52639759edb.17.1667843333525; Mon, 07 Nov 2022 09:48:53 -0800 (PST) MIME-Version: 1.0 References: <6cffcff-f879-c122-2aeb-fa53714511ac@codesourcery.com> In-Reply-To: <6cffcff-f879-c122-2aeb-fa53714511ac@codesourcery.com> From: Jonathan Wakely Date: Mon, 7 Nov 2022 17:48:42 +0000 Message-ID: Subject: Re: [PATCH] libstdc++: Add _Float128 to_chars/from_chars support for x86, ia64 and ppc64le with glibc To: Joseph Myers Cc: Jakub Jelinek , Patrick Palka , libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, 7 Nov 2022 at 16:11, Joseph Myers wrote: > > On Wed, 2 Nov 2022, Jakub Jelinek via Gcc-patches wrote: > > > APIs. So that one can build gcc against older glibc and then compile > > user programs on newer glibc, the patch uses weak references unless > > gcc is compiled against glibc 2.26+. strfromf128 unfortunately can't > > This support for older glibc doesn't actually seem to be working, on an > older system with glibc 2.19 I'm seeing > > /scratch/jmyers/fsf/gcc-mainline/libstdc++-v3/src/c++17/floating_to_chars.cc:52:3: error: expected initializer before '__asm' > 52 | __asm ("strfromf128"); > | ^~~~~ > > and a series of subsequent errors. This seems to "fix" it (not sure if it's right though): #ifndef _GLIBCXX_HAVE_FLOAT128_MATH extern "C" _Float128 __strtof128(const char*, char**) __attribute__((__weak__)); #endif extern "C" _Float128 __strtof128(const char*, char**) __asm ("strtof128");