* [PATCH] fbdev: work around old compiler bug
@ 2009-06-22 8:04 ` Stephen Rothwell
0 siblings, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2009-06-22 8:04 UTC (permalink / raw)
To: Linus
Cc: LKML, ppc-dev, Andrew Morton, James Simmons, Sam Ravnborg,
Krzysztof Helt, Geert Uytterhoeven
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(-)
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);
}
--
1.6.3.1
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH] fbdev: work around old compiler bug
@ 2009-06-22 8:04 ` Stephen Rothwell
0 siblings, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2009-06-22 8:04 UTC (permalink / raw)
To: Linus
Cc: James Simmons, Sam Ravnborg, LKML, Krzysztof Helt,
Geert Uytterhoeven, Andrew Morton, ppc-dev
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(-)
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);
}
--
1.6.3.1
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] fbdev: work around old compiler bug
2009-06-22 8:04 ` Stephen Rothwell
@ 2009-06-22 8:34 ` Stephen Rothwell
-1 siblings, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2009-06-22 8:34 UTC (permalink / raw)
To: Linus
Cc: LKML, ppc-dev, Andrew Morton, James Simmons, Sam Ravnborg,
Krzysztof Helt, Geert Uytterhoeven
[-- Attachment #1: Type: text/plain, Size: 464 bytes --]
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.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] fbdev: work around old compiler bug
@ 2009-06-22 8:34 ` Stephen Rothwell
0 siblings, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2009-06-22 8:34 UTC (permalink / raw)
To: Linus
Cc: James Simmons, Sam Ravnborg, LKML, Krzysztof Helt,
Geert Uytterhoeven, Andrew Morton, ppc-dev
[-- Attachment #1: Type: text/plain, Size: 464 bytes --]
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.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] fbdev: work around old compiler bug
2009-06-22 8:34 ` Stephen Rothwell
@ 2009-06-22 9:41 ` Sam Ravnborg
-1 siblings, 0 replies; 12+ messages in thread
From: Sam Ravnborg @ 2009-06-22 9:41 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Linus, LKML, ppc-dev, Andrew Morton, James Simmons,
Krzysztof Helt, Geert Uytterhoeven
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] fbdev: work around old compiler bug
@ 2009-06-22 9:41 ` Sam Ravnborg
0 siblings, 0 replies; 12+ messages in thread
From: Sam Ravnborg @ 2009-06-22 9:41 UTC (permalink / raw)
To: Stephen Rothwell
Cc: James Simmons, Linus, LKML, Krzysztof Helt, Geert Uytterhoeven,
Andrew Morton, ppc-dev
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2] fbdev: work around old compiler bug
2009-06-22 8:34 ` Stephen Rothwell
@ 2009-06-23 5:44 ` Stephen Rothwell
-1 siblings, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2009-06-23 5:44 UTC (permalink / raw)
To: Linus
Cc: LKML, ppc-dev, Andrew Morton, James Simmons, Sam Ravnborg,
Krzysztof Helt, Geert Uytterhoeven
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 | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
v2: also convert _clut arrays from __initconst to __initdata.
diff --git a/scripts/pnmtologo.c b/scripts/pnmtologo.c
index 64f5ddb..5c11312 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);
}
@@ -374,7 +374,7 @@ static void write_logo_clut224(void)
fputs("\n};\n\n", out);
/* write logo clut */
- fprintf(out, "static const unsigned char %s_clut[] __initconst = {\n",
+ fprintf(out, "static unsigned char %s_clut[] __initdata = {\n",
logoname);
write_hex_cnt = 0;
for (i = 0; i < logo_clutsize; i++) {
--
1.6.3.1
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2] fbdev: work around old compiler bug
@ 2009-06-23 5:44 ` Stephen Rothwell
0 siblings, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2009-06-23 5:44 UTC (permalink / raw)
To: Linus
Cc: James Simmons, Sam Ravnborg, LKML, Krzysztof Helt,
Geert Uytterhoeven, Andrew Morton, ppc-dev
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 | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
v2: also convert _clut arrays from __initconst to __initdata.
diff --git a/scripts/pnmtologo.c b/scripts/pnmtologo.c
index 64f5ddb..5c11312 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);
}
@@ -374,7 +374,7 @@ static void write_logo_clut224(void)
fputs("\n};\n\n", out);
/* write logo clut */
- fprintf(out, "static const unsigned char %s_clut[] __initconst = {\n",
+ fprintf(out, "static unsigned char %s_clut[] __initdata = {\n",
logoname);
write_hex_cnt = 0;
for (i = 0; i < logo_clutsize; i++) {
--
1.6.3.1
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v2] fbdev: work around old compiler bug
2009-06-23 5:44 ` Stephen Rothwell
@ 2009-06-23 16:45 ` Kyle McMartin
-1 siblings, 0 replies; 12+ messages in thread
From: Kyle McMartin @ 2009-06-23 16:45 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Linus, James Simmons, Sam Ravnborg, LKML, Krzysztof Helt,
Geert Uytterhoeven, Andrew Morton, ppc-dev
On Tue, Jun 23, 2009 at 03:44:28PM +1000, Stephen Rothwell wrote:
> 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.
>
We're seeing similar issues with 4.3 on parisc (the case I saw today was
in fs/nfs/nfsroot.c...) Any ideas on the actual culprit or is it just
gcc being unfriendly?
regards, Kyle
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] fbdev: work around old compiler bug
@ 2009-06-23 16:45 ` Kyle McMartin
0 siblings, 0 replies; 12+ messages in thread
From: Kyle McMartin @ 2009-06-23 16:45 UTC (permalink / raw)
To: Stephen Rothwell
Cc: James Simmons, Sam Ravnborg, ppc-dev, LKML, Krzysztof Helt,
Geert Uytterhoeven, Andrew Morton, Linus
On Tue, Jun 23, 2009 at 03:44:28PM +1000, Stephen Rothwell wrote:
> 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.
>
We're seeing similar issues with 4.3 on parisc (the case I saw today was
in fs/nfs/nfsroot.c...) Any ideas on the actual culprit or is it just
gcc being unfriendly?
regards, Kyle
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] fbdev: work around old compiler bug
2009-06-23 16:45 ` Kyle McMartin
@ 2009-06-23 19:23 ` Sam Ravnborg
-1 siblings, 0 replies; 12+ messages in thread
From: Sam Ravnborg @ 2009-06-23 19:23 UTC (permalink / raw)
To: Kyle McMartin
Cc: Stephen Rothwell, Linus, James Simmons, LKML, Krzysztof Helt,
Geert Uytterhoeven, Andrew Morton, ppc-dev
On Tue, Jun 23, 2009 at 12:45:05PM -0400, Kyle McMartin wrote:
> On Tue, Jun 23, 2009 at 03:44:28PM +1000, Stephen Rothwell wrote:
> > 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.
> >
>
> We're seeing similar issues with 4.3 on parisc (the case I saw today was
> in fs/nfs/nfsroot.c...) Any ideas on the actual culprit or is it just
> gcc being unfriendly?
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.
(*) it is named something else I do not recall at the moment
in linker language.
Sam
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] fbdev: work around old compiler bug
@ 2009-06-23 19:23 ` Sam Ravnborg
0 siblings, 0 replies; 12+ messages in thread
From: Sam Ravnborg @ 2009-06-23 19:23 UTC (permalink / raw)
To: Kyle McMartin
Cc: Stephen Rothwell, James Simmons, ppc-dev, LKML, Krzysztof Helt,
Geert Uytterhoeven, Andrew Morton, Linus
On Tue, Jun 23, 2009 at 12:45:05PM -0400, Kyle McMartin wrote:
> On Tue, Jun 23, 2009 at 03:44:28PM +1000, Stephen Rothwell wrote:
> > 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.
> >
>
> We're seeing similar issues with 4.3 on parisc (the case I saw today was
> in fs/nfs/nfsroot.c...) Any ideas on the actual culprit or is it just
> gcc being unfriendly?
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.
(*) it is named something else I do not recall at the moment
in linker language.
Sam
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2009-06-23 19:21 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-22 8:04 [PATCH] fbdev: work around old compiler bug Stephen Rothwell
2009-06-22 8:04 ` Stephen Rothwell
2009-06-22 8:34 ` Stephen Rothwell
2009-06-22 8:34 ` Stephen Rothwell
2009-06-22 9:41 ` Sam Ravnborg
2009-06-22 9:41 ` Sam Ravnborg
2009-06-23 5:44 ` [PATCH v2] " Stephen Rothwell
2009-06-23 5:44 ` Stephen Rothwell
2009-06-23 16:45 ` Kyle McMartin
2009-06-23 16:45 ` Kyle McMartin
2009-06-23 19:23 ` Sam Ravnborg
2009-06-23 19:23 ` Sam Ravnborg
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.