Patchwork Also install diagnostics.h

login
register
mail settings
Submitter H.J. Lu
Date July 3, 2018, 2:32 p.m.
Message ID <CAMe9rOoZHG4=fS_03saKvv=oWo8cYHG7y6MwCGi5ra2D-vZYBg@mail.gmail.com>
Download mbox | patch
Permalink /patch/28210/
State New
Headers show

Comments

H.J. Lu - July 3, 2018, 2:32 p.m.
On Mon, Jul 2, 2018 at 9:25 AM, Tulio Magno Quites Machado Filho
<tuliom@ascii.art.br> wrote:
> "H.J. Lu" <hjl.tools@gmail.com> writes:
>
>> GCC 8.1 warns about destination size with -Wstringop-truncation:
>>
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85643
>>
>> Use DIAGNOSTIC_IGNORE_STRINGOP_TRUNCATION to silence it.
>>
>> bfd/
>>
>>       PR binutils/23146
>>       * bfd-in.h: Include "diagnostics.h".
>>       * bfd-in2.h: Regenerated.
>
> bfd.h is an installed header, while diagnostics.h is not, causing build
> failures on software that include bfd.h, e.g.:
>
> In file included from opagent.c:65:
> bfd.h:44:10: fatal error: diagnostics.h: No such file or directory
>  #include "diagnostics.h"
>           ^~~~~~~~~~~~~~~
>

Here is a patch.  OK for master and 2.31 branch?
Nick Clifton - July 4, 2018, 11:07 a.m.
Hi H.J.

>>> bfd/
>>>
>>>       PR binutils/23146
>>>       * bfd-in.h: Include "diagnostics.h".
>>>       * bfd-in2.h: Regenerated.

> Here is a patch.  OK for master and 2.31 branch?

Approved - please apply (both master and branch).

Cheers
  Nick

Patch

From dab73c9e779922f4286ddaa94f4b75ccef2c7d51 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Tue, 3 Jul 2018 07:27:48 -0700
Subject: [PATCH] Also install diagnostics.h

Since bfd.h is an installed header, also install diagnostics.h.

	* Makefile.am (bfdinclude_HEADERS): Add $(INCDIR)/diagnostics.h.
	* Makefile.in: Regenerated.
---
 bfd/Makefile.am | 3 ++-
 bfd/Makefile.in | 6 ++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index d7f9ed7c45..3f3487f6a4 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -32,7 +32,8 @@  if INSTALL_LIBBFD
 bfdlibdir = @bfdlibdir@
 bfdincludedir = @bfdincludedir@
 bfdlib_LTLIBRARIES = libbfd.la
-bfdinclude_HEADERS = $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/bfdlink.h
+bfdinclude_HEADERS = $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+		     $(INCDIR)/bfdlink.h $(INCDIR)/diagnostics.h
 else !INSTALL_LIBBFD
 # Empty these so that the respective installation directories will not be created.
 bfdlibdir =
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index 47a16d94a3..cc27ef0a62 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -247,7 +247,8 @@  am__can_run_installinfo = \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__bfdinclude_HEADERS_DIST = $(INCDIR)/plugin-api.h bfd.h \
-	$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/bfdlink.h
+	$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/bfdlink.h \
+	$(INCDIR)/diagnostics.h
 HEADERS = $(bfdinclude_HEADERS)
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
   distclean-recursive maintainer-clean-recursive
@@ -466,7 +467,8 @@  libbfd_la_LDFLAGS = $(am__append_1) -release `cat libtool-soversion` \
 @INSTALL_LIBBFD_FALSE@bfdinclude_HEADERS = $(am__append_2)
 @INSTALL_LIBBFD_TRUE@bfdinclude_HEADERS = $(BFD_H) \
 @INSTALL_LIBBFD_TRUE@	$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
-@INSTALL_LIBBFD_TRUE@	$(INCDIR)/bfdlink.h $(am__append_2)
+@INSTALL_LIBBFD_TRUE@	$(INCDIR)/bfdlink.h \
+@INSTALL_LIBBFD_TRUE@	$(INCDIR)/diagnostics.h $(am__append_2)
 @INSTALL_LIBBFD_FALSE@rpath_bfdlibdir = @bfdlibdir@
 @INSTALL_LIBBFD_FALSE@noinst_LTLIBRARIES = libbfd.la
 
-- 
2.17.1