From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KhoR8-00018u-LS for qemu-devel@nongnu.org; Mon, 22 Sep 2008 12:38:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KhoR7-00017c-4O for qemu-devel@nongnu.org; Mon, 22 Sep 2008 12:38:58 -0400 Received: from [199.232.76.173] (port=51362 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KhoR6-00017R-QI for qemu-devel@nongnu.org; Mon, 22 Sep 2008 12:38:56 -0400 Received: from nf-out-0910.google.com ([64.233.182.189]:53927) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KhoR6-0003d3-3E for qemu-devel@nongnu.org; Mon, 22 Sep 2008 12:38:56 -0400 Received: by nf-out-0910.google.com with SMTP id b2so722817nfb.12 for ; Mon, 22 Sep 2008 09:38:53 -0700 (PDT) Date: Mon, 22 Sep 2008 19:39:42 +0300 From: "Kirill A. Shutemov" Subject: Re: [Qemu-devel] [PATCH, RFC] ld flag --warn-common Message-ID: <20080922163940.GA5402@localhost.localdomain> References: <20080919163730.GA5016@localhost.localdomain> <20080921211432.GA28684@localhost.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FL5UXtIhxfXey3p5" Content-Disposition: inline In-Reply-To: Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 22, 2008 at 07:24:27PM +0300, Blue Swirl wrote: > On 9/22/08, Kirill A. Shutemov wrote: > > On Sat, Sep 20, 2008 at 10:49:36AM +0300, Blue Swirl wrote: > > > On 9/19/08, Kirill A. Shutemov wrote: > > > > On Sun, Sep 07, 2008 at 11:24:37AM +0300, Blue Swirl wrote: > > > > > Hi, > > > > > > > > > > These trivial patches enable linker flag --warn-common and fix = the > > > > > warnings caused by enabling the flag. > > > > > > > > > > > > This flag cause a lot of warning on my machine, even with trivial = program. > > > > > > > > $ cat 1.c > > > > #include > > > > > > > > int main() > > > > { > > > > printf("test\n"); > > > > return 0; > > > > } > > > > $ gcc -Wl,--warn-common -static 1.c > > > > /usr/lib64/gcc/x86_64-alt-linux/4.1.2/../../../../lib64/libc.a(st= rtoul.o): warning: multiple common of `_nl_category_name_idxs' > > > > /usr/lib64/gcc/x86_64-alt-linux/4.1.2/../../../../lib64/libc.a(st= rtol.o): warning: previous common is here > > > > /usr/lib64/gcc/x86_64-alt-linux/4.1.2/../../../../lib64/libc.a(st= rtol_l.o): warning: multiple common of `_nl_category_name_idxs' > > > > /usr/lib64/gcc/x86_64-alt-linux/4.1.2/../../../../lib64/libc.a(st= rtol.o): warning: previous common is here > > > > /usr/lib64/gcc/x86_64-alt-linux/4.1.2/../../../../lib64/libc.a(st= rtoul_l.o): warning: multiple common of `_nl_category_name_idxs' > > > > /usr/lib64/gcc/x86_64-alt-linux/4.1.2/../../../../lib64/libc.a(st= rtol.o): warning: previous common is here > > > > /usr/lib64/gcc/x86_64-alt-linux/4.1.2/../../../../lib64/libc.a(vf= printf.o): warning: multiple common of `_nl_category_name_idxs' > > > > /usr/lib64/gcc/x86_64-alt-linux/4.1.2/../../../../lib64/libc.a(st= rtol.o): warning: previous common is here > > > > > > > > ...and so on. > > > > > > > > > > > > Is it problem with my toolchain? What is your testing environment? > > > > > > I get no warnings for Qemu build on Debian i386, amd64 > > > (stable/unstable), Sparc32, Sparc64 or on OpenBSD/Sparc64. Your > > > program produces one warning on Debian stable (all hosts except no > > > warnings on arm), no warnings on Debian amd64 unstable or OpenBSD. > > > > > > I've got a lot of warnings on ALT Linux x86_64 and Ubuntu x86_64. Both > > with gcc 4.1.2. Are you sure that you test static build? >=20 > $ gcc -Wl,--warn-common -static main.c > /usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64/libc.a(dl-open.o): > warning: definition of `_dl_tls_static_size' overriding common > /usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64/libc.a(libc-tls.o): > warning: common is here > $ cat main.c > #include >=20 > int main() > { > printf("test\n"); > return 0; > } I think --warn-common shouldn't be added to LDFLAGS, when we build static qemu. --=20 Regards, Kirill A. Shutemov + Belarus, Minsk + ALT Linux Team, http://www.altlinux.com/ --FL5UXtIhxfXey3p5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkjXykwACgkQbWYnhzC5v6rcCQCeJUyYHxdYHLuNIT1LGF3ZilXI tFAAn23M9ggn+GPbHpJbm3WV26+BxU+J =EtEu -----END PGP SIGNATURE----- --FL5UXtIhxfXey3p5--