* [Qemu-devel] [PATCH, RFC] ld flag --warn-common @ 2008-09-07 8:24 Blue Swirl 2008-09-07 11:50 ` Ben Taylor 2008-09-19 16:37 ` Kirill A. Shutemov 0 siblings, 2 replies; 12+ messages in thread From: Blue Swirl @ 2008-09-07 8:24 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 322 bytes --] Hi, These trivial patches enable linker flag --warn-common and fix the warnings caused by enabling the flag. I think on some platforms (Solaris?) the linker used by gcc is not GNU ld. If this is true, the patch would break compilation on those hosts and logic in configure would need to be more complex. Please confirm. [-- Attachment #2: ld_warn_common.diff --] [-- Type: plain/text, Size: 462 bytes --] [-- Attachment #3: fix_ld_warn_common.diff --] [-- Type: plain/text, Size: 1777 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH, RFC] ld flag --warn-common 2008-09-07 8:24 [Qemu-devel] [PATCH, RFC] ld flag --warn-common Blue Swirl @ 2008-09-07 11:50 ` Ben Taylor 2008-09-07 12:30 ` Blue Swirl 2008-09-19 16:37 ` Kirill A. Shutemov 1 sibling, 1 reply; 12+ messages in thread From: Ben Taylor @ 2008-09-07 11:50 UTC (permalink / raw) To: qemu-devel On Sun, Sep 7, 2008 at 4:24 AM, Blue Swirl <blauwirbel@gmail.com> wrote: > Hi, > > These trivial patches enable linker flag --warn-common and fix the > warnings caused by enabling the flag. > > I think on some platforms (Solaris?) the linker used by gcc is not GNU > ld. If this is true, the patch would break compilation on those hosts > and logic in configure would need to be more complex. Please confirm. yes, Solaris does not use gnu ld, it uses it's own linker. Ben ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH, RFC] ld flag --warn-common 2008-09-07 11:50 ` Ben Taylor @ 2008-09-07 12:30 ` Blue Swirl 2008-09-09 15:14 ` Ben Taylor 0 siblings, 1 reply; 12+ messages in thread From: Blue Swirl @ 2008-09-07 12:30 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 642 bytes --] On 9/7/08, Ben Taylor <bentaylor.solx86@gmail.com> wrote: > On Sun, Sep 7, 2008 at 4:24 AM, Blue Swirl <blauwirbel@gmail.com> wrote: > > Hi, > > > > These trivial patches enable linker flag --warn-common and fix the > > warnings caused by enabling the flag. > > > > I think on some platforms (Solaris?) the linker used by gcc is not GNU > > ld. If this is true, the patch would break compilation on those hosts > > and logic in configure would need to be more complex. Please confirm. > > > yes, Solaris does not use gnu ld, it uses it's own linker. Could you test if with this patch applied, "other ld" is printed when configuring? [-- Attachment #2: ld_warn_common.diff --] [-- Type: plain/text, Size: 568 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH, RFC] ld flag --warn-common 2008-09-07 12:30 ` Blue Swirl @ 2008-09-09 15:14 ` Ben Taylor 2008-09-09 15:56 ` Blue Swirl 0 siblings, 1 reply; 12+ messages in thread From: Ben Taylor @ 2008-09-09 15:14 UTC (permalink / raw) To: qemu-devel On Sun, Sep 7, 2008 at 8:30 AM, Blue Swirl <blauwirbel@gmail.com> wrote: > On 9/7/08, Ben Taylor <bentaylor.solx86@gmail.com> wrote: >> On Sun, Sep 7, 2008 at 4:24 AM, Blue Swirl <blauwirbel@gmail.com> wrote: >> > Hi, >> > >> > These trivial patches enable linker flag --warn-common and fix the >> > warnings caused by enabling the flag. >> > >> > I think on some platforms (Solaris?) the linker used by gcc is not GNU >> > ld. If this is true, the patch would break compilation on those hosts >> > and logic in configure would need to be more complex. Please confirm. >> >> >> yes, Solaris does not use gnu ld, it uses it's own linker. > > Could you test if with this patch applied, "other ld" is printed when > configuring? Confirmed that it prints "other ld" on Solaris. Ben ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH, RFC] ld flag --warn-common 2008-09-09 15:14 ` Ben Taylor @ 2008-09-09 15:56 ` Blue Swirl 2008-09-09 16:46 ` Blue Swirl 0 siblings, 1 reply; 12+ messages in thread From: Blue Swirl @ 2008-09-09 15:56 UTC (permalink / raw) To: qemu-devel On 9/9/08, Ben Taylor <bentaylor.solx86@gmail.com> wrote: > On Sun, Sep 7, 2008 at 8:30 AM, Blue Swirl <blauwirbel@gmail.com> wrote: > > On 9/7/08, Ben Taylor <bentaylor.solx86@gmail.com> wrote: > >> On Sun, Sep 7, 2008 at 4:24 AM, Blue Swirl <blauwirbel@gmail.com> wrote: > >> > Hi, > >> > > >> > These trivial patches enable linker flag --warn-common and fix the > >> > warnings caused by enabling the flag. > >> > > >> > I think on some platforms (Solaris?) the linker used by gcc is not GNU > >> > ld. If this is true, the patch would break compilation on those hosts > >> > and logic in configure would need to be more complex. Please confirm. > >> > >> > >> yes, Solaris does not use gnu ld, it uses it's own linker. > > > > Could you test if with this patch applied, "other ld" is printed when > > configuring? > > > Confirmed that it prints "other ld" on Solaris. Thanks for testing, I'll prepare an updated version. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH, RFC] ld flag --warn-common 2008-09-09 15:56 ` Blue Swirl @ 2008-09-09 16:46 ` Blue Swirl 0 siblings, 0 replies; 12+ messages in thread From: Blue Swirl @ 2008-09-09 16:46 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 1153 bytes --] On 9/9/08, Blue Swirl <blauwirbel@gmail.com> wrote: > On 9/9/08, Ben Taylor <bentaylor.solx86@gmail.com> wrote: > > On Sun, Sep 7, 2008 at 8:30 AM, Blue Swirl <blauwirbel@gmail.com> wrote: > > > On 9/7/08, Ben Taylor <bentaylor.solx86@gmail.com> wrote: > > >> On Sun, Sep 7, 2008 at 4:24 AM, Blue Swirl <blauwirbel@gmail.com> wrote: > > >> > Hi, > > >> > > > >> > These trivial patches enable linker flag --warn-common and fix the > > >> > warnings caused by enabling the flag. > > >> > > > >> > I think on some platforms (Solaris?) the linker used by gcc is not GNU > > >> > ld. If this is true, the patch would break compilation on those hosts > > >> > and logic in configure would need to be more complex. Please confirm. > > >> > > >> > > >> yes, Solaris does not use gnu ld, it uses it's own linker. > > > > > > Could you test if with this patch applied, "other ld" is printed when > > > configuring? > > > > > > Confirmed that it prints "other ld" on Solaris. > > > Thanks for testing, I'll prepare an updated version. Here they are. I think I'll commit them in a few days unless there are objections. [-- Attachment #2: ld_warn_common.diff --] [-- Type: plain/text, Size: 522 bytes --] [-- Attachment #3: fix_ld_warn_common.diff --] [-- Type: plain/text, Size: 1777 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH, RFC] ld flag --warn-common 2008-09-07 8:24 [Qemu-devel] [PATCH, RFC] ld flag --warn-common Blue Swirl 2008-09-07 11:50 ` Ben Taylor @ 2008-09-19 16:37 ` Kirill A. Shutemov 2008-09-20 7:49 ` Blue Swirl 1 sibling, 1 reply; 12+ messages in thread From: Kirill A. Shutemov @ 2008-09-19 16:37 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 1540 bytes --] 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 <stdio.h> 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.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(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(vfprintf.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? -- Regards, Kirill A. Shutemov + Belarus, Minsk + ALT Linux Team, http://www.altlinux.com/ [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH, RFC] ld flag --warn-common 2008-09-19 16:37 ` Kirill A. Shutemov @ 2008-09-20 7:49 ` Blue Swirl 2008-09-21 21:14 ` Kirill A. Shutemov 0 siblings, 1 reply; 12+ messages in thread From: Blue Swirl @ 2008-09-20 7:49 UTC (permalink / raw) To: qemu-devel On 9/19/08, Kirill A. Shutemov <kirill@shutemov.name> 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 <stdio.h> > > 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.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(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(vfprintf.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? 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. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH, RFC] ld flag --warn-common 2008-09-20 7:49 ` Blue Swirl @ 2008-09-21 21:14 ` Kirill A. Shutemov 2008-09-22 16:24 ` Blue Swirl 0 siblings, 1 reply; 12+ messages in thread From: Kirill A. Shutemov @ 2008-09-21 21:14 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 2203 bytes --] On Sat, Sep 20, 2008 at 10:49:36AM +0300, Blue Swirl wrote: > On 9/19/08, Kirill A. Shutemov <kirill@shutemov.name> 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 <stdio.h> > > > > 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.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(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(vfprintf.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? > > 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? -- Regards, Kirill A. Shutemov + Belarus, Minsk + ALT Linux Team, http://www.altlinux.com/ [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH, RFC] ld flag --warn-common 2008-09-21 21:14 ` Kirill A. Shutemov @ 2008-09-22 16:24 ` Blue Swirl 2008-09-22 16:39 ` Kirill A. Shutemov 0 siblings, 1 reply; 12+ messages in thread From: Blue Swirl @ 2008-09-22 16:24 UTC (permalink / raw) To: qemu-devel On 9/22/08, Kirill A. Shutemov <kirill@shutemov.name> wrote: > On Sat, Sep 20, 2008 at 10:49:36AM +0300, Blue Swirl wrote: > > On 9/19/08, Kirill A. Shutemov <kirill@shutemov.name> 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 <stdio.h> > > > > > > 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.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(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(vfprintf.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? > > > > 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? $ 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 <stdio.h> int main() { printf("test\n"); return 0; } ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH, RFC] ld flag --warn-common 2008-09-22 16:24 ` Blue Swirl @ 2008-09-22 16:39 ` Kirill A. Shutemov 2008-09-22 17:16 ` Blue Swirl 0 siblings, 1 reply; 12+ messages in thread From: Kirill A. Shutemov @ 2008-09-22 16:39 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 3023 bytes --] On Mon, Sep 22, 2008 at 07:24:27PM +0300, Blue Swirl wrote: > On 9/22/08, Kirill A. Shutemov <kirill@shutemov.name> wrote: > > On Sat, Sep 20, 2008 at 10:49:36AM +0300, Blue Swirl wrote: > > > On 9/19/08, Kirill A. Shutemov <kirill@shutemov.name> 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 <stdio.h> > > > > > > > > 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.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(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(vfprintf.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? > > > > > > 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? > > $ 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 <stdio.h> > > int main() > { > printf("test\n"); > return 0; > } I think --warn-common shouldn't be added to LDFLAGS, when we build static qemu. -- Regards, Kirill A. Shutemov + Belarus, Minsk + ALT Linux Team, http://www.altlinux.com/ [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Qemu-devel] [PATCH, RFC] ld flag --warn-common 2008-09-22 16:39 ` Kirill A. Shutemov @ 2008-09-22 17:16 ` Blue Swirl 0 siblings, 0 replies; 12+ messages in thread From: Blue Swirl @ 2008-09-22 17:16 UTC (permalink / raw) To: qemu-devel On 9/22/08, Kirill A. Shutemov <kirill@shutemov.name> wrote: > On Mon, Sep 22, 2008 at 07:24:27PM +0300, Blue Swirl wrote: > > On 9/22/08, Kirill A. Shutemov <kirill@shutemov.name> wrote: > > > On Sat, Sep 20, 2008 at 10:49:36AM +0300, Blue Swirl wrote: > > > > On 9/19/08, Kirill A. Shutemov <kirill@shutemov.name> 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 <stdio.h> > > > > > > > > > > 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.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(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(vfprintf.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? > > > > > > > > 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? > > > > $ 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 <stdio.h> > > > > int main() > > { > > printf("test\n"); > > return 0; > > } > > > I think --warn-common shouldn't be added to LDFLAGS, when we build static > qemu. Another solution would be to add a configure time check if the system libraries suck or not. Though these are only warnings and you seem to be the only person complaining. ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2008-09-22 17:16 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-09-07 8:24 [Qemu-devel] [PATCH, RFC] ld flag --warn-common Blue Swirl 2008-09-07 11:50 ` Ben Taylor 2008-09-07 12:30 ` Blue Swirl 2008-09-09 15:14 ` Ben Taylor 2008-09-09 15:56 ` Blue Swirl 2008-09-09 16:46 ` Blue Swirl 2008-09-19 16:37 ` Kirill A. Shutemov 2008-09-20 7:49 ` Blue Swirl 2008-09-21 21:14 ` Kirill A. Shutemov 2008-09-22 16:24 ` Blue Swirl 2008-09-22 16:39 ` Kirill A. Shutemov 2008-09-22 17:16 ` Blue Swirl
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).