it seems because ARCHINCLUDES try to figure out the search path by
invoking shell script:
diff --git a/boards/arm/stm32/stm32f4discovery/configs/cxxtest/Make.defs
b/boards/arm/stm32/stm32f4discovery/configs/cxxtest/Make.defs
index 35cdb5ab6a..f60d2d9e31 100644
--- a/boards/arm/stm32/stm32f4discovery/configs/cxxtest/Make.defs
+++ b/boards/arm/stm32/stm32f4discovery/configs/cxxtest/Make.defs
@@ -55,19 +55,16 @@ LIBSUPXX = ${shell $(CC) $(CXXFLAGS)
--print-file-name=libsupc++.a}
EXTRA_LIBPATHS = -L "${shell dirname "$(LIBSUPXX)"}"
EXTRA_LIBS = -lsupc++
+ARCHINCLUDES += ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include}
+
+ARCHXXINCLUDES += ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include}
+ARCHXXINCLUDES += ${shell $(INCDIR) -s "$(CC)"
$(TOPDIR)$(DELIM)include$(DELIM)cxx}
+ARCHXXINCLUDES += ${shell $(INCDIR) -s "$(CC)"
$(TOPDIR)$(DELIM)include$(DELIM)uClibc++}
+
ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
- # Windows-native toolchains
- ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
- ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" \
- -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" \
- -isystem "${shell cygpath -w $(TOPDIR)/include/uClibc++}"
- ARCHSCRIPT = -T "${shell cygpath -w
$(TOPDIR)/boards/$(CONFIG_ARCH)/$(CONFIG_ARCH_CHIP)/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}"
+ ARCHSCRIPT = -T "${shell cygpath -w
$(TOPDIR)$(DELIM)boards$(DELIM)$(CONFIG_ARCH)$(DELIM)$(CONFIG_ARCH_CHIP)$(DELIM)$(CONFIG_ARCH_BOARD)$(DELIM)scripts$(DELIM)$(LDSCRIPT)}"
else
- # Linux/Cygwin-native toolchain
- ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
- ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include \
- -isystem $(TOPDIR)/include/cxx -isystem $(TOPDIR)/include/uClibc++
- ARCHSCRIPT =
-T$(TOPDIR)/boards/$(CONFIG_ARCH)/$(CONFIG_ARCH_CHIP)/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
+ ARCHSCRIPT =
-T$(TOPDIR)$(DELIM)boards$(DELIM)$(CONFIG_ARCH)$(DELIM)$(CONFIG_ARCH_CHIP)$(DELIM)$(CONFIG_ARCH_BOARD)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
endif
ARCHXXINCLUDES is a deferred variable which mean the script will
exeutable in every reference. Could you try this:
ARCHXXINCLUDES := ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include}
ARCHXXINCLUDES += ${shell $(INCDIR) -s "$(CC)"
$(TOPDIR)$(DELIM)include$(DELIM)cxx}
ARCHXXINCLUDES += ${shell $(INCDIR) -s "$(CC)"
$(TOPDIR)$(DELIM)include$(DELIM)uClibc++}
https://www.gnu.org/software/make/manual/html_node/Reading-Makefiles.html
On Wed, May 27, 2020 at 9:26 PM Schock, Johannes - NIVUS GmbH
<[email protected]> wrote:
>
> If I have done everything right with usage of git bisect, the below commit
> increased build time by factor 7 for MSYS2.
> Since this is a rather huge commit, I think I can't be helpful figuring out
> the actual reason.
> And I'm not sure if this is perhaps even considered acceptable.
>
> Regards, Johannes
>
> $ git bisect bad
> 7e5b0f81e93c7e879ce8434d57e8bf4e2319c1c0 is the first bad commit
> commit 7e5b0f81e93c7e879ce8434d57e8bf4e2319c1c0
> Author: Xiang Xiao <[email protected]>
> Date: Tue May 19 17:43:29 2020 +0800
>
> build: Replace -I with INCDIR
>
> > -----Original Message-----
> > From: Schock, Johannes - NIVUS GmbH
> > [mailto:[email protected]]
> > Sent: Wednesday, May 27, 2020 10:45 AM
> > To: [email protected]
> > Subject: MSYS2 build slow
> >
> > Just as an intermediate result:
> > MSYS2
> >
> > make distclean
> > tools/configure.sh stm32f4discovery/nsh
> > time make
> >
> > current master
> > real 35m54,957s
> > user 2m29,879s
> > sys 6m31,525s
> >
> > releases/9.0
> > real 4m39,324s
> > user 0m28,553s
> > sys 1m23,113s
> >
> > The build is much slower than it used to be.
> > Does someone have an idea which commit could have caused this?
> > I will start a bisect later today. (Never did before, let's see.)
> >
> > Johannes