New comment by pullmoll on void-packages repository https://github.com/void-linux/void-packages/pull/11891#issuecomment-506928888 Comment: I know what you mean. The qmake build style is so ugly because of the host's qmake using the hard coded paths. How about we modify qmake to respect some of our XBPS_* environment variables, enabled only if some XBPS_QMAKE_MAGIC is defined, and then override its currently hard coded values? If not enabled, qmake would act just like it does now for the regular user, i.e. as a host tool. Otherwise it would accept the build environment's sysroot etc. settings and look for the cross qt5 headers etc. where they are. To devise such a patch cannot be too hard, and the code to modify is most probably all in a single source file anyway. I will take a look at qmake's source to see where we can possibly hack it for our case.