diff options
author | Andrew Leech <andrew.leech@planetinnovation.com.au> | 2025-02-03 16:03:22 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2025-02-07 17:24:43 +1100 |
commit | b603fa38b25c5136d36cdbfff91b69f96efacd69 (patch) | |
tree | 2daedc7a9e4a515e2b0e65e28fe638067880b7fd | |
parent | 71e8b27b26f46f11f642381d4f6699ee1fc073f6 (diff) |
py/mkrules.mk: Reset USER_C_MODULES when building mpy-cross dependency.
When a port automatically compiles `mpy-cross`, if `USER_C_MODULES` is
provided by the user on the command line then it is also applied to the
`mpy-cross` build. That can lead to build errors if the path is relative
and not found when building `mpy-cross`.
Fix that by explicitly resetting `USER_C_MODULES` when invoking the
`mpy-cross` build.
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
-rw-r--r-- | py/mkrules.cmake | 2 | ||||
-rw-r--r-- | py/mkrules.mk | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/py/mkrules.cmake b/py/mkrules.cmake index bfc56abfe..3ee4c4c31 100644 --- a/py/mkrules.cmake +++ b/py/mkrules.cmake @@ -211,7 +211,7 @@ if(MICROPY_FROZEN_MANIFEST) endif() add_custom_command( OUTPUT ${MICROPY_MPYCROSS_DEPENDENCY} - COMMAND ${MICROPY_MAKE_EXECUTABLE} -C ${MICROPY_DIR}/mpy-cross + COMMAND ${MICROPY_MAKE_EXECUTABLE} -C ${MICROPY_DIR}/mpy-cross USER_C_MODULES= ) endif() diff --git a/py/mkrules.mk b/py/mkrules.mk index 373bda899..e9504ce39 100644 --- a/py/mkrules.mk +++ b/py/mkrules.mk @@ -176,7 +176,7 @@ $(HEADER_BUILD): ifneq ($(MICROPY_MPYCROSS_DEPENDENCY),) # to automatically build mpy-cross, if needed $(MICROPY_MPYCROSS_DEPENDENCY): - $(MAKE) -C "$(abspath $(dir $@)..)" + $(MAKE) -C "$(abspath $(dir $@)..)" USER_C_MODULES= endif ifneq ($(FROZEN_DIR),) |