On Mon, May 4, 2015 at 3:49 PM, Yunlian Jiang <yunl...@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 via email to