-
rwbarton authored
Summary: "./configure --target=TARGET" was broken; it would use the host gcc. (So you had to explicitly specify "--with-gcc=TARGET-gcc" also, as a workaround.) This was broken by commit fc4856f9 for #8148. A comment claimed that FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL was the same as FP_ARG_WITH_PATH_GNU_PROG except for not raising an error when the program isn't found; but that wasn't true -- the former didn't prepend the target name when cross-compiling. We actually need three versions of FP_ARG_WITH_PATH_GNU_PROG since the LLVM tools are usually not prefixed with the target name even when cross-compiling. So I generalized the logic in a single macro. Test Plan: Built with "./configure --target=i386-unknown-linux" and BuildFlavour=quick, successfully Reviewers: ezyang, austin Reviewed By: ezyang, austin Subscribers: simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D204
cfd8c7dd