diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2015-11-01 19:09:24 +0100 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2015-11-01 19:09:24 +0100 |
commit | 4ae03876c9a2c509bd187e6605706ab8c3ed4fe7 (patch) | |
tree | 734190ad969b6611f9f8405267ddc2ab9fb344ca /open_issues/gcc.mdwn | |
parent | 309b203c54f2521bed72311554779f3c2e143425 (diff) | |
parent | eee40e0494f8fed4a5db166b3d15b54c0e89a186 (diff) | |
download | web-4ae03876c9a2c509bd187e6605706ab8c3ed4fe7.tar.gz web-4ae03876c9a2c509bd187e6605706ab8c3ed4fe7.tar.bz2 web-4ae03876c9a2c509bd187e6605706ab8c3ed4fe7.zip |
Merge commit 'eee40e0494f8fed4a5db166b3d15b54c0e89a186'
Diffstat (limited to 'open_issues/gcc.mdwn')
-rw-r--r-- | open_issues/gcc.mdwn | 329 |
1 files changed, 192 insertions, 137 deletions
diff --git a/open_issues/gcc.mdwn b/open_issues/gcc.mdwn index b46a48cc..8065a789 100644 --- a/open_issues/gcc.mdwn +++ b/open_issues/gcc.mdwn @@ -31,14 +31,14 @@ example. Especially all the compiler magic is all the same. <!-- git checkout reviewed -git diff --patience --stat=$COLUMNS,$COLUMNS --patch --src-prefix=./ --dst-prefix=./ --find-renames --ignore-space-change ..upstream/master | awk '/^diff/ { c = $0; } /^@@/ { print c; } { print; }' | less +git diff --patience --stat=$COLUMNS,$COLUMNS --patch --src-prefix=./ --dst-prefix=./ --word-diff --color --find-renames --ignore-space-change ..upstream/trunk | awk '/^(\x1b\[[0-9]+m)?diff/ { c = " " $0; } /^(\x1b\[[0-9]+m)?@@/ { print c; } { print; }' | less -i -/^---.*/([^.]*|.*\.texi.*|[^/]*gnu[^/]*)$|hurd|linux|nacl|nptl|glibc|gs: +/^---.*/([^.]*|.*\.texi.*|[^/]*gnu[^/]*|libgo/go/(net/sock_bsd\.go|syscall/exec_bsd\.go|syscall/libcall_posix\.go))$|hurd|linux|nacl|nptl|glibc($|[^x]|x[^x]|x$)|gs:|dg-runtest --> -Last reviewed up to the [[Git mirror's 3a930d3fc68785662f5f3f4af02474cb21a62056 -(2013-06-06) sources|source_repositories/gcc]]. +Last reviewed up to the [[Git mirror's c16b7ed55398d2ea55d9ab35519f20cc053b9d0a +(2015-01-19) sources|source_repositories/gcc]]. <http://gcc.gnu.org/install/configure.html> has documentation for the `configure` switches. @@ -61,7 +61,8 @@ Last reviewed up to the [[Git mirror's 3a930d3fc68785662f5f3f4af02474cb21a62056 rename to `gnu-user` to reflect this? TODO. * `gcc/acinclude.m4`:`gcc_GAS_FLAGS`: always pass `--32` to assembler for - x86 Linux. (Why?) + x86 Linux. Probably we should just do the same, see `*-*-linux*` + comment in [[!message-id "87zjrjcasc.fsf@schwinge.name"]]. * `lib-prefix.m4` (present twice in GCC sources) contains one remaining `linux`-only case. @@ -277,18 +278,25 @@ Last reviewed up to the [[Git mirror's 3a930d3fc68785662f5f3f4af02474cb21a62056 * `libgcc` - TODO: - * `config/t-linux` * `config/i386/t-linux` + + TODO, rename to `t-gnu-user`. + * `config/i386/linux-unwind.h` + TODO, probably needs porting, if we need this. + [[!GCC_PR 57851 desc="[patch] unwinding via signal trampoline for + kfreebsd*-gnu"]]. + * `libitm` TODO: * `libitm/config/linux` + * `liboffloadmic` + * `hurd/usr` `NATIVE_SYSTEM_HEADER_DIR`, `638454a19c1c08f01c10517bc72a114250fc4f33`, @@ -299,10 +307,33 @@ Last reviewed up to the [[Git mirror's 3a930d3fc68785662f5f3f4af02474cb21a62056 * Eventually: get rid of this special-casing. [[!message-id "gckk1s$e0b$1@ger.gmane.org"]]. - * [[`libmudflap`|libmudflap]]. - * [`-fsplit-stack`](http://nickclifton.livejournal.com/6889.html) + #define TARGET_CAN_SPLIT_STACK + #define TARGET_THREAD_SPLIT_STACK_OFFSET 0x30 + + libgcc/config/i386/morestack.S + libgcc/config/i386/t-stack-i386 + libgcc/config/t-stack + libgcc/generic-morestack-thread.c + libgcc/generic-morestack.c + libgcc/generic-morestack.h + libgcc/config/i386/morestack.S: cmpl %gs:0x30,%eax # See if we have enough space. + libgcc/config/i386/morestack.S: # gcc/config/i386/linux.h. + libgcc/config/i386/morestack.S: movl %eax,%gs:0x30 # Save the new stack boundary. + libgcc/config/i386/morestack.S: movl %eax,%gs:0x30 # Save the new stack boundary. + libgcc/config/i386/morestack.S: movl %ecx,%gs:0x30 # Save new stack boundary. + libgcc/config/i386/morestack.S: # gcc/config/i386/linux64.h. + libgcc/config/i386/morestack.S: movl %eax,%gs:0x30 + libgcc/config/i386/morestack.S: movl %gs:0x30,%eax + libgcc/config/i386/morestack.S: movl %eax,%gs:0x30 + libgcc/generic-morestack-thread.c: can build glibc. */ + libgcc/generic-morestack-thread.c: not be necessary if glibc supports -fsplit-stack directly. */ + libgcc/generic-morestack.c: can build glibc. */ + libgcc/generic-morestack.c: since stack splitting only works on GNU/Linux anyhow. */ + libgcc/generic-morestack.c:#if defined(__GLIBC__) && defined(__linux__) + libgcc/generic-morestack.c: /* In glibc, the first two real time signals are used by the NPTL + IRC, freenode, #hurd, 2014-01-10: <gnu_srs1> Hi, I assume gcc -fsplit-stack is not yet supported? @@ -362,8 +393,7 @@ Last reviewed up to the [[Git mirror's 3a930d3fc68785662f5f3f4af02474cb21a62056 * Might `-fsplit-stack` be useful for us with respect to our [[multithreaded|multithreading]] libraries? - * `gcc/ada`, `gcc/testsuite/ada`, `gcc/testsuite/gnat.dg`, `gnattools`, - `libada` (not reviewed) + * `gcc/ada` (not all reviewed) * [[Ada (GNAT)|GNAT]] support is work in progress. @@ -416,8 +446,6 @@ Last reviewed up to the [[Git mirror's 3a930d3fc68785662f5f3f4af02474cb21a62056 commit a204f0622242865ffea889bd698bc7c7bd236bd1), commit 05c1aa95e6c37b3b281d749c76c673392941a031. - * Check before/after Joseph changes. (Should be fine.) - * 34618b3190c110b8926cc2b1db4b4eac95451995 »config-list.mk« What's this used for? (Check ML.) Ask to include i686-pc-gnu (once it is @@ -599,8 +627,131 @@ Last reviewed up to the [[Git mirror's 3a930d3fc68785662f5f3f4af02474cb21a62056 A lot of Linux-specific things. + * 30f690e026ecdf99c68e777a48562b58afe37f43 `TARGET_LIBC_HAS_FUNCTION`. Where + is `targetm` set? All TARGET_C99_FUNCTIONS and TARGET_HAS_SINCOS gone? + + * `libvtv` + + * Disabled in `configure.tgt`. + + * `libvtv/vtv_rts.cc`: `if (strcmp (info->dlpi_name, "linux-vdso.so.1") + == 0)` -- not a problem for us, but... + + * `libvtv/vtv_rts.cc`: `/proc/self/exe` usage, `PATH_MAX`. + + * ./libgomp/testsuite/libgomp.c/affinity-1.c Linux usage + * `libcilkrts` + Disabled for Hurd. + + libcilkrts/Makefile.am: + + +# If we're building on Linux, use the Linux version script + +if LINUX_LINKER_SCRIPT + + libcilkrts_la_LDFLAGS += -Wl,--version-script,$(srcdir)/runtime/linux-symbols.ver + +endif + + libcilkrts/configure.ac: + + +# We have linker scripts for appropriate operating systems + +linux_linker_script=no + +case "${host}" in + + *-*-linux*) + + linux_linker_script=yes + + ;; + +esac + +AM_CONDITIONAL(LINUX_LINKER_SCRIPT, test "$linux_linker_script" = "yes") + + libcilkrts/runtime/cilk_malloc.c: + + +#if defined _WIN32 || defined _WIN64 || defined __linux__ + +#include <malloc.h> + +#define HAS_MEMALIGN 1 + +#endif + + libcilkrts/runtime/config/x86/cilk-abi-vla.c: + + +#if defined(__x86_64) + + // For Intel64 linux & MACH ABI, all the parameters were passed in + + // register, so top of the stack frame above the return address + + // is just the size of the return address plus + + // distance_from_sp_to_alloca_area on the chance that the alloca + + // area isn't at the very bottom of the calling functions stack. + +#elif defined(__MACH__) + + // For ia32 MACH, parameter size is always a mutliple of 16 + + // bytes to keep the stack 16 byte aligned. So we need to round + + // number of parameters up to multiple of 4. + + param_size = 8 * sizeof(char *); + +#else + + // For both windows Intel64 ABI, and the IA32 windows and + + // linux ABIs, space is reserved on the stack for all these + + // parameters. param_size is 5 * size of a stack slot. + + param_size = 5 * sizeof(char *); + +#endif + + +#if defined(__x86_64) + + // For Intel64 linux & MACH ABI, all the parameters were passed in + + // register, so top of the stack frame above the return address + + // is just the size of the return address plus + + // distance_from_sp_to_alloca_area on the chance that the alloca + + // area isn't at the very bottom of the calling functions stack. + +#elif defined(__MACH__) + + // For ia32 MACH, parameter size is always a mutliple of 16 + + // bytes to keep the stack 16 byte aligned. So we need to round + + // number of parameters up to multiple of 4. + + param_size = 8 * sizeof(char *); + +#else + + // For both windows Intel64 ABI, and the IA32 windows and + + // linux ABIs, space is reserved on the stack for all these + + // parameters. param_size is 5 * size of a stack slot. + + param_size = 6 * sizeof(char *); + +#endif + + libcilkrts/runtime/os-unix.c: + + +#ifdef __linux__ + + // define _GNU_SOURCE before *any* #include. + + // Even <stdint.h> will break later #includes if this macro is not + + // already defined when it is #included. + +# define _GNU_SOURCE + +#endif + + +#if defined __linux__ + +# include <sys/sysinfo.h> + +# include <sys/syscall.h> + + Syscall usage outside __linux__? + + Will run into: + + +#else + +#error "Unknown architecture" + + libcilkrts/runtime/sysdep-unix.c: + + +#ifdef __linux__ + + // define _GNU_SOURCE before *any* #include. + + // Even <stdint.h> will break later #includes if this macro is not + + // already defined when it is #included. + +# define _GNU_SOURCE + +#endif + + +#ifdef __linux__ + +# include <sys/resource.h> + +# include <sys/sysinfo.h> + +#endif + + +#if defined( __linux__) || defined(__VXWORKS__) + + pthread_t tid = *(pthread_t *)thread_id; + + if (i < 0 || i > g->total_workers) + + return 0; + + return g->sysdep->threads[i] == tid; + +#else + + // Needs to be implemented + + return 0; + +#endif + IRC, freenode, #hurd, 2014-01-10: <youpi> bwaarf, libcilkrts in gcc-4.9 @@ -612,42 +763,22 @@ Last reviewed up to the [[Git mirror's 3a930d3fc68785662f5f3f4af02474cb21a62056 <http://news.gmane.org/find-root.php?message_id=%3C87wqjjo5kx.fsf%40kepler.schwinge.homeip.net%3E> resolved, actually. - [[!debbug 734973]]. - - * `WCONTINUED` - - IRC, OFTC, #debian-hurd, 2014-02-25: - - <gnu_srs> youpi: some gcc-4.9 packages (and source) are needed for - gnat-4.9 to build: Is it OK to propose this patch: - http://paste.debian.net/84079/ - --- a/src/gcc/lto_lto.c.orig 2014-02-14 19:22:14.000000000 +0100 - +++ b/src/gcc/lto/lto.c 2014-02-25 20:50:20.000000000 +0100 - @@ -2476,7 +2476,11 @@ - int status; - do - { - +#ifdef __GNU__ - + int w = waitpid(0, &status, WUNTRACED); - +#else - int w = waitpid(0, &status, WUNTRACED | WCONTINUED); - +#endif - if (w == -1) - fatal_error ("waitpid failed"); - <youpi> gnu_srs: rather ifndef WCONTINUED + [[!debbug 734973]]. gcc-4.9/debian/patches/libcilkrts-targets.diff + * Debian GCC 48594516135e34a726cafe3863a4dc661bbd61a4 `boehm-gc: use + anonymous mmap instead of brk also on hurd-*.`. [[!debbug 753791]]. # Build Here's a log of a GCC build run; this is from our [[Git repository's -2a3496bebfe9d89f11d0b7a591afac55e11d5263 (2013-06-06; -3a930d3fc68785662f5f3f4af02474cb21a62056 (2013-06-06)) +91049a6f433bd5b425144d2c71245df9ec99aa8f (2015-01-20; +c16b7ed55398d2ea55d9ab35519f20cc053b9d0a (2015-01-19)) sources|source_repositories/gcc]], run on kepler.SCHWINGE and laplace.SCHWINGE. $ export LC_ALL=C $ (cd ../master/ && contrib/gcc_update --touch) - $ ../master/configure --prefix="$PWD".install SHELL=/bin/dash CC=gcc-4.6 CXX=g++-4.6 --enable-languages=all,ada 2>&1 | tee log_build + $ ../master/configure --prefix="$PWD".install SHELL=/bin/dash CC=gcc-4.9 CXX=g++-4.9 --enable-languages=all,ada 2>&1 | tee log_build [...] $ make 2>&1 | tee log_build_ [...] @@ -655,11 +786,8 @@ sources|source_repositories/gcc]], run on kepler.SCHWINGE and laplace.SCHWINGE. Different hosts may default to different shells and compiler versions; thus harmonized. -We're stuck with GCC 4.6 until there are Debian -*gnat-4.7*/*gnat-4.8*/*gnat-4.9* packages avaible. (Which there now are.) - -This takes up around 3.5 GiB, and runs for [[3 h 22 min|performance#measure]] -on kepler.SCHWINGE and [[3 h 44 min|performance#measure]] on laplace.SCHWINGE. +This takes up around 4.8 GiB, and runs for [[5 h 57 min|performance#measure]] +on kepler.SCHWINGE and [[4 h 17 min|performance#measure]] on laplace.SCHWINGE. <!-- @@ -691,6 +819,8 @@ on kepler.SCHWINGE and [[3 h 44 min|performance#measure]] on laplace.SCHWINGE. Comes from `gcc/config.gcc`: `i386/t-pmm_malloc` vs. `i386/t-gmm_malloc` for `i[34567]86-*-linux*` vs. `i[34567]86-*-*`. + 2004-08-03, PR target/16570, id:20040802163509.GA18487@lucon.org + * `libgomp` * `libgomp/config/linux`, `libgomp/config/linux/x86` @@ -812,8 +942,8 @@ on kepler.SCHWINGE and [[3 h 44 min|performance#measure]] on laplace.SCHWINGE. $ make install 2>&1 | tee log_install [...] -This takes up around 1.1 GiB, and runs for [[3 min|performance#measure]] on -kepler.SCHWINGE and [[12 min|performance#measure]] on laplace.SCHWINGE. +This takes up around 1.4 GiB, and runs for [[4 min|performance#measure]] on +kepler.SCHWINGE and [[8 min|performance#measure]] on laplace.SCHWINGE. ## Analysis @@ -838,8 +968,8 @@ kepler.SCHWINGE and [[12 min|performance#measure]] on laplace.SCHWINGE. $ make -k check 2>&1 | tee log_test [...] -This runs for [[7 h 35 min|performance#measure]] on kepler.SCHWINGE and [[15 h -46 min|performance#measure]] on laplace.SCHWINGE. +This runs for [[11 h 37 min|performance#measure]] on kepler.SCHWINGE and [[11 h +18 min|performance#measure]] on laplace.SCHWINGE. ## Analysis @@ -990,90 +1120,6 @@ This runs for [[7 h 35 min|performance#measure]] on kepler.SCHWINGE and [[15 h TODO. - * `[ARCH]/libmudflap` - - spawn [open ...] - FAIL: libmudflap.cth/pass37-frag.c (-O0) execution test - FAIL: libmudflap.cth/pass37-frag.c (-O0) output pattern test - - FAIL: libmudflap.cth/pass37-frag.c (-O0) (rerun 1) execution test - FAIL: libmudflap.cth/pass37-frag.c (-O0) (rerun 1) output pattern test - [...] - - TODO. Seems like not just timeouts (though, reported before: [[!GCC_PR - 20003]]). If GDB is to believed, it seems like confusion between - libmudflap and glibc startup (while setting up the signal thread?): - - #0 getenv (name=0x12dabee "LANGUAGE") at getenv.c:81 - #1 0x011b2c78 in guess_category_value (categoryname=<optimized out>, category=<optimized out>) at dcigettext.c:1359 - #2 __dcigettext (domainname=0x12dab1b <_libc_intl_domainname> "libc", msgid1=0x12e1cd8 "Error in unknown error system: ", msgid2=0x0, plural=0, n=0, category=5) at dcigettext.c:575 - #3 0x011b1c53 in __dcgettext (domainname=0x12dab1b <_libc_intl_domainname> "libc", msgid=0x12e1cd8 "Error in unknown error system: ", category=5) at dcgettext.c:53 - #4 0x01203728 in __strerror_r (errnum=-1, buf=0x15ff648 "", buflen=1024) at ../sysdeps/mach/_strerror.c:57 - #5 0x011b0f30 in __assert_perror_fail (errnum=-1, file=0x1133969 "./pthread/cthreads-compat.c", line=45, function=0x1133985 <__PRETTY_FUNCTION__.5356> "cthread_fork") at assert-perr.c:62 - #6 0x011324d4 in cthread_fork (func=0x118b0b0 <_hurd_msgport_receive>, arg=0x0) at ./pthread/cthreads-compat.c:45 - #7 0x01192a96 in _hurdsig_init (intarray=0x102a000, intarraysize=5) at hurdsig.c:1499 - #8 0x0117b9f8 in _hurd_new_proc_init (argv=0x15ffb88, intarray=0x102a000, intarraysize=5) at hurdinit.c:138 - #9 0x0117bfef in _hurd_init (flags=8, argv=0x15ffb88, portarray=0x1029000, portarraysize=6, intarray=0x102a000, intarraysize=5) at hurdinit.c:94 - #10 0x011a47c4 in init1 (argc=1, arg0=0x1025000 "/media/erich/home/thomas/tmp/gcc/hurd/master.build/i686-unknown-gnu0.3/libmudflap/testsuite/pass37-frag.exe") at ../sysdeps/mach/hurd/i386/init-first.c:136 - #11 0x00001ec6 in _dl_start_user () from /lib/ld.so - - pthread/cthreads-compat.c: - - 38 cthread_t - 39 cthread_fork (cthread_fn_t func, void *arg) - 40 { - 41 pthread_t thread; - 42 int err; - 43 - 44 err = pthread_create (&thread, NULL, func, arg); - 45 assert_perror (err); - - Breakpoint 2, cthread_fork (func=0x118b0b0 <_hurd_msgport_receive>, arg=0x0) at ./pthread/cthreads-compat.c:44 - 44 err = pthread_create (&thread, NULL, func, arg); - (gdb) info threads - Id Target Id Frame - * 4 Thread 17597.16 cthread_fork (func=0x118b0b0 <_hurd_msgport_receive>, arg=0x0) at ./pthread/cthreads-compat.c:44 - (gdb) s - 40 { - (gdb) - 44 err = pthread_create (&thread, NULL, func, arg); - (gdb) - - Breakpoint 1, pthread_create (thr=0x15ffa70, attr=0x0, start=0x118b0b0 <_hurd_msgport_receive>, arg=0x0) at ../../../master/libmudflap/mf-hooks3.c:272 - 272 { - (gdb) s - 275 TRACE ("pthread_create\n"); - (gdb) - 278 si = CALL_REAL (malloc, sizeof (*si)); - (gdb) n - 279 si->user_fn = start; - (gdb) - 283 return CALL_REAL (pthread_create, thr, attr, __mf_pthread_spawner, si); - (gdb) s - 279 si->user_fn = start; - (gdb) - 280 si->user_arg = arg; - (gdb) - 283 return CALL_REAL (pthread_create, thr, attr, __mf_pthread_spawner, si); - (gdb) - 280 si->user_arg = arg; - (gdb) - 283 return CALL_REAL (pthread_create, thr, attr, __mf_pthread_spawner, si); - (gdb) - __mf_0fn_pthread_create (thr=thr@entry=0x15ffa70, attr=attr@entry=0x0, start=start@entry=0x1041070 <__mf_pthread_spawner>, arg=arg@entry=0x108e520 <__mf_0fn_bufs+12288>) at ../../../master/libmudflap/mf-hooks3.c:265 - 265 } - (gdb) s - pthread_create (thr=0x15ffa70, attr=0x0, start=0x118b0b0 <_hurd_msgport_receive>, arg=0x0) at ../../../master/libmudflap/mf-hooks3.c:284 - 284 } - (gdb) s - cthread_fork (func=0x118b0b0 <_hurd_msgport_receive>, arg=0x0) at ./pthread/cthreads-compat.c:45 - 45 assert_perror (err); - (gdb) s - __assert_perror_fail (errnum=-1, file=0x1133969 "./pthread/cthreads-compat.c", line=45, function=0x1133985 <__PRETTY_FUNCTION__.5356> "cthread_fork") at assert-perr.c:55 - - Is this `libmudflap/mf-hooks3.c:__mf_0fn_pthread_create`, *a special - bootstrap variant*, that indeed just returns `-1`? - * `[ARCH]/libstdc++-v3` FAIL: libstdc++-abi/abi_check @@ -1188,15 +1234,24 @@ This runs for [[7 h 35 min|performance#measure]] on kepler.SCHWINGE and [[15 h GCC DejaGnu's `remote.exp:remote_wait` to get rid of (that is, ignore) its `timeout` parameter which, in DejaGnu code, is often invoked with a hard-coded value (that we may want to override) (or is that what - `gcc/testsuite/lib/timeout.exp:standard_wait` is for?). While at it, - `libmudflap/testsuite/libmudflap.c++/ctors.exp` and - `libmudflap/testsuite/libmudflap.c/externs.exp` use hard-coded timeout - values in `remote_wait` calls (also, why don't these use the usual way of - running tests?). + `gcc/testsuite/lib/timeout.exp:standard_wait` is for?). * What is `gcc/testsuite/gcc.test-framework/test-framework.exp` and should we define `CHECK_TEST_FRAMEWORK` to run these tests? + * `gcc.c-torture/compile/pr44686.c`, `gcc.dg/20050309-1.c`, + `gcc.dg/20050330-2.c`, `gcc.dg/20051201-1.c`, `gcc.dg/aru-2.c`, + `gcc.dg/pr44674.c`, `gcc.dg/pr46255.c`, `gcc.dg/pr47793.c`, + `gcc.dg/pr58432.c`, `gcc.dg/profile-*.c`, `gcc.dg/gomp/pr27573.c`, + `gcc.dg/tree-prof/*.c`, `gcc.misc-tests/bprob-*.c`, `g++.dg/bprob/*.C`, + `g++.dg/debug/pr46338.C`, `g++.dg/other/pr55650.C`, + `g++.dg/other/profile1.C`, `g++.dg/torture/pr39732.C`, + `g++.dg/torture/pr40642.C`, `g++.dg/torture/pr53321.C`, + `g++.dg/tree-prof/*.C`, `g++.old-deja/g++.law/profile1.C`, + `gfortran.dg/gomp/pr27573.f90` + + Profiling tests no longer being run. The very most of them used to PASS. + ## Enhancements |