From a956d8791ffe383fe6fe356fd1035cabe76d4bdd Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 19 May 2009 11:30:24 +0200 Subject: GCC issues. --- gcc.mdwn | 5 +- hurd/running/debian/porting/gcc.mdwn | 48 ---------------- hurd/running/debian/porting/gcc/c++.mdwn | 41 -------------- hurd/running/debian/porting/gcc/libmudflap.mdwn | 72 ------------------------ open_issues/gcc.mdwn | 50 +++++++++++++++++ open_issues/gcc/c++.mdwn | 41 ++++++++++++++ open_issues/gcc/libmudflap.mdwn | 74 +++++++++++++++++++++++++ tag/open_issue_gcc.mdwn | 19 +++++++ 8 files changed, 188 insertions(+), 162 deletions(-) delete mode 100644 hurd/running/debian/porting/gcc.mdwn delete mode 100644 hurd/running/debian/porting/gcc/c++.mdwn delete mode 100644 hurd/running/debian/porting/gcc/libmudflap.mdwn create mode 100644 open_issues/gcc.mdwn create mode 100644 open_issues/gcc/c++.mdwn create mode 100644 open_issues/gcc/libmudflap.mdwn create mode 100644 tag/open_issue_gcc.mdwn diff --git a/gcc.mdwn b/gcc.mdwn index c9dae96e..81a2a357 100644 --- a/gcc.mdwn +++ b/gcc.mdwn @@ -1,4 +1,5 @@ -[[!meta copyright="Copyright © 2007, 2008 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2007, 2008, 2009 Free Software Foundation, +Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -9,3 +10,5 @@ is included in the section entitled [[GNU Free Documentation License|/fdl]]."]]"""]] The [GNU Compiler Collection](http://gcc.gnu.org/). + + * [[Open Issues|tag/open_issue_gcc]] diff --git a/hurd/running/debian/porting/gcc.mdwn b/hurd/running/debian/porting/gcc.mdwn deleted file mode 100644 index 24fb6ec4..00000000 --- a/hurd/running/debian/porting/gcc.mdwn +++ /dev/null @@ -1,48 +0,0 @@ -[[!meta copyright="Copyright © 2008, 2009 Free Software Foundation, Inc."]] - -[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable -id="license" text="Permission is granted to copy, distribute and/or modify this -document under the terms of the GNU Free Documentation License, Version 1.2 or -any later version published by the Free Software Foundation; with no Invariant -Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license -is included in the section entitled -[[GNU Free Documentation License|/fdl]]."]]"""]] - -For GCC trunk: - -Debian package has patches (for 4.3). Some have been forwarded upstream. (And -have been ignored.) [[Thomas_Schwinge|tschwinge]] is working on getting them -integrated. - - * [\[meta-bug\] bootstrap bugs for - \*-gnu\*](http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21824) - - * [build system: gcc\_cv\_libc\_provides\_ssp and - NATIVE\_SYSTEM\_HEADER\_DIR](http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html) - - * [-fstack-protector shouldn't use TLS in freestanding - mode](http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29838) - - * [Tool chain configuration: GNU/\* sharing stuff with - GNU/Linux](http://gcc.gnu.org/ml/gcc/2007-11/msg00289.html) - - - -Additionally: - - * Configure fragments that have `*linux*` cases might/should often contain - those for us (and GNU/k*BSD) as well. - - * `libgcc/configure.ac` [might - need](http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00315.html) to be - aligned for us to the `*linux*` cases. As well as at the end of - `libgcc/config.host`. Check. - - checking whether decimal floating point is supported... no - checking whether fixed-point is supported... no - - * `libgomp/configure.tgt` - - * [[`libmudflap`|libmudflap]]. - - * [[C++]]. diff --git a/hurd/running/debian/porting/gcc/c++.mdwn b/hurd/running/debian/porting/gcc/c++.mdwn deleted file mode 100644 index c8d67b29..00000000 --- a/hurd/running/debian/porting/gcc/c++.mdwn +++ /dev/null @@ -1,41 +0,0 @@ -[[!meta copyright="Copyright © 2008, 2009 Free Software Foundation, Inc."]] - -[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable -id="license" text="Permission is granted to copy, distribute and/or modify this -document under the terms of the GNU Free Documentation License, Version 1.2 or -any later version published by the Free Software Foundation; with no Invariant -Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license -is included in the section entitled -[[GNU Free Documentation License|/fdl]]."]]"""]] - -[[!tag fixed_in_debian]] - -Modify the [[building/cross-compiling]] shell script to configure GCC for -building GCC with C++ support when building its second (i.e., final) version. - -Compiling a most-trivial C++ program used to work with GCC 4.2 and 4.3 (and the -resulting binaries would also work), but linking fails with GCC SVN trunk: - - $ $TARGET-g++ -Wall a.cc -lpthread - /home/thomas/tmp/gnu-0/lib/gcc/i586-pc-gnu/4.4.0/../../../../i586-pc-gnu/lib/libgcc_s.so: undefined reference to `__multf3' - /home/thomas/tmp/gnu-0/lib/gcc/i586-pc-gnu/4.4.0/../../../../i586-pc-gnu/lib/libgcc_s.so: undefined reference to `__fixunstfsi' - /home/thomas/tmp/gnu-0/lib/gcc/i586-pc-gnu/4.4.0/../../../../i586-pc-gnu/lib/libgcc_s.so: undefined reference to `__subtf3' - /home/thomas/tmp/gnu-0/lib/gcc/i586-pc-gnu/4.4.0/../../../../i586-pc-gnu/lib/libgcc_s.so: undefined reference to `__divtf3' - /home/thomas/tmp/gnu-0/lib/gcc/i586-pc-gnu/4.4.0/../../../../i586-pc-gnu/lib/libgcc_s.so: undefined reference to `__copysigntf3' - /home/thomas/tmp/gnu-0/lib/gcc/i586-pc-gnu/4.4.0/../../../../i586-pc-gnu/lib/libgcc_s.so: undefined reference to `__addtf3' - /home/thomas/tmp/gnu-0/lib/gcc/i586-pc-gnu/4.4.0/../../../../i586-pc-gnu/lib/libgcc_s.so: undefined reference to `__lttf2' - /home/thomas/tmp/gnu-0/lib/gcc/i586-pc-gnu/4.4.0/../../../../i586-pc-gnu/lib/libgcc_s.so: undefined reference to `__floatsitf' - /home/thomas/tmp/gnu-0/lib/gcc/i586-pc-gnu/4.4.0/../../../../i586-pc-gnu/lib/libgcc_s.so: undefined reference to `__netf2' - /home/thomas/tmp/gnu-0/lib/gcc/i586-pc-gnu/4.4.0/../../../../i586-pc-gnu/lib/libgcc_s.so: undefined reference to `__floatunsitf' - /home/thomas/tmp/gnu-0/lib/gcc/i586-pc-gnu/4.4.0/../../../../i586-pc-gnu/lib/libgcc_s.so: undefined reference to `__eqtf2' - /home/thomas/tmp/gnu-0/lib/gcc/i586-pc-gnu/4.4.0/../../../../i586-pc-gnu/lib/libgcc_s.so: undefined reference to `__fabstf2' - collect2: ld returned 1 exit status - -Whether this defect report also applies to a natively-build GCC from SVN trunk -has not yet been checked. - -[[Thomas_Schwinge|tschwinge]] suspects the problem to be a configuration issue -of a GCC helper library, whose configuration setup has changed after GCC 4.3. - -The need for `-lpthread` is another story. See the Debian glibc patches -repository for details. diff --git a/hurd/running/debian/porting/gcc/libmudflap.mdwn b/hurd/running/debian/porting/gcc/libmudflap.mdwn deleted file mode 100644 index 994b7782..00000000 --- a/hurd/running/debian/porting/gcc/libmudflap.mdwn +++ /dev/null @@ -1,72 +0,0 @@ -[[!meta copyright="Copyright © 2008 Free Software Foundation, Inc."]] - -[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable -id="license" text="Permission is granted to copy, distribute and/or modify this -document under the terms of the GNU Free Documentation License, Version 1.2 or -any later version published by the Free Software Foundation; with no Invariant -Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license -is included in the section entitled -[[GNU Free Documentation License|/fdl]]."]]"""]] - -Single-threaded use appears to work: - - $ echo 'int main(void) { int *a; a[10]=0; return a[5]; }' | ↩ - gcc -o a -fmudflap -x c - -lmudflap - $ ./a - ******* - mudflap violation 1 (check/write): time=1227208721.922064 ptr=0x1023de0 size=4 - pc=0x1037a33 location=`:1:26 (main)' - /usr/lib/libmudflap.so.0(__mf_check+0x33) [0x1037a33] - ./a(main+0x7c) [0x80486c4] - /usr/lib/libmudflap.so.0(__wrap_main+0x49) [0x1037239] - Nearby object 1: checked region begins 68B before and ends 65B before - mudflap object 0x80ca268: name=`argv[]' - bounds=[0x1023e24,0x1023e2b] size=8 area=static check=0r/0w liveness=0 - alloc time=1227208721.922064 pc=0x10371d3 - Nearby object 2: checked region begins 76B before and ends 73B before - mudflap object 0x80cb448: name=`environ[]' - bounds=[0x1023e2c,0x1023ed7] size=172 area=static check=0r/0w liveness=0 - alloc time=1227208721.922064 pc=0x10371d3 - number of nearby objects: 2 - ******* - mudflap violation 2 (check/read): time=1227208721.942109 ptr=0x1023dcc size=4 - pc=0x1037a33 location=`:1:35 (main)' - /usr/lib/libmudflap.so.0(__mf_check+0x33) [0x1037a33] - ./a(main+0xf3) [0x804873b] - /usr/lib/libmudflap.so.0(__wrap_main+0x49) [0x1037239] - Nearby object 1: checked region begins 88B before and ends 85B before - mudflap object 0x80ca268: name=`argv[]' - Nearby object 2: checked region begins 96B before and ends 93B before - mudflap object 0x80cb448: name=`environ[]' - number of nearby objects: 2 - -Multi-threaded use doesn't: - - $ echo 'int main(void) { int *a; a[10]=0; return a[5]; }' | ↩ - gcc -include pthread.h -o a -fmudflapth -x c - -lmudflapth -lpthread - $ ./a - Killed - $ gdb a - [...] - Starting program: /media/data/home/tschwinge/a - - Program received signal EXC_BAD_ACCESS, Could not access memory. - 0x01180653 in getenv () from /lib/libc.so.0.3 - (gdb) bt - #0 0x01180653 in getenv () from /lib/libc.so.0.3 - #1 0x01177a02 in __dcigettext () from /lib/libc.so.0.3 - #2 0x01176a57 in dcgettext () from /lib/libc.so.0.3 - #3 0x011c03b5 in strerror_r () from /lib/libc.so.0.3 - #4 0x01175b57 in __assert_perror_fail () from /lib/libc.so.0.3 - #5 0x0111f1ad in cthread_fork (func=0x114f630 <_hurd_msgport_receive>, arg=0x0) - at /build/buildd/hurd-20080607/build-tree/hurd/libpthread/pthread/cthreads-compat.c:41 - #6 0x0115713e in _hurdsig_init () from /lib/libc.so.0.3 - #7 0x01140852 in _hurd_proc_init@@GLIBC_2.2.6 () from /lib/libc.so.0.3 - #8 0x01140e86 in _hurd_init () from /lib/libc.so.0.3 - #9 0x011690ce in init1 () from /lib/libc.so.0.3 - #10 0x00001e96 in _dl_start_user () from /lib/ld.so - #11 0x00000001 in ?? () - #12 0x01024000 in ?? () - #13 0x00000000 in ?? () - -Also `libmudflap` is pthread-only. diff --git a/open_issues/gcc.mdwn b/open_issues/gcc.mdwn new file mode 100644 index 00000000..76832165 --- /dev/null +++ b/open_issues/gcc.mdwn @@ -0,0 +1,50 @@ +[[!meta copyright="Copyright © 2008, 2009 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled +[[GNU Free Documentation License|/fdl]]."]]"""]] + +[[!tag open_issue_porting open_issue_gcc fixed_in_debian]] + +For GCC trunk: + +Debian package has patches (for 4.3). Some have been forwarded upstream. (And +have been ignored.) [[Thomas_Schwinge|tschwinge]] is working on getting them +integrated. + + * [\[meta-bug\] bootstrap bugs for + \*-gnu\*](http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21824) + + * [build system: gcc\_cv\_libc\_provides\_ssp and + NATIVE\_SYSTEM\_HEADER\_DIR](http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html) + + * [-fstack-protector shouldn't use TLS in freestanding + mode](http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29838) + + * [Tool chain configuration: GNU/\* sharing stuff with + GNU/Linux](http://gcc.gnu.org/ml/gcc/2007-11/msg00289.html) + + + +Additionally: + + * Configure fragments that have `*linux*` cases might/should often contain + those for us (and GNU/k*BSD) as well. + + * `libgcc/configure.ac` [might + need](http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00315.html) to be + aligned for us to the `*linux*` cases. As well as at the end of + `libgcc/config.host`. Check. + + checking whether decimal floating point is supported... no + checking whether fixed-point is supported... no + + * `libgomp/configure.tgt` + + * [[`libmudflap`|libmudflap]]. + + * [[C++]]. diff --git a/open_issues/gcc/c++.mdwn b/open_issues/gcc/c++.mdwn new file mode 100644 index 00000000..cab4c1f1 --- /dev/null +++ b/open_issues/gcc/c++.mdwn @@ -0,0 +1,41 @@ +[[!meta copyright="Copyright © 2008, 2009 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled +[[GNU Free Documentation License|/fdl]]."]]"""]] + +[[!tag open_issue_porting open_issue_gcc fixed_in_debian]] + +Modify the [[hurd/building/cross-compiling]] shell script to configure GCC for +building GCC with C++ support when building its second (i.e., final) version. + +Compiling a most-trivial C++ program used to work with GCC 4.2 and 4.3 (and the +resulting binaries would also work), but linking fails with GCC SVN trunk: + + $ $TARGET-g++ -Wall a.cc -lpthread + /home/thomas/tmp/gnu-0/lib/gcc/i586-pc-gnu/4.4.0/../../../../i586-pc-gnu/lib/libgcc_s.so: undefined reference to `__multf3' + /home/thomas/tmp/gnu-0/lib/gcc/i586-pc-gnu/4.4.0/../../../../i586-pc-gnu/lib/libgcc_s.so: undefined reference to `__fixunstfsi' + /home/thomas/tmp/gnu-0/lib/gcc/i586-pc-gnu/4.4.0/../../../../i586-pc-gnu/lib/libgcc_s.so: undefined reference to `__subtf3' + /home/thomas/tmp/gnu-0/lib/gcc/i586-pc-gnu/4.4.0/../../../../i586-pc-gnu/lib/libgcc_s.so: undefined reference to `__divtf3' + /home/thomas/tmp/gnu-0/lib/gcc/i586-pc-gnu/4.4.0/../../../../i586-pc-gnu/lib/libgcc_s.so: undefined reference to `__copysigntf3' + /home/thomas/tmp/gnu-0/lib/gcc/i586-pc-gnu/4.4.0/../../../../i586-pc-gnu/lib/libgcc_s.so: undefined reference to `__addtf3' + /home/thomas/tmp/gnu-0/lib/gcc/i586-pc-gnu/4.4.0/../../../../i586-pc-gnu/lib/libgcc_s.so: undefined reference to `__lttf2' + /home/thomas/tmp/gnu-0/lib/gcc/i586-pc-gnu/4.4.0/../../../../i586-pc-gnu/lib/libgcc_s.so: undefined reference to `__floatsitf' + /home/thomas/tmp/gnu-0/lib/gcc/i586-pc-gnu/4.4.0/../../../../i586-pc-gnu/lib/libgcc_s.so: undefined reference to `__netf2' + /home/thomas/tmp/gnu-0/lib/gcc/i586-pc-gnu/4.4.0/../../../../i586-pc-gnu/lib/libgcc_s.so: undefined reference to `__floatunsitf' + /home/thomas/tmp/gnu-0/lib/gcc/i586-pc-gnu/4.4.0/../../../../i586-pc-gnu/lib/libgcc_s.so: undefined reference to `__eqtf2' + /home/thomas/tmp/gnu-0/lib/gcc/i586-pc-gnu/4.4.0/../../../../i586-pc-gnu/lib/libgcc_s.so: undefined reference to `__fabstf2' + collect2: ld returned 1 exit status + +Whether this defect report also applies to a natively-build GCC from SVN trunk +has not yet been checked. + +[[Thomas_Schwinge|tschwinge]] suspects the problem to be a configuration issue +of a GCC helper library, whose configuration setup has changed after GCC 4.3. + +The need for `-lpthread` is another story. See the Debian glibc patches +repository for details. diff --git a/open_issues/gcc/libmudflap.mdwn b/open_issues/gcc/libmudflap.mdwn new file mode 100644 index 00000000..f14ca1bc --- /dev/null +++ b/open_issues/gcc/libmudflap.mdwn @@ -0,0 +1,74 @@ +[[!meta copyright="Copyright © 2008, 2009 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled +[[GNU Free Documentation License|/fdl]]."]]"""]] + +[[!tag open_issue_porting open_issue_gcc]] + +Single-threaded use appears to work: + + $ echo 'int main(void) { int *a; a[10]=0; return a[5]; }' | ↩ + gcc -o a -fmudflap -x c - -lmudflap + $ ./a + ******* + mudflap violation 1 (check/write): time=1227208721.922064 ptr=0x1023de0 size=4 + pc=0x1037a33 location=`:1:26 (main)' + /usr/lib/libmudflap.so.0(__mf_check+0x33) [0x1037a33] + ./a(main+0x7c) [0x80486c4] + /usr/lib/libmudflap.so.0(__wrap_main+0x49) [0x1037239] + Nearby object 1: checked region begins 68B before and ends 65B before + mudflap object 0x80ca268: name=`argv[]' + bounds=[0x1023e24,0x1023e2b] size=8 area=static check=0r/0w liveness=0 + alloc time=1227208721.922064 pc=0x10371d3 + Nearby object 2: checked region begins 76B before and ends 73B before + mudflap object 0x80cb448: name=`environ[]' + bounds=[0x1023e2c,0x1023ed7] size=172 area=static check=0r/0w liveness=0 + alloc time=1227208721.922064 pc=0x10371d3 + number of nearby objects: 2 + ******* + mudflap violation 2 (check/read): time=1227208721.942109 ptr=0x1023dcc size=4 + pc=0x1037a33 location=`:1:35 (main)' + /usr/lib/libmudflap.so.0(__mf_check+0x33) [0x1037a33] + ./a(main+0xf3) [0x804873b] + /usr/lib/libmudflap.so.0(__wrap_main+0x49) [0x1037239] + Nearby object 1: checked region begins 88B before and ends 85B before + mudflap object 0x80ca268: name=`argv[]' + Nearby object 2: checked region begins 96B before and ends 93B before + mudflap object 0x80cb448: name=`environ[]' + number of nearby objects: 2 + +Multi-threaded use doesn't: + + $ echo 'int main(void) { int *a; a[10]=0; return a[5]; }' | ↩ + gcc -include pthread.h -o a -fmudflapth -x c - -lmudflapth -lpthread + $ ./a + Killed + $ gdb a + [...] + Starting program: /media/data/home/tschwinge/a + + Program received signal EXC_BAD_ACCESS, Could not access memory. + 0x01180653 in getenv () from /lib/libc.so.0.3 + (gdb) bt + #0 0x01180653 in getenv () from /lib/libc.so.0.3 + #1 0x01177a02 in __dcigettext () from /lib/libc.so.0.3 + #2 0x01176a57 in dcgettext () from /lib/libc.so.0.3 + #3 0x011c03b5 in strerror_r () from /lib/libc.so.0.3 + #4 0x01175b57 in __assert_perror_fail () from /lib/libc.so.0.3 + #5 0x0111f1ad in cthread_fork (func=0x114f630 <_hurd_msgport_receive>, arg=0x0) + at /build/buildd/hurd-20080607/build-tree/hurd/libpthread/pthread/cthreads-compat.c:41 + #6 0x0115713e in _hurdsig_init () from /lib/libc.so.0.3 + #7 0x01140852 in _hurd_proc_init@@GLIBC_2.2.6 () from /lib/libc.so.0.3 + #8 0x01140e86 in _hurd_init () from /lib/libc.so.0.3 + #9 0x011690ce in init1 () from /lib/libc.so.0.3 + #10 0x00001e96 in _dl_start_user () from /lib/ld.so + #11 0x00000001 in ?? () + #12 0x01024000 in ?? () + #13 0x00000000 in ?? () + +Also `libmudflap` is pthread-only. diff --git a/tag/open_issue_gcc.mdwn b/tag/open_issue_gcc.mdwn new file mode 100644 index 00000000..a06a9d70 --- /dev/null +++ b/tag/open_issue_gcc.mdwn @@ -0,0 +1,19 @@ +[[!meta copyright="Copyright © 2009 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +[[!meta title=open_issue_gcc]] + +[[!map pages="tagged(open_issue_gcc) and !open_issues and !*/discussion" +show=title]] + +[[!inline +pages="tagged(open_issue_gcc) and !open_issues and !*/discussion" +show=0 +feeds=no]] -- cgit v1.2.3