On 04/19/2018 08:58 AM, Alex Bennée wrote: > This allows us to specify cross compilers for our guests. This is > useful for building test images/programs. Currently we re-run the > compile test for each target. I couldn't think of a way to cache the > value for a given arch without getting messier configure code. > > The cross compiler for the guest is visible to each target as > CROSS_CC_GUEST in config-target.mak. > > Signed-off-by: Alex Bennée <alex.ben...@linaro.org> > --- > configure | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 50 insertions(+) >
> @@ -483,6 +490,11 @@ for opt do > ;; > --disable-debug-info) debug_info="no" > ;; > + --cross-cc-*[!a-zA-Z0-9_0]=*) error_exit "Passed bad --cross-cc-FOO option" Not quite right; it looks like you intended to have a trailing - instead of 0; and if you are trying to filter out bad characters, then you need * on both sides of the [!...] list: --cross-cc-*[!a-zA-Z0-9_-]*=*) otherwise you are only filtering out bad characters immediately before the first =. There's also the question of whether I can spell both '--cross-cc-FOO=BAR' as one argument and '--cross-cc-FOO BAR' as two arguments; this is filtering out only the one-argument case. > + ;; > + --cross-cc-*) cc_arch=${opt#--cross-cc-} > + eval "cross_cc_${cc_arch}=\$optarg" > + ;; -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature