From: Alan Modra Date: Wed, 17 Nov 2021 04:40:04 +0000 (+1030) Subject: Pass DEBUGINFOD_CFLAGS when compiling dwarf.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2cd93e7081167a002e568f03a72feabd7f187820;p=binutils-gdb.git 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 --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