On Tue, 2020-09-22 at 17:47 -0400, David Malcolm wrote: > On Tue, 2020-09-22 at 22:55 +0200, Tobias Burnus wrote: > > This patch breaks the cross build here: > > ...gcc/analyzer/engine.cc:65:10: fatal error: zlib.h: No such file > > or > > directory > > > > I think you need to do something similar in Makefile.in as lto- > > compress has: > > > > # lto-compress.o needs $(ZLIBINC) added to the include flags. > > CFLAGS-lto-compress.o += $(ZLIBINC) $(ZSTD_INC) > > > > Tobias > > Sorry about that. > > Does the following fix it for you?
It successfully bootstrapped & regrtested on x86_64-pc-linux-gnu, and I see it adding -I../../src/gcc/../zlib in my test builds, so I've gone ahead and pushed it to master as c1c2ccc74cb6f547118431d8142bc894991b104a. Please let me know if this doesn't fix it. Dave > gcc/ChangeLog: > * Makefile.in: Add $(ZLIBINC) to CFLAGS-analyzer/engine.o. > --- > gcc/Makefile.in | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/gcc/Makefile.in b/gcc/Makefile.in > index c710bad27b1..9c6c1c93b97 100644 > --- a/gcc/Makefile.in > +++ b/gcc/Makefile.in > @@ -2296,6 +2296,7 @@ s-bversion: BASE-VER > > CFLAGS-toplev.o += -DTARGET_NAME=\"$(target_noncanonical)\" > CFLAGS-optinfo-emit-json.o += -DTARGET_NAME=\"$(target_noncanonical)\" > $(ZLIBINC) > +CFLAGS-analyzer/engine.o += $(ZLIBINC) > > pass-instances.def: $(srcdir)/passes.def $(PASSES_EXTRA) \ > $(srcdir)/gen-pass-instances.awk