public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: Yunlian Jiang <yunlian@google.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH/libiberty] fix build of gdb/binutils with clang.
Date: Tue, 05 May 2015 00:30:00 -0000	[thread overview]
Message-ID: <CAKOQZ8ybeY+6bC0XXVy4Ge3QPEcg6XcvhwBuXQjHhLRTMabm8g@mail.gmail.com> (raw)
In-Reply-To: <CAMsPy2s2A8U-vTE8u9y+P+xmESKMSuHD=6RV798KNEQKbZdXUg@mail.gmail.com>

On Mon, May 4, 2015 at 3:49 PM, Yunlian Jiang <yunlian@google.com> wrote:
> There was a similar disscussion here
> https://gcc.gnu.org/ml/gcc/2005-11/msg01190.html

That was a discussion about libiberty.  Your subject says you have
trouble building gdb.

Can you describe the exact problem that you are having?  What
precisely are you doing?  What precisely happens?


> The problem is in the configure stage, the __GNU_SOURCE is not
> defined, and it could not find
> the declaration of asprintf. so it make a declaration of asprintf in
> libiberty.h. And  for the file floatformat.c,
> the  __GNU_SOURCE is defined, so it could find another asprintf in
> /usr/include/bits/stdio2.h, it also includes
> libiberty.h. So these two asprintf conflicts when __USE_FORTIFY_LEVEL is set.

I think the basic guideline should be that HAVE_DECL_ASPRINTF should
be correct.  If libiberty compiled with _GNU_SOURCE defined, then it
should test HAVE_DECL_ASPRINTF with _GNU_SOURCE defined.  If not, then
not.  So perhaps the problem is that libiberty is compiling some files
with _GNU_SOURCE defined and some not.

Ian

  reply	other threads:[~2015-05-05  0:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-28 22:30 Yunlian Jiang
2015-05-01 22:45 ` Ian Lance Taylor
2015-05-01 23:45   ` Yunlian Jiang
2015-05-02 18:58     ` Ian Lance Taylor
2015-05-04 22:49       ` Yunlian Jiang
2015-05-05  0:30         ` Ian Lance Taylor [this message]
2015-05-18 23:52           ` Yunlian Jiang
2015-05-19  0:15             ` Ian Lance Taylor
2015-05-19 18:15               ` Yunlian Jiang
2015-05-19 18:16                 ` Ian Lance Taylor
2015-05-20 18:28                   ` Yunlian Jiang
2015-05-20 20:15                     ` Ian Lance Taylor
2015-05-20 23:27                       ` Yunlian Jiang
2015-05-22 21:25                         ` Ian Lance Taylor
2015-05-19 18:16                 ` DJ Delorie

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=CAKOQZ8ybeY+6bC0XXVy4Ge3QPEcg6XcvhwBuXQjHhLRTMabm8g@mail.gmail.com \
    --to=iant@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=yunlian@google.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).