From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Vgb5D-00051p-56 for mharc-grub-devel@gnu.org; Wed, 13 Nov 2013 09:06:15 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vgb53-00051W-BM for grub-devel@gnu.org; Wed, 13 Nov 2013 09:06:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vgb4u-0005hY-Kz for grub-devel@gnu.org; Wed, 13 Nov 2013 09:06:05 -0500 Received: from mail-ea0-x22c.google.com ([2a00:1450:4013:c01::22c]:58194) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vgb4u-0005hN-8h for grub-devel@gnu.org; Wed, 13 Nov 2013 09:05:56 -0500 Received: by mail-ea0-f172.google.com with SMTP id h11so223387eaj.3 for ; Wed, 13 Nov 2013 06:05:55 -0800 (PST) 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:subject:references :in-reply-to:content-type; bh=rxErwR6WTbIxCA6AinhEaN7Kc4UqCfLB34690Y5LJsQ=; b=UR9BBig3ndEeOAxUmnm50oLUY8rpca/bKWsKcvX0FZTA7Y9ORMk8SmjVvsDQVB5JKn csMHPSWuWJxsv00s8xNVHBjsEk03ANCh+1u7chTpQTOmUeaAlIzS8hKN5bh+Njl/e2xx wPjr+2WvjvylQS73ETl8rnZLAi09r74YqpeK67L6JdlZwJHdX5qH/iGmL9lwMGSX0+iR rZw0CYWJkFRPI8AhFsxw3janrK88HEiYvcgroKElmXPlWj3CB/A6v1DV5V5+ghLatcw5 Ibuf55jaLfXxUtsm13tyUkIBU3Kd2HOWBaTtEXm/spcSbqgy5FoF4h8HkVf14RkxB63c /cSQ== X-Received: by 10.14.208.200 with SMTP id q48mr17379094eeo.50.1384351554940; Wed, 13 Nov 2013 06:05:54 -0800 (PST) Received: from [192.168.1.16] (31-249.1-85.cust.bluewin.ch. [85.1.249.31]) by mx.google.com with ESMTPSA id x4sm88353466eef.1.2013.11.13.06.05.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 13 Nov 2013 06:05:54 -0800 (PST) Message-ID: <52838740.1070009@gmail.com> Date: Wed, 13 Nov 2013 15:05:52 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Re: Division clash between core and libgcc on ARM References: <20131113134253.GL16147@riva.ucam.org> In-Reply-To: <20131113134253.GL16147@riva.ucam.org> X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="----enig2RVUQJHEGSWMPKGHVTHWM" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c01::22c 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 14:06:13 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2RVUQJHEGSWMPKGHVTHWM Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 13.11.2013 14:42, Colin Watson wrote: > ./configure --build=3Dx86_64-linux-gnu --host=3Darm-linux-gnueabihf -= -target=3Darm-linux-gnueabihf --with-platform=3Duboot >=20 > This fails with: >=20 > arm-linux-gnueabihf-gcc -Wall -W -Wshadow -Wold-style-definition -Wpo= inter-arith -Wundef -Wextra -Wattributes -Wchar-subscripts -Wcomment -Wde= precated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wendif-label= s -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimpl= icit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-= pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initia= lizers -Wmissing-format-attribute -Wmultichar -Wnonnull -Woverflow -Wpare= ntheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-po= int -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wunde= f -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-pa= rameter -Wunused-value -Wunused-variable -Wvariadic-macros -Wvolatile-re= gister-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer= -sign -Wcast-align -Werror -Wno-undef -Wno-sign-compare -Wno-unused -Wno-= unused-parameter -Wno-redundant-decls -Wno-unreach able-code -Wno-conversion -Wno-old-style-definition -o grub-script-= check util/grub_script_check-grub-script-check.o grub-core/kern/emu/grub_= script_check-argp_common.o grub-core/osdep/grub_script_check-init.o libg= rubmods.a libgrubgcry.a libgrubkern.a grub-core/gnulib/libgnu.a > arm-linux-gnueabihf-gcc -Wall -W -Wshadow -Wold-style-definition -Wpo= inter-arith -Wundef -Wextra -Wattributes -Wchar-subscripts -Wcomment -Wde= precated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wendif-label= s -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimpl= icit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-= pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initia= lizers -Wmissing-format-attribute -Wmultichar -Wnonnull -Woverflow -Wpare= ntheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-po= int -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wunde= f -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-pa= rameter -Wunused-value -Wunused-variable -Wvariadic-macros -Wvolatile-re= gister-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer= -sign -Wcast-align -Werror -Wno-undef -Wno-sign-compare -Wno-unused -Wno-= unused-parameter -Wno-redundant-decls -Wno-unreach able-code -Wno-conversion -Wno-old-style-definition -o grub-editenv= util/grub_editenv-grub-editenv.o util/grub_editenv-editenv.o grub-core/o= sdep/grub_editenv-init.o libgrubmods.a libgrubgcry.a libgrubkern.a grub-= core/gnulib/libgnu.a > /usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/libgcc.a(_udivsi3.o): In f= unction `__aeabi_uidiv': > (.text+0x0): multiple definition of `__udivsi3' > libgrubkern.a(libgrubkern_a-misc.o):misc.c:(.text+0xa3c): first defin= ed here > /usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/libgcc.a(_udivsi3.o): In f= unction `__aeabi_uidiv': > (.text+0x0): multiple definition of `__aeabi_uidiv' > libgrubkern.a(libgrubkern_a-misc.o):misc.c:(.text+0xa3c): first defin= ed here > collect2: error: ld returned 1 exit status >=20 > I don't think we should redirect divisions when building userspace > utilities; it would be simpler to just let libgcc handle them in those > cases. How does this look? >=20 good go ahead > * grub-core/kern/misc.c: Don't redirect divisions in the > GRUB_UTIL case. >=20 > diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c > index 8b771a5..194e770 100644 > --- a/grub-core/kern/misc.c > +++ b/grub-core/kern/misc.c > @@ -596,6 +596,8 @@ grub_divmod64 (grub_uint64_t n, grub_uint64_t d, gr= ub_uint64_t *r) > return q; > } > =20 > +#ifndef GRUB_UTIL > + > #if defined (__arm__) > =20 > grub_uint32_t > @@ -639,6 +641,8 @@ __umoddi3 (grub_uint64_t a, grub_uint64_t b) > =20 > #endif > =20 > +#endif /* GRUB_UTIL */ > + > /* Convert a long long value to a string. This function avoids 64-bit > modular arithmetic or divisions. */ > static char * >=20 > Thanks, >=20 ------enig2RVUQJHEGSWMPKGHVTHWM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iF4EAREKAAYFAlKDh0AACgkQmBXlbbo5nOusMQD/dKnAmJNZvR3oUfko8lTchWs8 d1o4wGdqEsQ88qj2ziAA/RhRq/7dKV7XAc+R3nL9TmWrgAoI4wDkNWi/xkMhjeoo =2jDU -----END PGP SIGNATURE----- ------enig2RVUQJHEGSWMPKGHVTHWM--