the default sys-root already hads "gnemul" in it, so I do not feel ashamed to follow the GNU conventions completely.
Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- configure | 20 ++++++++++++++++++-- create_config | 2 +- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 27fc67a..0340cfe 100755 --- a/configure +++ b/configure @@ -80,7 +80,6 @@ path_of() { # default parameters cpu="" -sysroot="/usr/gnemul/qemu-%M" static="no" with_arch="" cross_prefix="" @@ -465,6 +464,22 @@ if test "$mingw32" = "yes" ; then confsuffix="" fi +# examples: +# linux ${prefix}/%M-linux/sys-root +# linux-gnu ${prefix}/%M-linux-gnu/sys-root +# i686-redhat-linux-gnu ${prefix}/%M-pc-linux-gnu/sys-root +# powerpc-apple-darwin8.0 ${prefix}/%M-apple-darwin8.0/sys-root +# openbsd ${prefix}/%M-openbsd/sys-root +# i686-openbsd ${prefix}/%M-openbsd/sys-root +sysroot=`echo $host_noncanonical | awk '{ + gnu = $0 ~ /-gnu$/ # config.guess wants to please rms + if (gnu) sub (/-gnu$/, "") # ... but it gets in our way + if (/-/) sub(/[^-]*-/, "") # remove cpu part of the host + if (!/^apple-/) sub(/[^-]*-/, "pc-") # for Linux/BSD use generic vendor + if (gnu) $0 = $0 "-gnu" # put the GNUness back + print "${prefix}/%M-" $0 "/sys-root" # make complete path +}' ` + werror="" for opt do @@ -2771,7 +2786,8 @@ echo "# Automatically generated by configure - do not modify" > $config_target_m bflt="no" target_nptl="no" sysroot1=`echo "$sysroot" | sed "s/%M/$target_arch2/g"` -echo "CONFIG_QEMU_SYSROOT=\"$sysroot1\"" >> $config_target_mak +echo "prefix=$prefix" >> $config_target_mak +echo "sysroot=\"$sysroot1\"" >> $config_target_mak gdb_xml_files="" TARGET_ARCH="$target_arch2" diff --git a/create_config b/create_config index f880a7c..6c8b469 100755 --- a/create_config +++ b/create_config @@ -13,7 +13,7 @@ case $line in pkgversion=${line#*=} echo "#define QEMU_PKGVERSION \"$pkgversion\"" ;; - prefix=* | [a-z]*dir=*) # directory configuration + prefix=* | [a-z]*dir=* | sysroot=*) # directory configuration name=${line%=*} value=${line#*=} define_name=`echo $name | tr '[:lower:]' '[:upper:]'` -- 1.7.2.3