From ad01912391b449fcf547ac52ed468f9b572cb0ad Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Thu, 22 Feb 2024 22:10:06 +0100 Subject: [PATCH 2/2] build: Fix cross-compilation in out-of-tree-builds gen-scmconfig.h is generated in libguile, not $(top_builddir). * libguile/Makefile.am: Add '-I.' when compiling gen-scmconfig.o. --- libguile/Makefile.am | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libguile/Makefile.am b/libguile/Makefile.am index 2641e7f69..f5d43cc01 100644 --- a/libguile/Makefile.am +++ b/libguile/Makefile.am @@ -62,14 +62,15 @@ gen_scmconfig_SOURCES = gen-scmconfig.c ## Override default rule; this should be compiled for BUILD host. Note ## that we don't add $(AM_CPPFLAGS) here, as we need to run this ## program, but $(top_srcdir)/lib has a gnulib configured for the -## target. Instead we manually add $(top_builddir), in order to pick up -## the generated config.h and gen-scmconfig.h. Nothing else from Guile -## is included by this code generator. +## target. Instead we manually add $(top_builddir) and the current +## directory, in order to pick up the generated config.h and +## gen-scmconfig.h. Nothing else from Guile is included by this code +## generator. gen-scmconfig.$(OBJEXT): gen-scmconfig.c $(AM_V_GEN) \ if [ "$(cross_compiling)" = "yes" ]; then \ $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) -I$(top_builddir) \ - -c -o $@ $<; \ + -I. -c -o $@ $<; \ else \ $(COMPILE) -c -o $@ $<; \ fi -- 2.43.2