Support crosscompilation and compilations for hsot
Example with threads