# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/corrosion/host-tools-rustflags.patch # Copyright (C) 2026 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- --- corrosion-0.6.1.orig/cmake/Corrosion.cmake 2026-01-17 11:46:47.000000000 +0100 +++ corrosion-0.6.1/cmake/Corrosion.cmake 2026-07-28 11:36:10.785173287 +0200 @@ -1858,6 +1858,9 @@ function(corrosion_add_cxxbridge cxx_tar ${CMAKE_COMMAND} -E make_directory "${CMAKE_BINARY_DIR}/corrosion/cxxbridge_v${cxx_required_version}" COMMAND ${CMAKE_COMMAND} -E env + # cxxbridge is built for the host, so any RUSTFLAGS + # meant for the cross target must not apply here + --unset=RUSTFLAGS "CARGO_BUILD_RUSTC=$CACHE{CORROSION_TOOLS_RUSTC}" $CACHE{CORROSION_TOOLS_CARGO} install cxxbridge-cmd @@ -2168,6 +2171,9 @@ function(corrosion_experimental_cbindgen add_custom_command(OUTPUT "${cbindgen}" COMMAND ${CMAKE_COMMAND} -E env + # cbindgen is built for the host, so any RUSTFLAGS meant for + # the cross target must not apply here + --unset=RUSTFLAGS "CARGO_BUILD_RUSTC=$CACHE{CORROSION_TOOLS_RUSTC}" $CACHE{CORROSION_TOOLS_CARGO} install cbindgen