From 44c2ce84e01c82f1a29f610167fe793796ffd48d Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Mon, 29 Sep 2014 10:49:29 +0200 Subject: open_issues/gcc: f91948d1bd857c81bb2cea688457b84fa3ce6b84 (2014-09-26; d3faa4b6d102b09a5ea17bbf81590f215b42fbc4 (2014-09-26)), GCC 4.9. --- open_issues/gcc.mdwn | 321 ++++++++++++++++++++++------------------ open_issues/gcc/libmudflap.mdwn | 74 --------- 2 files changed, 177 insertions(+), 218 deletions(-) delete mode 100644 open_issues/gcc/libmudflap.mdwn (limited to 'open_issues') diff --git a/open_issues/gcc.mdwn b/open_issues/gcc.mdwn index 45590928..57de9a6d 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. -Last reviewed up to the [[Git mirror's 3a930d3fc68785662f5f3f4af02474cb21a62056 -(2013-06-06) sources|source_repositories/gcc]]. +Last reviewed up to the [[Git mirror's d3faa4b6d102b09a5ea17bbf81590f215b42fbc4 +(2014-09-26) sources|source_repositories/gcc]]. 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,12 +278,17 @@ 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: @@ -299,10 +305,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: Hi, I assume gcc -fsplit-stack is not yet supported? @@ -362,8 +391,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 +444,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 +625,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 + +#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 will break later #includes if this macro is not + + // already defined when it is #included. + +# define _GNU_SOURCE + +#endif + + +#if defined __linux__ + +# include + +# include + + 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 will break later #includes if this macro is not + + // already defined when it is #included. + +# define _GNU_SOURCE + +#endif + + +#ifdef __linux__ + +# include + +# include + +#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: bwaarf, libcilkrts in gcc-4.9 @@ -612,42 +761,22 @@ Last reviewed up to the [[Git mirror's 3a930d3fc68785662f5f3f4af02474cb21a62056 resolved, actually. - [[!debbug 734973]]. - - * `WCONTINUED` - - IRC, OFTC, #debian-hurd, 2014-02-25: - - 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"); - 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)) +f91948d1bd857c81bb2cea688457b84fa3ce6b84 (2014-09-26; +d3faa4b6d102b09a5ea17bbf81590f215b42fbc4 (2014-09-26)) 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 +784,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 GiB, and runs for [[4 h 48 min|performance#measure]] on +kepler.SCHWINGE and [[5 h 10 min|performance#measure]] on laplace.SCHWINGE.