Gentoo Archives: gentoo-commits

From: "Sergei Trofimovich (slyfox)" <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-lang/ghc/files: ghc-7.8.1_rc1-libbfd.patch ghc-7.8.2-ia64-no-shared.patch ghc-7.8.2-cgen-constify.patch
Date: Thu, 10 Jul 2014 19:31:45
Message-Id: 20140710193141.E43CD2004E@flycatcher.gentoo.org
1 slyfox 14/07/10 19:31:41
2
3 Added: ghc-7.8.1_rc1-libbfd.patch
4 ghc-7.8.2-ia64-no-shared.patch
5 ghc-7.8.2-cgen-constify.patch
6 Log:
7 Version bump.
8
9 (Portage version: 2.2.10_p15/cvs/Linux x86_64, signed Manifest commit with key 611FF3AA)
10
11 Revision Changes Path
12 1.1 dev-lang/ghc/files/ghc-7.8.1_rc1-libbfd.patch
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ghc/files/ghc-7.8.1_rc1-libbfd.patch?rev=1.1&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ghc/files/ghc-7.8.1_rc1-libbfd.patch?rev=1.1&content-type=text/plain
16
17 Index: ghc-7.8.1_rc1-libbfd.patch
18 ===================================================================
19 commit bb5953484579968c984d074ca1af5d21e1c9e7a0
20 Author: Sergei Trofimovich <slyfox@g.o>
21 Date: Mon Feb 10 12:45:58 2014 +0300
22
23 rts: unrust 'libbfd' debug symbols parser
24
25 Signed-off-by: Sergei Trofimovich <slyfox@g.o>
26
27 diff --git a/configure.ac b/configure.ac
28 index e7fbc7f..e47979c 100644
29 --- a/configure.ac
30 +++ b/configure.ac
31 @@ -801,7 +801,8 @@ fi
32 dnl ** check whether this machine has BFD and libiberty installed (used for debugging)
33 dnl the order of these tests matters: bfd needs libiberty
34 AC_CHECK_LIB(iberty, xmalloc)
35 -AC_CHECK_LIB(bfd, bfd_uncompress_section_contents)
36 +dnl 'bfd_init' is a rare non-macro in libbfd
37 +AC_CHECK_LIB(bfd, bfd_init)
38
39 dnl ################################################################
40 dnl Check for libraries
41 diff --git a/rts/Printer.c b/rts/Printer.c
42 index ca9ca49..ce02b02 100644
43 --- a/rts/Printer.c
44 +++ b/rts/Printer.c
45 @@ -48,6 +48,9 @@ void printPtr( StgPtr p )
46 raw = lookupGHCName(p);
47 if (raw != NULL) {
48 printZcoded(raw);
49 + /* it can be just a C symbol, like 'stg_returnToStackTop' */
50 + debugBelch("<%s>", raw);
51 + debugBelch("[%p]", p);
52 } else {
53 debugBelch("%p", p);
54 }
55 @@ -794,7 +797,7 @@ static void printZcoded( const char *raw )
56 disabling this for now.
57 */
58 #ifdef USING_LIBBFD
59 -
60 +#include "../mk/config.h" /* silly BFD's requirement */
61 #include <bfd.h>
62
63 /* Fairly ad-hoc piece of code that seems to filter out a lot of
64 @@ -863,7 +866,10 @@ extern void DEBUG_LoadSymbols( char *name )
65 for( i = 0; i != number_of_symbols; ++i ) {
66 symbol_info info;
67 bfd_get_symbol_info(abfd,symbol_table[i],&info);
68 - /*debugBelch("\t%c\t0x%x \t%s\n",info.type,(nat)info.value,info.name); */
69 + if (0)
70 + {
71 + debugBelch("\t%c\t0x%x \t%s\n",info.type,(nat)info.value,info.name);
72 + }
73 if (isReal(info.type, info.name)) {
74 num_real_syms += 1;
75 }
76 diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c
77 index aa7306f..5bdef94 100644
78 --- a/rts/RtsStartup.c
79 +++ b/rts/RtsStartup.c
80 @@ -19,6 +19,7 @@
81 #include "RtsFlags.h"
82 #include "RtsUtils.h"
83 #include "Prelude.h"
84 +#include "Printer.h" /* DEBUG_LoadSymbols */
85 #include "Schedule.h" /* initScheduler */
86 #include "Stats.h" /* initStats */
87 #include "STM.h" /* initSTM */
88 @@ -162,6 +163,11 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config)
89 rts_config.rts_opts_enabled, rts_config.rts_opts, rts_config.rts_hs_main);
90 }
91
92 +#ifdef DEBUG
93 + /* load debugging symbols */
94 + DEBUG_LoadSymbols((*argv)[0]);
95 +#endif /* DEBUG */
96 +
97 /* Initialise the stats department, phase 1 */
98 initStats1();
99
100
101
102
103 1.1 dev-lang/ghc/files/ghc-7.8.2-ia64-no-shared.patch
104
105 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ghc/files/ghc-7.8.2-ia64-no-shared.patch?rev=1.1&view=markup
106 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ghc/files/ghc-7.8.2-ia64-no-shared.patch?rev=1.1&content-type=text/plain
107
108 Index: ghc-7.8.2-ia64-no-shared.patch
109 ===================================================================
110 Attempt to disable dynamic libs.
111
112 Crash in threaded runtime (and in -dynamic builds)
113 looks very similar to sparc failures.
114 diff --git a/mk/config.mk.in b/mk/config.mk.in
115 index 7cc7aec..9f21256 100644
116 --- a/mk/config.mk.in
117 +++ b/mk/config.mk.in
118 @@ -99,7 +99,8 @@ NoSharedLibsPlatformList = powerpc-unknown-linux \
119 x86_64-unknown-mingw32 \
120 i386-unknown-mingw32 \
121 sparc-sun-solaris2 \
122 - sparc-unknown-linux
123 + sparc-unknown-linux \
124 + ia64-unknown-linux
125
126 ifeq "$(SOLARIS_BROKEN_SHLD)" "YES"
127 NoSharedLibsPlatformList += i386-unknown-solaris2
128
129
130
131 1.1 dev-lang/ghc/files/ghc-7.8.2-cgen-constify.patch
132
133 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ghc/files/ghc-7.8.2-cgen-constify.patch?rev=1.1&view=markup
134 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ghc/files/ghc-7.8.2-cgen-constify.patch?rev=1.1&content-type=text/plain
135
136 Index: ghc-7.8.2-cgen-constify.patch
137 ===================================================================
138 commit b0cf3ab7a69b878a4335d21a347b56e4b0ca0b7b
139 Author: Sergei Trofimovich <slyfox@g.o>
140 Date: Mon Apr 14 19:06:24 2014 +0300
141
142 compiler/cmm/PprC.hs: constify local string literals
143
144 Consider one-line module
145 module B (v) where v = "hello"
146 in -fvia-C mode it generates code like
147 static char gibberish_str[] = "hello";
148
149 It uselessly eats data section (precious resource on ia64!).
150 The patch switches genrator to emit:
151 static const char gibberish_str[] = "hello";
152
153 Signed-off-by: Sergei Trofimovich <slyfox@g.o>
154
155 diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs
156 index 2398981..fdb578d 100644
157 --- a/compiler/cmm/PprC.hs
158 +++ b/compiler/cmm/PprC.hs
159 @@ -112,6 +112,12 @@ pprTop (CmmProc infos clbl _ graph) =
160
161 -- We only handle (a) arrays of word-sized things and (b) strings.
162
163 +pprTop (CmmData ReadOnlyData (Statics lbl [CmmString str])) =
164 + hcat [
165 + pprLocalness lbl, ptext (sLit "const char "), ppr lbl,
166 + ptext (sLit "[] = "), pprStringInCStyle str, semi
167 + ]
168 +
169 pprTop (CmmData _section (Statics lbl [CmmString str])) =
170 hcat [
171 pprLocalness lbl, ptext (sLit "char "), ppr lbl,