From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KhWFY-0007o2-6k for qemu-devel@nongnu.org; Sun, 21 Sep 2008 17:13:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KhWFV-0007mA-U4 for qemu-devel@nongnu.org; Sun, 21 Sep 2008 17:13:47 -0400 Received: from [199.232.76.173] (port=46259 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KhWFV-0007m7-O4 for qemu-devel@nongnu.org; Sun, 21 Sep 2008 17:13:45 -0400 Received: from ey-out-1920.google.com ([74.125.78.150]:44628) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KhWFV-000336-Ac for qemu-devel@nongnu.org; Sun, 21 Sep 2008 17:13:45 -0400 Received: by ey-out-1920.google.com with SMTP id 4so312977eyk.4 for ; Sun, 21 Sep 2008 14:13:43 -0700 (PDT) Date: Mon, 22 Sep 2008 00:14:33 +0300 From: "Kirill A. Shutemov" Subject: Re: [Qemu-devel] [PATCH, RFC] ld flag --warn-common Message-ID: <20080921211432.GA28684@localhost.localdomain> References: <20080919163730.GA5016@localhost.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pf9I7BMVVzbSWLtt" 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 --pf9I7BMVVzbSWLtt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 progr= am. > > > > $ 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(strtoul= =2Eo): warning: multiple common of `_nl_category_name_idxs' > > /usr/lib64/gcc/x86_64-alt-linux/4.1.2/../../../../lib64/libc.a(strtol.= o): warning: previous common is here > > /usr/lib64/gcc/x86_64-alt-linux/4.1.2/../../../../lib64/libc.a(strtol_= l.o): warning: multiple common of `_nl_category_name_idxs' > > /usr/lib64/gcc/x86_64-alt-linux/4.1.2/../../../../lib64/libc.a(strtol.= o): warning: previous common is here > > /usr/lib64/gcc/x86_64-alt-linux/4.1.2/../../../../lib64/libc.a(strtoul= _l.o): warning: multiple common of `_nl_category_name_idxs' > > /usr/lib64/gcc/x86_64-alt-linux/4.1.2/../../../../lib64/libc.a(strtol.= o): warning: previous common is here > > /usr/lib64/gcc/x86_64-alt-linux/4.1.2/../../../../lib64/libc.a(vfprint= f.o): warning: multiple common of `_nl_category_name_idxs' > > /usr/lib64/gcc/x86_64-alt-linux/4.1.2/../../../../lib64/libc.a(strtol.= o): warning: previous common is here > > > > ...and so on. > > > > > > Is it problem with my toolchain? What is your testing environment? >=20 > 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 Regards, Kirill A. Shutemov + Belarus, Minsk + ALT Linux Team, http://www.altlinux.com/ --pf9I7BMVVzbSWLtt 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) iEYEARECAAYFAkjWuTgACgkQbWYnhzC5v6o1vwCeKJ69Pw9mIiYalKZAl4kzIWrw vTkAn0ZSC4JwWI8ZcFAEsRwQGNj4IWRI =jYl5 -----END PGP SIGNATURE----- --pf9I7BMVVzbSWLtt--