Missing `-Fu../llvm` in ppufiles/ppumove build rules
In compiler/utils/Makefile.fpc, the rules for ppu and ppudump pass -Fu../llvm, but ppufiles and ppumove don't:
else
ppu$(PPUEXT): ../ppu.pas
$(COMPILER) ../ppu.pas -Fu../llvm -Fu../generic -dGENERIC_CPU -Fi..
ppudump$(EXEEXT): ppuutils/ppudump.pp ppu$(PPUEXT)
$(COMPILER) ppuutils/ppudump.pp -Fu../llvm -Fu../generic -dGENERIC_CPU -Fi..
ppufiles$(EXEEXT): ppufiles.pp ppu$(PPUEXT)
$(COMPILER) ppufiles.pp -Fu../generic -dGENERIC_CPU -Fi..
ppumove$(EXEEXT): ppumove.pp ppu$(PPUEXT)
$(COMPILER) ppumove.pp -Fu../generic -dGENERIC_CPU -Fi..
endifSince globals.pas pulls in llvminfo under {$if defined(LLVM) or defined(GENERIC_CPU)}, compiling ppufiles/ppumove with -dGENERIC_CPU can fail with:
Fatal: Can't find unit llvminfo used by globals
I hit this during a rebuild after a source change in my fork. Commit c4409573 (2020-11-16) added the llvm dir to the ppudump rule, and 64866179 (2020-11-25) added it to the ppu rule - looks like ppufiles/ppumove were just missed.
I think this is a bug. Patch:
diff --git a/compiler/utils/Makefile b/compiler/utils/Makefile
index 426648f2e8..e482093ffe 100644
--- a/compiler/utils/Makefile
+++ b/compiler/utils/Makefile
@@ -3931,9 +3931,9 @@ ppu$(PPUEXT): ../ppu.pas
ppudump$(EXEEXT): ppuutils/ppudump.pp ppu$(PPUEXT)
$(COMPILER) ppuutils/ppudump.pp -Fu../llvm -Fu../generic -dGENERIC_CPU -Fi..
ppufiles$(EXEEXT): ppufiles.pp ppu$(PPUEXT)
- $(COMPILER) ppufiles.pp -Fu../generic -dGENERIC_CPU -Fi..
+ $(COMPILER) ppufiles.pp -Fu../llvm -Fu../generic -dGENERIC_CPU -Fi..
ppumove$(EXEEXT): ppumove.pp ppu$(PPUEXT)
- $(COMPILER) ppumove.pp -Fu../generic -dGENERIC_CPU -Fi..
+ $(COMPILER) ppumove.pp -Fu../llvm -Fu../generic -dGENERIC_CPU -Fi..
endif
msg2inc$(EXEEXT): $(COMPILER_UNITTARGETDIR) msg2inc.pp
gppc386$(EXEEXT): $(COMPILER_UNITTARGETDIR) gppc386.pp
diff --git a/compiler/utils/Makefile.fpc b/compiler/utils/Makefile.fpc
index c5caaceb67..914093297c 100644
--- a/compiler/utils/Makefile.fpc
+++ b/compiler/utils/Makefile.fpc
@@ -64,10 +64,10 @@ ppudump$(EXEEXT): ppuutils/ppudump.pp ppu$(PPUEXT)
$(COMPILER) ppuutils/ppudump.pp -Fu../llvm -Fu../generic -dGENERIC_CPU -Fi..
ppufiles$(EXEEXT): ppufiles.pp ppu$(PPUEXT)
- $(COMPILER) ppufiles.pp -Fu../generic -dGENERIC_CPU -Fi..
+ $(COMPILER) ppufiles.pp -Fu../llvm -Fu../generic -dGENERIC_CPU -Fi..
ppumove$(EXEEXT): ppumove.pp ppu$(PPUEXT)
- $(COMPILER) ppumove.pp -Fu../generic -dGENERIC_CPU -Fi..
+ $(COMPILER) ppumove.pp -Fu../llvm -Fu../generic -dGENERIC_CPU -Fi..
endifDoes this make sense? Or was there a reason to leave these two rules without the llvm path?