diff mbox

fbdev: work around old compiler bug

Message ID 20090622180420.2e0424e4.sfr@canb.auug.org.au (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Stephen Rothwell June 22, 2009, 8:04 a.m. UTC
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.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 scripts/pnmtologo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Stephen Rothwell June 22, 2009, 8:34 a.m. UTC | #1
On Mon, 22 Jun 2009 18:04:20 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> When building with a 4.1.x compiler on powerpc64 (at least) we get
> this error:

Ignore this, it causes more problems:

drivers/video/logo/logo_linux_clut224.c:548: error: logo_linux_clut224_clut causes a section type conflict

I'll work on a better solution.
Sam Ravnborg June 22, 2009, 9:41 a.m. UTC | #2
On Mon, Jun 22, 2009 at 06:34:15PM +1000, Stephen Rothwell wrote:
> On Mon, 22 Jun 2009 18:04:20 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > When building with a 4.1.x compiler on powerpc64 (at least) we get
> > this error:
> 
> Ignore this, it causes more problems:
> 
> drivers/video/logo/logo_linux_clut224.c:548: error: logo_linux_clut224_clut causes a section type conflict
> 
> I'll work on a better solution.

I have no time to experiemnt atm.
But I have seen this before.
It happens when we mix up const and non-const stuff.

I would assume the simple solution is to replace _initconst with _initdata
for all users.
If you get it to work with powerpc then it works for everyone (or so it is usually).

	Sam
diff mbox

Patch

diff --git a/scripts/pnmtologo.c b/scripts/pnmtologo.c
index 64f5ddb..d10c389 100644
--- a/scripts/pnmtologo.c
+++ b/scripts/pnmtologo.c
@@ -237,7 +237,7 @@  static void write_header(void)
     fprintf(out, " *  Linux logo %s\n", logoname);
     fputs(" */\n\n", out);
     fputs("#include <linux/linux_logo.h>\n\n", out);
-    fprintf(out, "static const unsigned char %s_data[] __initconst = {\n",
+    fprintf(out, "static unsigned char %s_data[] __initdata = {\n",
 	    logoname);
 }