From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by sourceware.org (Postfix) with ESMTPS id E0CF9381DCE1 for ; Mon, 16 Mar 2020 20:50:37 +0000 (GMT) Received: by mail-pj1-x1036.google.com with SMTP id hg10so5012077pjb.1 for ; Mon, 16 Mar 2020 13:50:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=zRAamr0mXegIAd8HyyWcuO2vldtySpXE4sHftc9BPD8=; b=m7qrmtErRKhZdc099v5LTQtVHUXRBIEO0+Zryh4wHeenq94b22bCBy+doDIbqgJFoz K63b45I8bc64ukGNv48Wa+FFkUir0GYQOAN12zgmQmAXmHykYPFn34vBeo6Tw6BE7+Oi EwIeqUHpU9k3DN4VyiaVg3RVT9+/ab4o/5tWysKUIHEBPsFQkaMNpzTv8CCe1xZ50UOb 15zFh4JVyy8cA4phublghozk84OX/AoR1NrhLlGIQzSS8+tYi9Ydc6+UTINKv03jRFSv ciTjtONGvThIPbYEbxyC+6oFJO1So3LFOQqGmZllTVRpKWIYsarhejxqlFkYgBLVrlX+ a6UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zRAamr0mXegIAd8HyyWcuO2vldtySpXE4sHftc9BPD8=; b=MOzPdutTTacdBqGl8tnzcqgn1oJ/SYSfLojJA4sIOwAUZwReRXxaXDNkGldtTYdb9b x1l9NWni/U2KoN91JlJHq8XQkwUx+NTkgfdN5I3UB7RaZsCFiqaqZ77FpSQUkQQu1YHE 39NlvoMqvTdlxMN1/gBtlQVumxuOqOWwyzQ0QNUoj12wJu8IQLjhA3oyiQR+FGlo1NHc xCqpbyHmWHfYlUY1lKmJOlI9h9I26MTaU4Nb1v2ZVhscKU4aKrEGq9zA07ha+N83LyIy sax85on+Gb+BDupAKcLWIFl7maccC4WGHdfzFKY8qaP840ysUjwwYz7Gcp01zpEwbJmX UAgg== X-Gm-Message-State: ANhLgQ3th0h3AoYR8fMNJUZdlux0CQ8Ki3eGQp8dBOItr/1tHVIhcTCe zUgr9ZIR8HuAnpXDCPAJS0Ape0MW+LA= X-Google-Smtp-Source: ADFU+vsgeZZ3TbLTfN6/5sUQ3YKpr6wdQtaqtx+sUZHa+QGMb3Ey0zqDX9k41nY5RjMpvoIMjbM2pA== X-Received: by 2002:a17:902:b206:: with SMTP id t6mr880219plr.75.1584391836709; Mon, 16 Mar 2020 13:50:36 -0700 (PDT) Received: from ?IPv6:2601:646:c180:b150:4cd9:c767:ef2d:a406? ([2601:646:c180:b150:4cd9:c767:ef2d:a406]) by smtp.gmail.com with ESMTPSA id 129sm756244pfw.84.2020.03.16.13.50.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Mar 2020 13:50:35 -0700 (PDT) Subject: Re: disable-newlib-io-long-double? To: "chengzhiwei (C)" , "newlib@sourceware.org" References: <7D9266CBFB4E9A4B9C7B1D0341567D860173083C@DGGEMI529-MBX.china.huawei.com> From: Jim Wilson Message-ID: Date: Mon, 16 Mar 2020 13:50:34 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <7D9266CBFB4E9A4B9C7B1D0341567D860173083C@DGGEMI529-MBX.china.huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Mar 2020 20:50:39 -0000 On 3/16/20 4:37 AM, chengzhiwei (C) wrote: > In my project, all of the quadrature symbols have been stripped away in libgcc.a, so when I built newlib toolchain based on riscv32 target, we used the option "--disable-newlib-io-long-double" to turn off the feature of long double. But when performing a floating-point calculation, the symbol "trunctfdf2" is not defined correctly: > libc.a(lib_a-vfprintf.o): in function `.L60':vfprintf.c:(.text+0x3fe): undefined reference to `__trunctfdf2' --disable-newlib-io-long-double is the default. That configure option shouldn't do anything. __trunctfdf2 comes from libgcc. Are you linking with libgcc? Of course, if you have long double disabled, it is odd that you get a call to trunctfdf2. You should check how the vfprintf.c file was compiled. There is a _NO_LONGDBL that should be defined by default, and should prevent any long double code from being enabled in that file. Jim