From patchwork Tue Oct 12 13:00:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 67590 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2F2DAB70A5 for ; Wed, 13 Oct 2010 01:02:24 +1100 (EST) Received: from localhost ([127.0.0.1]:38956 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P5fOW-0001Ga-JG for incoming@patchwork.ozlabs.org; Tue, 12 Oct 2010 09:59:56 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:subject:date :message-id:x-mailer:in-reply-to:references; bh=ae9HZJ1aVA4cNL5u+I/2kekyZrRgJoT4yWBY+z0qU7w=; b=rUug9L/usfQxR1Ut0iuDejjb66KJlBLJ3G7/3wy4vlTNce0bpPWaQ6IlpAZLyJqbAH 4d3z8slq7IGSdscluFwG2nkzkbRwkvyqvOV8KP5HacAREKTZDUtmESq8V5WwDHwj4g2y /yUdn7a8Ami3hkXlMnM8+qPgh5TUF84zotLs0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; b=MQnpNU+uGlMmtbyosLc6eK3j8D1GWAcC8RHjQdd9YcoPrw5y4vGLDQ0lV+UMDjzwW9 JS9+IRktVIl6rjTDRoj1JyU24ykPudY+g10WvlU9v+6i0wFl3I66zteBvIjzKqLrmq6D IRflz5HNA+akQXrsy0CGlT0DupPq427H9NpVA= Received: by 10.224.130.143 with SMTP id t15mr5674777qas.213.1286888536522; Tue, 12 Oct 2010 06:02:16 -0700 (PDT) Received: from localhost.localdomain (nat-pool-brq-t.redhat.com [209.132.186.34]) by mx.google.com with ESMTPS id s34sm5931078qcp.20.2010.10.12.06.02.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 12 Oct 2010 06:02:15 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 12 Oct 2010 15:00:56 +0200 Message-Id: <1286888457-5033-39-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1286888457-5033-1-git-send-email-pbonzini@redhat.com> References: <1286888457-5033-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [Qemu-devel] [PATCH 38/39] provide a more gnuish default sysroot X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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:]'`