--- chibio/CMakeLists.txt 2026-10-17 21:19:24.790916321 +0200 +++ chibi-scheme-0.12/CMakeLists.txt 2026-10-17 21:22:51.277207361 +0200 @@ -159,8 +159,10 @@ else() set(bootstrap-build-dir "${CMAKE_CURRENT_BINARY_DIR}/bootstrap-build") + # not with the target compiler and flags from the environment execute_process( - COMMAND "${CMAKE_COMMAND}" + COMMAND "${CMAKE_COMMAND}" -E env --unset=CC --unset=CFLAGS + --unset=CPPFLAGS --unset=LDFLAGS "${CMAKE_COMMAND}" -B "${bootstrap-build-dir}" -S "${CMAKE_CURRENT_SOURCE_DIR}" COMMAND_ECHO STDERR @@ -614,7 +616,8 @@ add_custom_command(OUTPUT snow.img -d ${CMAKE_CURRENT_BINARY_DIR}/snow.img WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) -if(BUILD_SHARED_LIBS) +# the images are dumped by the target chibi-scheme +if(BUILD_SHARED_LIBS AND NOT CMAKE_CROSSCOMPILING) # Currently, image dumps only work with shared library builds, which includes Windows add_custom_target(chibi-images ALL DEPENDS @@ -691,7 +694,7 @@ install(FILES doc/chibi-doc.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) -if(BUILD_SHARED_LIBS) +if(BUILD_SHARED_LIBS AND NOT CMAKE_CROSSCOMPILING) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/chibi.img ${CMAKE_CURRENT_BINARY_DIR}/red.img