patacongo commented on issue #3799:
URL:
https://github.com/apache/incubator-nuttx/issues/3799#issuecomment-850843995
> I'm not quite sure why this is breaking here and not in other places (ie:
other places where make is recursively called passing flags)
If is breaking on the very first invocation of 'make makekdepfile' That is
the culprit because the CFLAGS are passed on the command line here in
libs/libc/Makefile. Then the very first file that is processes fails because
the backslashes in CFLAGS have been lost:
171 $(Q) $(MAKE) makekdepfile CFLAGS="$(CFLAGS) $(KDEFINE)"
OBJPATH="kbin"
That is also where the outermost quotes are picked up as you asked earlier.
So this is source of the problem on both accounts.
If is Bash command line processing that mucks with the backslashes. Quoting
of various forms sometimes works but is not robust.
This issue only occurs when you are using a POSIX environment with a Windows
native toolchain. In my environment, I use the ARM embedded toolchain for
Windows. In this case, we have to do special path handling based on
CONFIG_CYGWIN_WINTOOL=y. If we used a GCC toolchain such as the NuttX
buildroot built under Cygwin, then there would be no problem (because there
would be no Windows paths).
We could really simplify the build system is we removed support for Windows
native toolchains under Cygwin. But people really like their Windows tools.
In the past, Windows was the predominant NuttX build environment. Sourceforge
used to keep the statistics and 60% of the downloads were from Windows
machines, 30% from Linux, and the remaining 10% from macOS and "Other". But I
suspect that that has changed; that fact that this build failure has been in
the last two releases says that no one out there is using the Cygwin + Windows
native toolchain.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]