public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pogma at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/47032] libgfortran references complex long double functions missing on AIX
Date: Tue, 08 Feb 2011 21:04:00 -0000	[thread overview]
Message-ID: <bug-47032-4-Wh1xVcSwud@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-47032-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47032

--- Comment #10 from Peter O'Gorman <pogma at gcc dot gnu.org> 2011-02-08 21:03:46 UTC ---
(In reply to comment #9)

> > > > AC_CHECK_LIB([m],[copysignl],[AC_DEFINE([HAVE_COPYSIGNL],[1],\
> > > >    [libm includes copysignl])])

> So, for the AC_CHECK_LIB line above, what does the
> AC_LINK_IFELSE patch look like.

Totally untested - something like:

gcc_save_LIBS="$LIBS"
LIBS="$LIBS -lm"
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <math.h>],[return
(int)copysignl(-1.0,1.0);])],[AC_DEFINE([HAVE_COPYSIGNL],[1],[libm includes
copysignl])])
LIBS="$gcc_save_LIBS"

AIX's math.h has, conditional on 128 bit longdoubles:
#define copysignl(__x, __y)     __copysignl128((long double) (__x), (long
double) (__y))

And libm does indeed have a copysignl symbol (but it's missing __copysignl128),
so AC_CHECK_LIB says "yes, libm has copysignl", because it just checks if the
symbol exists in the library. #including math.h and then trying a link test
should give correct results because it will fail to find __copysignl128 in libm


  parent reply	other threads:[~2011-02-08 21:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-21 16:22 [Bug libfortran/47032] New: " dje at gcc dot gnu.org
2010-12-21 16:42 ` [Bug target/47032] " kargl at gcc dot gnu.org
2010-12-21 17:08 ` dje at gcc dot gnu.org
2010-12-21 18:37 ` sgk at troutmask dot apl.washington.edu
2010-12-28 16:10 ` rguenth at gcc dot gnu.org
2011-01-06 19:15 ` dje at gcc dot gnu.org
2011-01-25 20:34 ` michael.haubenwallner at salomon dot at
2011-02-04  5:16 ` rwild at gcc dot gnu.org
2011-02-08 20:49 ` pogma at gcc dot gnu.org
2011-02-08 20:55 ` sgk at troutmask dot apl.washington.edu
2011-02-08 21:04 ` pogma at gcc dot gnu.org [this message]
2011-02-08 22:24 ` michael.haubenwallner at salomon dot at
2011-02-12 15:08 ` burnus at gcc dot gnu.org

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=bug-47032-4-Wh1xVcSwud@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).