From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id DA1ED3858C54 for ; Thu, 31 Mar 2022 14:21:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DA1ED3858C54 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3C92F1576; Thu, 31 Mar 2022 07:21:16 -0700 (PDT) Received: from [10.57.40.209] (unknown [10.57.40.209]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9F1433F73B; Thu, 31 Mar 2022 07:21:15 -0700 (PDT) Message-ID: <567cc39e-e13c-3b99-0fb1-b3a4d570d478@foss.arm.com> Date: Thu, 31 Mar 2022 15:21:14 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: Need to build libgfortran.a and libquadmath.a Content-Language: en-GB To: Andy Bowery , "gcc-help@gcc.gnu.org" , Xi Ruoyao References: <222147991.846192.1648491515241.ref@mail.yahoo.com> <222147991.846192.1648491515241@mail.yahoo.com> <1606762617.1111945.1648567787021@mail.yahoo.com> <6247a12143870e5ca945896b0ce2cd10c65953f7.camel@mengyan1223.wang> <763223208.228894.1648732858684@mail.yahoo.com> From: Richard Earnshaw In-Reply-To: <763223208.228894.1648732858684@mail.yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3491.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, KAM_SHORT, NICE_REPLY_A, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2022 14:21:19 -0000 On 31/03/2022 14:20, Andy Bowery via Gcc-help wrote: > > Thank you Ruoyao for your answer on this. > Does anyone in the community have experience of building 'libquadmath' on the ARM  (aarch64) platform?Particularly using gcc, are there flags that I need to set in order to get it built? Or should I obtain the ARM compiler provided by ARM (which is not free unfortunately)? > Thanks, > Andy Bowery On Tuesday, 29 March 2022, 16:56:13 BST, Xi Ruoyao wrote: > > On Tue, 2022-03-29 at 15:29 +0000, Andy Bowery via Gcc-help wrote: >>  Thank you Jonathan for your quick response. I am afraid at the moment >> I don't have access to such a multicore system. I will investigate >> setting one up. >> I tried a different approach and that was to build within the >> libgfortran subfolder, by running 'configure' followed by 'make' in >> that subfolder. I needed to make libbacktrace.la and libbacktrace.a >> available. However this worked and 'libgfortran.a' was created. >> So I tried the same approach in the libquadmath subfolder in order to >> build 'libquadmath.a'. So in this subfolder I ran: >> automake./configuremake >> However all I got was the following output and no files created: >> make  all-am >> make[1]: Entering directory '/home/root/gcc/libquadmath' >> >> make  DO=all multi-do # make >> >> make[2]: Entering directory '/home/root/gcc/libquadmath' >> >> make[2]: Leaving directory '/home/root/gcc/libquadmath' >> make[1]: Leaving directory '/home/root/gcc/libquadmath' >> >> What should I do here? I presume that this is what the higher Makefile >> in gcc runs in this subfolder. So if I was run 'make' of the gcc >> folder all the through, I presume that it wouldn't make the file >> 'libquadmath.a' either. How do I get it to make libquadmath.a using >> the Makefile in the libquadmath subfolder? > > I don't think this is supported by GCC building system.  libquadmath, > like other GCC target libraries, is only expected to be built with the > exact same GCC version in the release tarball.  Using another compiler > may cause failure. > > For this specific issue, take a look at configure.ac: > > AM_CONDITIONAL(BUILD_LIBQUADMATH, [test "x$libquad_cv_have_float128" = xyes]) > > So, if your compiler does not support __float128, libquadmath building > system will do nothing. > > From https://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html: > >     __float128 is available on i386, x86_64, IA-64, and hppa HP-UX, as >     well as on PowerPC GNU/Linux targets that enable the vector scalar >     (VSX) instruction set. > > So I guess __float128 is simply not available for your target.  Then > there is no way to build libquadmath for it. The AArch64 port of GCC provides _Float128, but it would appear it does not provide __float128. Perhaps this is because the standards have started to move towards the former and the latter is some GNU extension? Perhaps you could hack this by building with -D__float128=_Float128. R.