host_linux_triple = config.target_triple.split("-")[0] + "-unknown-linux-gnu"
common_linker_flags = "-fuse-ld=lld -Wl,--unresolved-symbols=ignore-all -pie"
flags = f"--target={host_linux_triple} -fPIE {common_linker_flags}"
config.substitutions.insert(0, ("%cflags", f"%cflags {flags}"))
config.substitutions.insert(0, ("%cxxflags", f"%cxxflags {flags}"))