From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=41007 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P5eV1-0007ZJ-QI for qemu-devel@nongnu.org; Tue, 12 Oct 2010 09:02:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P5eUj-00054P-1U for qemu-devel@nongnu.org; Tue, 12 Oct 2010 09:02:30 -0400 Received: from mail-qy0-f173.google.com ([209.85.216.173]:48077) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P5eUi-0004Lx-Va for qemu-devel@nongnu.org; Tue, 12 Oct 2010 09:02:17 -0400 Received: by mail-qy0-f173.google.com with SMTP id 36so629119qyk.4 for ; Tue, 12 Oct 2010 06:02:16 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 12 Oct 2010 15:00:56 +0200 Message-Id: <1286888457-5033-39-git-send-email-pbonzini@redhat.com> In-Reply-To: <1286888457-5033-1-git-send-email-pbonzini@redhat.com> References: <1286888457-5033-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 38/39] provide a more gnuish default sysroot List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- 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