From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ZSda7-0004E3-9F for mharc-grub-devel@gnu.org; Fri, 21 Aug 2015 00:05:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSdZo-00047I-U9 for grub-devel@gnu.org; Fri, 21 Aug 2015 00:05:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZSdZg-0000dD-8q for grub-devel@gnu.org; Fri, 21 Aug 2015 00:05:12 -0400 Received: from mail-lb0-x236.google.com ([2a00:1450:4010:c04::236]:33503) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSdZg-0000b8-1E for grub-devel@gnu.org; Fri, 21 Aug 2015 00:05:04 -0400 Received: by lbbsx3 with SMTP id sx3so36132881lbb.0 for ; Thu, 20 Aug 2015 21:05:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=ScdjBQnn0IXGyPX4a9mQ5W2XQjD+ehVPU2jXtmhQxKI=; b=cWw5tkgZijBvsXWHKidA5oUUkoWumnM5nRu/68YuheO+XEakrLPQH33bAhCtQnxWLY 0XIdjdub0S9bx7VRqDWWJm8+jEy2xLBMqL4BJjZhZBJVSJRzs1V04KW/XO47UYoylnKu ScFiswS56XyjO/OVoLQjWPmhzYU+nwU08BeZixdRqyVOLl/wviSxNhkGPuUWj8rtGKfx /C7Jf1lV2y0IzHf6XhyMv8A4a+jEdgjYKtQnCK7svkXRmAoRfXuFB/V2bdTk6oYYlssR ErJvvs3/TzO1XsTU/XB1lAXsb/nMi6D0QHn7evcYlCEFP8J8v5taY8f4PaIcaPmXzuvT 9GHQ== X-Received: by 10.152.37.2 with SMTP id u2mr6031765laj.70.1440129902746; Thu, 20 Aug 2015 21:05:02 -0700 (PDT) Received: from [192.168.1.43] (ppp91-76-5-127.pppoe.mtu-net.ru. [91.76.5.127]) by smtp.gmail.com with ESMTPSA id le5sm1862329lab.29.2015.08.20.21.05.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Aug 2015 21:05:01 -0700 (PDT) Message-ID: <55D6A36D.205@gmail.com> Date: Fri, 21 Aug 2015 07:05:01 +0300 From: Andrei Borzenkov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [PATCH] Ensure that MIPS target code is compiled for the O32 ABI. References: <1440009323-8667-1-git-send-email-mhw@netris.org> In-Reply-To: <1440009323-8667-1-git-send-email-mhw@netris.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::236 Cc: Mark H Weaver X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Aug 2015 04:05:29 -0000 19.08.2015 21:35, Mark H Weaver пишет: > Include -mabi=32 in CFLAGS_PLATFORM and CCASFLAGS_PLATFORM to compile > code for the O32 ABI when targetting MIPS, since the MIPS assembly code > in GRUB assumes this. This flag is also needed when compiling > asm-tests/mips.S from configure, because GNU as rejects MIPS register > names such as $t2 unless the O32 ABI is selected. > --- > conf/Makefile.common | 4 ++++ > configure.ac | 7 +++++-- > 2 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/conf/Makefile.common b/conf/Makefile.common > index fcb8d2e..bd125da 100644 > --- a/conf/Makefile.common > +++ b/conf/Makefile.common > @@ -20,6 +20,10 @@ endif > if COND_powerpc_ieee1275 > CFLAGS_PLATFORM += -mcpu=powerpc > endif > +if COND_mips > + CFLAGS_PLATFORM += -mabi=32 > + CCASFLAGS_PLATFORM = -mabi=32 > +endif > Does it work with clang? > #FIXME: discover and check XEN headers > CPPFLAGS_XEN = -I/usr/include > diff --git a/configure.ac b/configure.ac > index c864311..1f5e8a2 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -2,7 +2,8 @@ > > # Process this file with autoconf to produce a configure script. > > -# Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc. > +# Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010,2011, > +# 2012,2013,2014,2015 Free Software Foundation, Inc. > # > # This configure.ac is free software; the author > # gives unlimited permission to copy and/or distribute it, > @@ -599,9 +600,11 @@ fi > > AC_CACHE_CHECK([for options to compile assembly], [grub_cv_cc_target_asm_compile], [ > test_program= > +test_ccasflags= > case "x$target_cpu-$platform" in > xmips-* | xmipsel-*) > test_program=mips > + test_ccasflags=-mabi=32 > ;; > xi386-pc) > test_program=i386-pc > @@ -618,7 +621,7 @@ if test x"$test_program" = x ; then > else > found=no > for arg in "" "-no-integrated-as"; do > - cmdline="$TARGET_CC -c -o /dev/null $TARGET_CCASFLAGS $arg $TARGET_CPPFLAGS $srcdir/asm-tests/$test_program.S" > + cmdline="$TARGET_CC -c -o /dev/null $TARGET_CCASFLAGS $test_ccasflags $arg $TARGET_CPPFLAGS $srcdir/asm-tests/$test_program.S" > echo "Running $cmdline" >&AS_MESSAGE_LOG_FD > if $cmdline >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then > grub_cv_cc_target_asm_compile="$arg" >