1. 15 May, 2017 6 commits
  2. 14 May, 2017 5 commits
    • Sergei Trofimovich's avatar
      rts/linker/ElfTypes.h: restore powerps (and others) support · d5414dd6
      Sergei Trofimovich authored
      GHC build fails for powerpc-unknown-linux-gnu
      and hppa-unknown-linux-gnu targets as:
        rts_dist_HC rts/dist/build/RtsStartup.o
          rts/linker/ElfTypes.h:23:4: error:
               error: #error "Unsupported arch!"
      Before the change code tried to whitelist architectures
      and classify them into ELF32/ELF64. It does not work
      for UNREG arches like 'hppa', 'sparc64', 'm68k', 'mips'.
      It is nuanced for things like mips64 and x86_64:
          'mips64-unknown-linux-gnu-gcc -mabi=64' is ELFCLASS64
          'mips64-unknown-linux-gnu-gcc'          is ELFCLASS32
          'x86_64-pc-linux-gnu-gcc'               is ELFCLASS64
          'x86_64-pc-linux-gnu-gcc -mx32'         is ELFCLASS32
      Here it's not enough to know HOST_ARCH. We really need to
      know ABI.
      The change uses '__LP64__' as a proxy for ELFCLASS64.
      Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
      Reviewers: angerman, simonmar, austin, bgamari, erikd
      Reviewed By: angerman, bgamari, erikd
      Subscribers: rwbarton, thomie
      GHC Trac Issues: #13696
      Differential Revision: https://phabricator.haskell.org/D3583
    • Sergei Trofimovich's avatar
      rts: annotate switch/case with '/* fallthrough */' · 230416f8
      Sergei Trofimovich authored
      Fixes gcc-7.1.0 warnings of form:
        rts/sm/Scav.c:559:9: error:
           error: this statement may fall through [-Werror=implicit-fallthrough=]
      Many of places are indeed unobvious and some are
      already annotated by comments.
      Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
    • Sergei Trofimovich's avatar
      ProfilerReportJson.c: fix out-of-bounds access · 20c39b77
      Sergei Trofimovich authored
      Found by gcc-7.1 which reported build error as:
      rts/ProfilerReportJson.c:23:16: error:
           error: comparison between pointer and zero
             character constant [-Werror=pointer-compare]
               for (; str != '\0' && len > 0; str++) {
      23 |     for (; str != '\0' && len > 0; str++) {
         |                ^
      Unfixed code in context:
        static void escapeString(char const* str, char *out, int len)
           len--; // reserve character in output for terminating NUL
           for (; str != '\0' && len > 0; str++) {
               char c = *str;
      The intent here is to process 'len' (if positive) or '\0'-terminator
      in 'str' but dereference was missing.
      Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
    • Ben Gamari's avatar
      Update unix submodule · 2a971e35
      Ben Gamari authored
    • Sergei Trofimovich's avatar
  3. 13 May, 2017 2 commits
  4. 12 May, 2017 10 commits
  5. 11 May, 2017 17 commits