Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VgcUz-00026J-Pa for mharc-grub-devel@gnu.org; Wed, 13 Nov 2013 10:36:57 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgcUr-0001yI-RX for grub-devel@gnu.org; Wed, 13 Nov 2013 10:36:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VgcUl-0002XB-QA for grub-devel@gnu.org; Wed, 13 Nov 2013 10:36:49 -0500 Received: from mail-ee0-f43.google.com ([74.125.83.43]:46123) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgcUl-0002X5-Jg for grub-devel@gnu.org; Wed, 13 Nov 2013 10:36:43 -0500 Received: by mail-ee0-f43.google.com with SMTP id b47so297111eek.16 for ; Wed, 13 Nov 2013 07:36:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=fmly3obik+qFjvZEN7tHH1KqGZRQYKk6VN14MM2qLYE=; b=UHQXKPmUe4SWjluyMSvT0TZroYhI+X3xCx4NU3jDsOpi31zINMP/3EgzC7DDFIvMyE 5/3I/DVvsXSrnzxlo2NhDOHLlQKvc84fIjrCyHIU62w6nL34v5c03skJ7rrUBYPYwOtK PJ/O7f8uvnjeYoQLQwT8dg8gt3mRacqhBw/i5wf2E3rQ4KOT77ywd2xLB7t6MMcDfbCf GIjxqInnmJoAQajGJUiohTzqNEPudmZGq0eXtcXK45f6+nIN4+WmsoNVQ6UIKbZYlLzp aHbpol8IOba3Xn/pBp7Z8AHKAJeUiNGSWe2UPx+uuA1qcfefIQrz0JbQlhW6teaeD2Lr pJ9w== X-Gm-Message-State: ALoCoQnqrMeD0aopPTbbETkmmczomz3lWM3VDME2Pkjj/XVUHeTfVEMBicVSHF8isLZ1e4AYRJpO X-Received: by 10.15.61.66 with SMTP id h42mr3585512eex.62.1384357002790; Wed, 13 Nov 2013 07:36:42 -0800 (PST) Received: from rocoto.smurfnet.nu ([2001:4b98:dc0:41:216:3eff:fea7:75f3]) by mx.google.com with ESMTPSA id s3sm89144257eeo.3.2013.11.13.07.36.41 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 13 Nov 2013 07:36:42 -0800 (PST) Date: Wed, 13 Nov 2013 16:36:54 +0100 From: Leif Lindholm To: The development of GNU GRUB Subject: Re: arm-uboot: misc.S:56: Error: r13 not allowed here -- `sub sp, fp, #4' Message-ID: <20131113153654.GV1557@rocoto.smurfnet.nu> References: <20131113144919.GB30137@riva.ucam.org> <528397A9.5020406@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <528397A9.5020406@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 74.125.83.43 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: Wed, 13 Nov 2013 15:36:56 -0000 On Wed, Nov 13, 2013 at 04:15:53PM +0100, Vladimir '=CF=86-coder/phcoder' S= erbinenko wrote: > On 13.11.2013 15:49, Colin Watson wrote: > > After my previous fix, arm-uboot still fails to build with: > >=20 > > arm-linux-gnueabihf-gcc -DHAVE_CONFIG_H -I. -I../../../grub-core -I..= -Wall -W -I../../../include -I../include -DGRUB_MACHINE_UBOOT=3D1 -DGRUB= _MACHINE_ARM=3D1 -DGRUB_MACHINE=3DARM_UBOOT -DGRUB_TARGET_CPU_ARM=3D1 -nost= dinc -isystem /usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/include -DGRUB_FIL= E=3D\"lib/arg.c\" -I. -I../../../grub-core -I.. -I../../.. -I../../../inclu= de -I../include -I../../../grub-core/lib/libgcrypt-grub/include -I../../../= grub-core/lib/libgcrypt-grub/src/ -DGRUB_KERNEL=3D1 -Os -Wall -W -Wshad= ow -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Wattributes -Wch= ar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -= Wdiv-by-zero -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-secu= rity -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int= -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -W= missing-field-initializers -Wmissing-format-attribute -Wmultichar -Wnonnull= -Woverflow -Wparentheses -Wpointer-ar > ith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-= compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef -Wunknown-pragmas -W= unused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value = -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings= -Wnested-externs -Wstrict-prototypes -Wpointer-sign -g -Wredundant-decls -= Wmissing-prototypes -Wmissing-declarations -Wcast-align -freg-struct-return= -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -fno-stack-protector -= mno-unaligned-access -Wtrampolines -Werror -DUSE_ASCII_FALLBACK=3D1 -DHAVE_= UNIFONT_WIDTHSPEC=3D1 -mthumb-interwork -mlong-calls -ffreestanding -= MT lib/kernel_exec-arg.o -MD -MP -MF lib/.deps-core/kernel_exec-arg.Tpo -c = -o lib/kernel_exec-arg.o `test -f 'lib/arg.c' || echo '../../../grub-core/'= `lib/arg.c > > misc.S: Assembler messages: > > misc.S:56: Error: r13 not allowed here -- `sub sp,fp,#4' > > make[3]: *** [kern/arm/kernel_exec-misc.o] Error 1 > >=20 > > I don't think SP can be used that way in Thumb mode? > >=20 > I think that our asm routines should be in full ARM. Attached patch > follows this strategy. One remaining problem is to make sure that thumb > flags in TARGET_CFLAGS and TARGET_CCASFLAGS match. There should be no need for this - the only thing is to ensure the -mthumb-interwork is set in CCASFLAGS_PLATFORM as well as CFLAGS_PLATFORM, and even that is just to prevent linker warnings.. There is no special ARM_PROLOGUE needed, and (on armv5te onwards) pop {..., pc} is an interworking branch. If we want to force a file to build as ARM (which I'm not sure is necessary now that we have split up armv6 separate from later architectures), all that is required is a .arm directive up top. / Leif