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: Fri, 22 May 2015 21:25:00 -0000 [thread overview]
Message-ID: <CAKOQZ8zDTBtttt7oYWhge0C+fUw3ydbe=dzkk8_ZPRheEUt6bA@mail.gmail.com> (raw)
In-Reply-To: <CAMsPy2sbrhrL4cuCaF_mYPE3icr-sph8mk26xoF-P8eDF2gNvQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 518 bytes --]
On Wed, May 20, 2015 at 3:58 PM, Yunlian Jiang <yunlian@google.com> wrote:
> GCC bootstraps with this patch.
Committed as follows.
Ian
include/:
2015-05-22 Yunlian Jiang <yunlian@google.com>
* libiberty.h (asprintf): Don't declare if HAVE_DECL_ASPRINTF is
not defined.
libiberty/:
2015-05-22 Yunlian Jiang <yunlian@google.com>
* configure.ac: Add AC_GNU_SOURCE.
* Makefile.in (COMPILE.c): Add -D_GNU_SOURCE.
* configure, config.in: Rebuild.
* floatformat.c (_GNU_SOURCE): Don't define if already defined.
[-- Attachment #2: foo.txt --]
[-- Type: text/plain, Size: 1898 bytes --]
Index: include/libiberty.h
===================================================================
--- include/libiberty.h (revision 223578)
+++ include/libiberty.h (working copy)
@@ -621,7 +621,7 @@ extern int pexecute (const char *, char
extern int pwait (int, int *, int);
-#if !HAVE_DECL_ASPRINTF
+#if defined(HAVE_DECL_ASPRINTF) && !HAVE_DECL_ASPRINTF
/* Like sprintf but provides a pointer to malloc'd storage, which must
be freed by the caller. */
Index: libiberty/Makefile.in
===================================================================
--- libiberty/Makefile.in (revision 223578)
+++ libiberty/Makefile.in (working copy)
@@ -113,7 +113,8 @@ installcheck: installcheck-subdir
INCDIR=$(srcdir)/$(MULTISRCTOP)../include
-COMPILE.c = $(CC) -c @DEFS@ $(CFLAGS) $(CPPFLAGS) -I. -I$(INCDIR) $(HDEFINES) @ac_libiberty_warn_cflags@
+COMPILE.c = $(CC) -c @DEFS@ $(CFLAGS) $(CPPFLAGS) -I. -I$(INCDIR) \
+ $(HDEFINES) @ac_libiberty_warn_cflags@ -D_GNU_SOURCE
# Just to make sure we don't use a built-in rule with VPATH
.c.$(objext):
Index: libiberty/configure.ac
===================================================================
--- libiberty/configure.ac (revision 223578)
+++ libiberty/configure.ac (working copy)
@@ -155,6 +155,7 @@ AC_MSG_NOTICE([target_header_dir = $targ
GCC_NO_EXECUTABLES
AC_PROG_CC
+AC_GNU_SOURCE
AC_SYS_LARGEFILE
AC_PROG_CPP_WERROR
Index: libiberty/floatformat.c
===================================================================
--- libiberty/floatformat.c (revision 223578)
+++ libiberty/floatformat.c (working copy)
@@ -19,7 +19,9 @@ along with this program; if not, write t
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This is needed to pick up the NAN macro on some systems. */
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE
+#endif
#ifdef HAVE_CONFIG_H
#include "config.h"
prev parent reply other threads:[~2015-05-22 20:55 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
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 ` DJ Delorie
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 [this message]
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='CAKOQZ8zDTBtttt7oYWhge0C+fUw3ydbe=dzkk8_ZPRheEUt6bA@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).