From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LREAL-0004c8-Vw for mharc-grub-devel@gnu.org; Sun, 25 Jan 2009 18:13:22 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LREAK-0004aE-NQ for grub-devel@gnu.org; Sun, 25 Jan 2009 18:13:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LREAK-0004ZS-3R for grub-devel@gnu.org; Sun, 25 Jan 2009 18:13:20 -0500 Received: from [199.232.76.173] (port=47138 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LREAJ-0004ZC-Tw for grub-devel@gnu.org; Sun, 25 Jan 2009 18:13:20 -0500 Received: from aybabtu.com ([69.60.117.155]:54111) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LREAJ-0004e5-Ks for grub-devel@gnu.org; Sun, 25 Jan 2009 18:13:19 -0500 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1LRE6C-0006S0-L8; Mon, 26 Jan 2009 00:09:08 +0100 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1LRE9h-0007Ib-5w; Mon, 26 Jan 2009 00:12:41 +0100 Date: Mon, 26 Jan 2009 00:12:41 +0100 From: Robert Millan To: grub-devel@gnu.org Message-ID: <20090125231241.GA27873@thorin> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="cNdxnHkX5QqsyA0e" Content-Disposition: inline Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Christian Franke Subject: [PATCH] remove target_os X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2009 23:13:20 -0000 --cNdxnHkX5QqsyA0e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, Based on the description of host/target triplets in configure.ac: dnl build -- the environment for building GRUB dnl host -- the environment for running utilities dnl target -- the environment for running GRUB it seems that target_os is an oxymoron. There's no OS in the environment where GRUB will run (well, there's the firmware, but we already use target_vendor for that, and _os has a well-defined meaning). Attached patch fixes that by supressing all references to target_os, and replacing them with host_os where suitable. Christian: since this mostly affects Cygwin, could you verify that it doesn't cause breakage before I commit it? -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all." --cNdxnHkX5QqsyA0e Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="target_os.diff" 2009-01-26 Robert Millan * Makefile.in (host_os, host_cpu): New variables. (target_os): Remove. Update all users. Index: Makefile.in =================================================================== --- Makefile.in (revision 1954) +++ Makefile.in (working copy) @@ -47,8 +47,10 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +host_os = @host_os@ +host_cpu = @host_cpu@ + target_cpu = @target_cpu@ -target_os = @target_os@ platform = @platform@ INSTALL = @INSTALL@ Index: conf/common.rmk =================================================================== --- conf/common.rmk (revision 1954) +++ conf/common.rmk (working copy) @@ -146,7 +146,7 @@ CLEANFILES += update-grub_lib ./config.status --file=$@:$< chmod +x $@ grub-mkconfig_SCRIPTS = 00_header 10_linux 10_hurd 10_freebsd 30_os-prober 40_custom -ifeq ($(target_os), cygwin) +ifeq ($(host_os), cygwin) grub-mkconfig_SCRIPTS += 10_windows endif Index: configure.ac =================================================================== --- configure.ac (revision 1955) +++ configure.ac (working copy) @@ -103,12 +103,10 @@ case "$host_os" in mingw32) host_os=cygwin ;; esac -case "$target_os" in - mingw32) target_os=cygwin ;; -esac +AC_SUBST(host_cpu) +AC_SUBST(host_os) AC_SUBST(target_cpu) -AC_SUBST(target_os) AC_SUBST(platform) # @@ -200,10 +198,10 @@ AC_CHECK_FUNCS(posix_memalign memalign a # Use linker script if present, otherwise use builtin -N script. AC_MSG_CHECKING([for option to link raw image]) -if test -f "${srcdir}/conf/${target_cpu}-${platform}-${target_os}-img-ld.sc"; then - TARGET_IMG_LDSCRIPT='$(top_srcdir)'"/conf/${target_cpu}-${platform}-${target_os}-img-ld.sc" +if test -f "${srcdir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc"; then + TARGET_IMG_LDSCRIPT='$(top_srcdir)'"/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc" TARGET_IMG_LDFLAGS="-Wl,-T${TARGET_IMG_LDSCRIPT}" - TARGET_IMG_LDFLAGS_AC="-Wl,-T${srcdir}/conf/${target_cpu}-${platform}-${target_os}-img-ld.sc" + TARGET_IMG_LDFLAGS_AC="-Wl,-T${srcdir}/conf/${target_cpu}-${platform}-${host_os}-img-ld.sc" else TARGET_IMG_LDSCRIPT= TARGET_IMG_LDFLAGS='-Wl,-N' @@ -215,8 +213,8 @@ AC_MSG_RESULT([$TARGET_IMG_LDFLAGS_AC]) # For platforms where ELF is not the default link format. AC_MSG_CHECKING([for command to convert module to ELF format]) -case "${host_os}:${target_os}" in - cygwin:cygwin) TARGET_OBJ2ELF='grub-pe2elf' ;; +case "${host_os}" in + cygwin) TARGET_OBJ2ELF='grub-pe2elf' ;; *) ;; esac AC_SUBST(TARGET_OBJ2ELF) --cNdxnHkX5QqsyA0e--