From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ZZMQs-0006BL-Pv for mharc-grub-devel@gnu.org; Tue, 08 Sep 2015 13:11:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZMQo-00069c-OM for grub-devel@gnu.org; Tue, 08 Sep 2015 13:11:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZMQn-0001PS-JM for grub-devel@gnu.org; Tue, 08 Sep 2015 13:11:42 -0400 Received: from mail-pa0-x22e.google.com ([2607:f8b0:400e:c03::22e]:34269) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZMQn-0001O4-Ay for grub-devel@gnu.org; Tue, 08 Sep 2015 13:11:41 -0400 Received: by padhy16 with SMTP id hy16so126981086pad.1 for ; Tue, 08 Sep 2015 10:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type; bh=t9NEYep1F36I/ouBLF/p59pHA3AgTOQ8oNvZFjnTZvw=; b=jLe6iNRwWhFTozcclrvNl1sw/1df0Ke2B9LNGzRMxeKX6HVByNAqnA/X2eP4A6gAWK G399Bt9xRdbUJVaOa9WX5g7yfYO41w55ZHzQfwqHtwtHR0Ug0iHrKyTWolJDn46VSCUD zYSCL7FGQSobRC1X5fHMT7x0n3N3wbHZ+gJywBfSgKjatev1Zq9By5fdVYp0PS+unuRa KaVqtUghaPxVz5TgUeAFowmetsFhAmyta6yOBDkwsHhl6eAx13zAzgICy6jTHkQkSZrP qMbpwGjHyZoD4YP3dojUwfr4pqbMoLIAfgGY9NwPftsXeyrdQgCAenOWShYamqBwDB02 vlKA== X-Received: by 10.66.122.4 with SMTP id lo4mr50817624pab.1.1441732300164; Tue, 08 Sep 2015 10:11:40 -0700 (PDT) Received: from ?IPv6:2620:0:1000:fd1f:863a:4bff:fe50:abc4? ([2620:0:1000:fd1f:863a:4bff:fe50:abc4]) by smtp.gmail.com with ESMTPSA id tk1sm4085524pac.0.2015.09.08.10.11.39 for (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Sep 2015 10:11:39 -0700 (PDT) Subject: Re: [PATCH v2] Ensure that MIPS target code is compiled for the O32 ABI. To: The development of GNU GRUB References: <1440009323-8667-1-git-send-email-mhw@netris.org> <55D6A36D.205@gmail.com> <876147ryhy.fsf@netris.org> <55D99791.4080104@gmail.com> <87a8thuqmo.fsf_-_@netris.org> From: =?UTF-8?Q?Vladimir_'=cf=86-coder/phcoder'_Serbinenko?= Message-ID: <55EF16C0.6010703@gmail.com> Date: Tue, 8 Sep 2015 10:11:28 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.1.0 MIME-Version: 1.0 In-Reply-To: <87a8thuqmo.fsf_-_@netris.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Tud6aRrq9daDqsXlsFhJWmb47s0PDWfJJ" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::22e 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: Tue, 08 Sep 2015 17:11:43 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Tud6aRrq9daDqsXlsFhJWmb47s0PDWfJJ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 23.08.2015 23:50, Mark H Weaver wrote: > Include -mabi=3D32 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. Could you be more precise where we assume this? Why not fix the assembly instead? > 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. >=20 > This is needed when using a compiler that defaults to one of the newer > MIPS ABIs such as N32 or N64, e.g. when natively compiling on a system > that uses one of these newer MIPS ABIs. > --- > conf/Makefile.common | 4 ++++ > configure.ac | 7 +++++-- > 2 files changed, 9 insertions(+), 2 deletions(-) >=20 > 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 +=3D -mcpu=3Dpowerpc > endif > +if COND_mips > + CFLAGS_PLATFORM +=3D -mabi=3D32 > + CCASFLAGS_PLATFORM =3D -mabi=3D32 > +endif > =20 > #FIXME: discover and check XEN headers > CPPFLAGS_XEN =3D -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 @@ > =20 > # Process this file with autoconf to produce a configure script. > =20 > -# Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 Free Sof= tware 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 > =20 > AC_CACHE_CHECK([for options to compile assembly], [grub_cv_cc_target_a= sm_compile], [ > test_program=3D > +test_ccasflags=3D > case "x$target_cpu-$platform" in > xmips-* | xmipsel-*) > test_program=3Dmips > + test_ccasflags=3D-mabi=3D32 > ;; > xi386-pc) > test_program=3Di386-pc > @@ -618,7 +621,7 @@ if test x"$test_program" =3D x ; then > else > found=3Dno > for arg in "" "-no-integrated-as"; do > - cmdline=3D"$TARGET_CC -c -o /dev/null $TARGET_CCASFLAGS $arg $TARG= ET_CPPFLAGS $srcdir/asm-tests/$test_program.S" > + cmdline=3D"$TARGET_CC -c -o /dev/null $TARGET_CCASFLAGS $test_ccas= flags $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=3D"$arg" >=20 --Tud6aRrq9daDqsXlsFhJWmb47s0PDWfJJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iF4EAREKAAYFAlXvFsAACgkQmBXlbbo5nOtncAD/aP9vJMI4x3BYxBIyxDXSoBCm IQa/uXLgpxv3htYO2H8BAIa+XnHRyXgtRB037tD4QvUyvnMDRNdu3ARPYuvqeEUw =JQEY -----END PGP SIGNATURE----- --Tud6aRrq9daDqsXlsFhJWmb47s0PDWfJJ--