--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,6 +35,12 @@ set(CMAKE_INCLUDE_DIRECTORIES_BEFORE ON)
 set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
 include("${IMHEX_BASE_FOLDER}/cmake/build_helpers.cmake")
 
+# Void Linux flags for cross compiling libromfs
+set(NATIVE_CMAKE_C_COMPILER "$ENV{CC_host}")
+set(NATIVE_CMAKE_CXX_COMPILER "$ENV{CXX_host}")
+set(NATIVE_CMAKE_C_FLAGS "$ENV{CFLAGS_host}")
+set(NATIVE_CMAKE_CXX_FLAGS "$ENV{CXXFLAGS_host}")
+
 # Setup project
 loadVersion(IMHEX_VERSION IMHEX_VERSION_PLAIN)
 setVariableInParent(IMHEX_VERSION ${IMHEX_VERSION})
