public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tobias Burnus <tobias.burnus@physik.fu-berlin.de>
To: Tristan Gingold <gingold@adacore.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	fortran@gcc.gnu.org
Subject: Re: [Patch] libgfortran: do not assume libm
Date: Tue, 20 Mar 2012 09:49:00 -0000	[thread overview]
Message-ID: <20120320094857.GB27039@physik.fu-berlin.de> (raw)

Hi Tristan,

> I am starting to build fortran for VMS.

Thanks for the patch and this endeavor.

> The first serious issue was with libgfortran/configure.  It checks for
> several math functions, but directly in libm using AC_CHECK_LIB.
> But there is on such things as libm on VMS systems 

I think after building you will run into the same issue when using
gfortran. The linking of -lm is hardcoded in gcc/fortran/gfortranspec.c
(search there for MATH_LIBRARY).

And it is hard coded in libgfortran/libgfortran.spec.in and in the
as-needed check of libgfortran/acinclude.m4 within a libquadmath check.

Talking about libquadmath, its libquadmath/configure.ac has the same issue.

 * * *

To your patch:

First, I am far from being a configure expert and thus would like if
a build maintainer could have a look (or Janne, who seems to have also
more experience.)


I don't understand the purpose of the line:

+# Check for libm
+AC_CHECK_LIB([m],[sin])

Except of printing to stdout and to the logs whether -lm is available and
contains "sin", it doesn't seem to do anything. If that's the purpose, I think
it needs a better comment. If not, I would like to know its purpose.

Otherwise, the patch looks fine to me - but as written, I would like if
someone else (build maintainer, Janne, ...) could have a look.

Tobias

             reply	other threads:[~2012-03-20  9:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-20  9:49 Tobias Burnus [this message]
2012-03-20  9:57 ` Tristan Gingold
2012-03-22  8:30 ` [Patch V2] " Tristan Gingold
2012-03-22 10:07   ` Paolo Bonzini
2012-03-22 20:57     ` Tobias Burnus
2012-03-26  8:44     ` Tristan Gingold
2012-03-26 21:43       ` Janne Blomqvist
2012-03-27  7:51         ` Tristan Gingold
2012-03-27  8:01           ` Tristan Gingold
2012-03-27  8:39             ` Janne Blomqvist
2012-03-27  9:29               ` Tristan Gingold
2012-03-30 10:22               ` Tristan Gingold
2012-03-30 12:40                 ` Paolo Bonzini
2012-04-02  7:47                   ` Tristan Gingold
  -- strict thread matches above, loose matches on Subject: below --
2012-03-20  9:02 [Patch] " Tristan Gingold
2012-03-20  9:58 ` Ralf Corsepius
2012-03-20 10:16   ` Tristan Gingold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120320094857.GB27039@physik.fu-berlin.de \
    --to=tobias.burnus@physik.fu-berlin.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gingold@adacore.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).