Skip to content

Conversation

@statham-arm
Copy link
Collaborator

Every CMakeLists.txt that includes fetch_llvm.cmake must also call find_package(Python3), because fetch_llvm.cmake tries to run patch_llvm.py by prefixing it with the Python interpreter name. The CMakeLists in arm-multilib wasn't looking for Python at all, and the one in arm-runtimes was looking for it after including fetch_llvm.cmake.

Also, fetch_picolibc.cmake was not reliably looking in the correct directory for its patches: it was using a path relative to CMAKE_CURRENT_SOURCE_DIR, which varies depending which CMakeLists it's invoked by. It should be relative to CMAKE_CURRENT_LIST_DIR, as the corresponding llvm and newlib paths already are.

Every `CMakeLists.txt` that includes `fetch_llvm.cmake` must also call
`find_package(Python3)`, because `fetch_llvm.cmake` tries to run
`patch_llvm.py` by prefixing it with the Python interpreter name. The
CMakeLists in `arm-multilib` wasn't looking for Python at all, and the
one in `arm-runtimes` was looking for it _after_ including
`fetch_llvm.cmake`.

Also, `fetch_picolibc.cmake` was not reliably looking in the correct
directory for its patches: it was using a path relative to
`CMAKE_CURRENT_SOURCE_DIR`, which varies depending which CMakeLists
it's invoked by. It should be relative to `CMAKE_CURRENT_LIST_DIR`, as
the corresponding llvm and newlib paths already are.
@statham-arm statham-arm requested a review from dcandler November 27, 2024 11:52
@statham-arm statham-arm merged commit 92d729a into ARM-software:main Nov 27, 2024
1 check passed
@statham-arm statham-arm deleted the patching-fixes branch November 27, 2024 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants