diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2009-06-30 14:41:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-30 21:55:59 -0400 |
commit | 15e3252464432a29c5461325cb5243471bd2a219 (patch) | |
tree | f5ea5e9a4d58fd8ac1c7e0d5f73a0c7979ab3eb2 /scripts | |
parent | c15e504bd008aedfcd2219051055b66bffdb6148 (diff) |
fbdev: work around old compiler bug
When building with a 4.1.x compiler on powerpc64 (at least) we get this
error:
drivers/video/logo/logo_linux_mono.c:81: error: logo_linux_mono causes a section type conflict
This was introduced by commit ae52bb2384f721562f15f719de1acb8e934733cb
("fbdev: move logo externs to header file"). This is a partial revert of
that commit sufficient to not hit the compiler bug.
Also convert _clut arrays from __initconst to __initdata.
Sam said:
Al analysed this some time ago. When we say something is const then
_sometimes_ gcc annotate the section as const(?) - sometimes not. So if
we have two variables/functions annotated __*const and gcc decides to
annotate the section const only in one case we get a section type
conflict.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/pnmtologo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/pnmtologo.c b/scripts/pnmtologo.c index 64f5ddb09ea6..5c113123ed9f 100644 --- a/scripts/pnmtologo.c +++ b/scripts/pnmtologo.c | |||
@@ -237,7 +237,7 @@ static void write_header(void) | |||
237 | fprintf(out, " * Linux logo %s\n", logoname); | 237 | fprintf(out, " * Linux logo %s\n", logoname); |
238 | fputs(" */\n\n", out); | 238 | fputs(" */\n\n", out); |
239 | fputs("#include <linux/linux_logo.h>\n\n", out); | 239 | fputs("#include <linux/linux_logo.h>\n\n", out); |
240 | fprintf(out, "static const unsigned char %s_data[] __initconst = {\n", | 240 | fprintf(out, "static unsigned char %s_data[] __initdata = {\n", |
241 | logoname); | 241 | logoname); |
242 | } | 242 | } |
243 | 243 | ||
@@ -374,7 +374,7 @@ static void write_logo_clut224(void) | |||
374 | fputs("\n};\n\n", out); | 374 | fputs("\n};\n\n", out); |
375 | 375 | ||
376 | /* write logo clut */ | 376 | /* write logo clut */ |
377 | fprintf(out, "static const unsigned char %s_clut[] __initconst = {\n", | 377 | fprintf(out, "static unsigned char %s_clut[] __initdata = {\n", |
378 | logoname); | 378 | logoname); |
379 | write_hex_cnt = 0; | 379 | write_hex_cnt = 0; |
380 | for (i = 0; i < logo_clutsize; i++) { | 380 | for (i = 0; i < logo_clutsize; i++) { |