[binutils-gdb] Pass DEBUGINFOD_CFLAGS when compiling dwarf.c

Alan Modra amodra@sourceware.org
Thu Nov 18 08:27:30 GMT 2021


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2cd93e7081167a002e568f03a72feabd7f187820

commit 2cd93e7081167a002e568f03a72feabd7f187820
Author: Alan Modra <amodra@gmail.com>
Date:   Wed Nov 17 15:10:04 2021 +1030

    Pass DEBUGINFOD_CFLAGS when compiling dwarf.c
    
    Pick up the elfutils/debuginfod.h install location -I flags from
    a variable set by debuginfod.m4 (via pkg.m4 and pkg-config).
    
            * Makefile.am (DEBUGINFOD_CFLAGS): Define.
            (dwarf.@OBJECT@): New rule.

Diff:
---
 binutils/Makefile.am | 17 +++++++++++++++--
 binutils/Makefile.in |  7 +++++++
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/binutils/Makefile.am b/binutils/Makefile.am
index 7f4c24c213b..ee2a66302cd 100644
--- a/binutils/Makefile.am
+++ b/binutils/Makefile.am
@@ -46,6 +46,9 @@ am__skipyacc =
 ZLIB = @zlibdir@ -lz
 ZLIBINC = @zlibinc@
 
+DEBUGINFOD_CFLAGS = @DEBUGINFOD_CFLAGS@
+DEBUGINFOD_LIBS = @DEBUGINFOD_LIBS@
+
 WARN_CFLAGS = @WARN_CFLAGS@
 WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@
 NO_WERROR = @NO_WERROR@
@@ -53,8 +56,6 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC)
 AM_CFLAGS_FOR_BUILD = $(WARN_CFLAGS_FOR_BUILD) $(ZLIBINC)
 LIBICONV = @LIBICONV@
 
-DEBUGINFOD_LIBS = @DEBUGINFOD_LIBS@
-
 # these two are almost the same program
 AR_PROG=ar
 RANLIB_PROG=ranlib
@@ -366,6 +367,18 @@ endif
 	$(COMPILE) -c `test -f arlex.c || echo $(srcdir)/`arlex.c $(NO_WERROR)
 endif
 
+dwarf.@OBJEXT@: dwarf.c
+if am__fastdepCC
+	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo $(DEBUGINFOD_CFLAGS) -c -o $@ $(srcdir)/dwarf.c
+	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+else
+if AMDEP
+	source='dwarf.c' object='$@' libtool=no @AMDEPBACKSLASH@
+	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+endif
+	$(COMPILE) $(DEBUGINFOD_CFLAGS) -c -o $@ $(srcdir)/dwarf.c
+endif
+
 sysroff.@OBJEXT@: sysroff.c
 if am__fastdepCC
 	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f sysroff.c || echo $(srcdir)/`sysroff.c $(NO_WERROR)
diff --git a/binutils/Makefile.in b/binutils/Makefile.in
index 5252ef18b5c..8f44b566725 100644
--- a/binutils/Makefile.in
+++ b/binutils/Makefile.in
@@ -1530,6 +1530,13 @@ arlex.@OBJEXT@: arlex.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(COMPILE) -c `test -f arlex.c || echo $(srcdir)/`arlex.c $(NO_WERROR)
 
+dwarf.@OBJEXT@: dwarf.c
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo $(DEBUGINFOD_CFLAGS) -c -o $@ $(srcdir)/dwarf.c
+@am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='dwarf.c' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(COMPILE) $(DEBUGINFOD_CFLAGS) -c -o $@ $(srcdir)/dwarf.c
+
 sysroff.@OBJEXT@: sysroff.c
 @am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f sysroff.c || echo $(srcdir)/`sysroff.c $(NO_WERROR)
 @am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po


More information about the Binutils-cvs mailing list