-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cygwin: repair NuttX build #8737
Conversation
fe9b301
to
24a1b73
Compare
all the NuttX specific WINTOOL define handling was skiped in cmake Make.defs generation The Nuttx build is makfile based and needs its cygwin treatment Additionally the ${PX4_SOURCE_DIR}/src/include which was added through cmake needs path conversion The two root causes for the special handling are: - ARM GCC for Windows doesn't support cygwin paths passed as an argument so they need to be either relative or converted via cypath tool - Symbolic links are totally different under Windows and because NuttX uses them extensively it has special handling scripts that need to be fed with the correct defines
6bd962b
to
336a1b1
Compare
@dagar Now it's completely relying on cmake for the paths and using only the existing makefile defines for the symbolic links (which have no else case). |
Let’s see what CI says! |
@LorenzMeier With the first commit it worked. I'm currently discussing with @dagar in slack about the TOPDIR. |
Looks like the second commit wasn't the best idea... |
@@ -33,8 +33,8 @@ | |||
# | |||
############################################################################ | |||
|
|||
include $(TOPDIR)/.config | |||
include $(TOPDIR)/tools/Config.mk | |||
include ${NUTTX_DIR}/.config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to preserve this to make NuttX happy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can switch all back to TOPDIR, let me fix the second commit.
336a1b1
to
691b693
Compare
differentiate between WINTOOL define (MSYS & cygwin) and cygwin using uname command: - MSYS needs symbolic link handling for ARM GCC but no path conversion - Cygwin needs both
691b693
to
dab3233
Compare
@dagar I
|
after 1f63d85
all the NuttX specific WINTOOL define handling was skipped in cmake Make.defs generation (#8573)
The Nuttx build is makfile based and needs its cygwin treatment (https://github.com/PX4-NuttX/nuttx/blob/b18053574bf41712cef93e31bf178518f451a350/configs/stm32f4discovery/scripts/Make.defs#L42-L56)
Additionally the ${PX4_SOURCE_DIR}/src/include which was added through cmake needs path conversion
The two root causes for the special handling are:
so they need to be either relative or converted via cypath tool
it has special handling scripts that need to be fed with the correct defines
@dagar Now it's partly makefile
${shell ...}
path conversion like NuttX did it before and partly cmakeCYGPATH(...)
conversion because you added${PX4_SOURCE_DIR}/src/include
via cmake. What do you think?How was
${PX4_SOURCE_DIR}/src/include
included before? It always foundvisibility.h
so it was included but not in theCFLAGS
...I tested
make px4fmu-v4_default
andmake px4fmu-v2_default
and they run through fine with these changes.EDIT: For reference the pull requests that made this necessary/possible: #7873 #8573