* Re: sh64 build error - sh, kbuild or binutils problem?
@ 2008-07-03 1:45 Yoshinori Sato
2008-07-03 10:03 ` Paul Mundt
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Yoshinori Sato @ 2008-07-03 1:45 UTC (permalink / raw)
To: linux-sh
At Sun, 1 Jun 2008 14:30:47 +0900,
Paul Mundt wrote:
>
> On Sat, May 31, 2008 at 11:22:39PM +0300, Adrian Bunk wrote:
> > Minimal example demonstrating the problem:
> >
> > $ sh64-linux-ar rcs tmp.o
> > $ sh64-linux-ld -EL -r -o tmp2.o tmp.o
> > $ sh64-linux-ld -EL -r -o out.o tmp2.o
> > sh64-linux-ld: sh3 architecture of input file `tmp2.o' is incompatible with sh5 output
> > $
> >
> Yes, it's a binutils bug. I've hit this on SH-2A zImage builds too, and
> hacked together a patch for it. I'll see about fixing it up fo sh64 too
> and then posting it to the list.
I think ld is strict machine type check.
This is workaround.
SH-2A build success.
diff -uN ../org/arch/sh/boot/compressed/Makefile_32 arch/sh/boot/compressed/Makefile_32
--- org/arch/sh/boot/compressed/Makefile_32 2008-07-01 00:34:41.000000000 -0400
+++ arch/sh/boot/compressed/Makefile_32 2008-07-02 21:21:57.000000000 -0400
@@ -35,8 +35,7 @@
$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
$(call if_changed,gzip)
-LDFLAGS_piggy.o := -r --format binary --oformat elf32-sh-linux -T
OBJCOPYFLAGS += -R .empty_zero_page
-$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
- $(call if_changed,ld)
+$(obj)/piggy.o: $(obj)/piggy.S $(obj)/vmlinux.bin.gz FORCE
+ $(call if_changed,as_o_S)
diff -uN ../org/arch/sh/boot/compressed/piggy.S arch/sh/boot/compressed/piggy.S
--- ../org/arch/sh/boot/compressed/piggy.S 1969-12-31 19:00:00.000000000 -0500
+++ arch/sh/boot/compressed/piggy.S 2008-07-02 21:15:05.000000000 -0400
@@ -0,0 +1,8 @@
+ .global input_len, input_data
+ .data
+input_len:
+ .long input_data_end - input_data
+input_data:
+ .incbin "arch/sh/boot/compressed/vmlinux.bin.gz"
+input_data_end:
+ .end
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
Yoshinori Sato
<ysato@users.sourceforge.jp>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: sh64 build error - sh, kbuild or binutils problem?
2008-07-03 1:45 sh64 build error - sh, kbuild or binutils problem? Yoshinori Sato
@ 2008-07-03 10:03 ` Paul Mundt
2008-07-04 0:24 ` Yoshinori Sato
2008-07-04 3:55 ` Paul Mundt
2 siblings, 0 replies; 7+ messages in thread
From: Paul Mundt @ 2008-07-03 10:03 UTC (permalink / raw)
To: linux-sh
On Wed, Jul 02, 2008 at 09:45:27PM -0400, Yoshinori Sato wrote:
> At Sun, 1 Jun 2008 14:30:47 +0900,
> Paul Mundt wrote:
> >
> > On Sat, May 31, 2008 at 11:22:39PM +0300, Adrian Bunk wrote:
> > > Minimal example demonstrating the problem:
> > >
> > > $ sh64-linux-ar rcs tmp.o
> > > $ sh64-linux-ld -EL -r -o tmp2.o tmp.o
> > > $ sh64-linux-ld -EL -r -o out.o tmp2.o
> > > sh64-linux-ld: sh3 architecture of input file `tmp2.o' is incompatible with sh5 output
> > > $
> > >
> > Yes, it's a binutils bug. I've hit this on SH-2A zImage builds too, and
> > hacked together a patch for it. I'll see about fixing it up fo sh64 too
> > and then posting it to the list.
>
> I think ld is strict machine type check.
>
> This is workaround.
> SH-2A build success.
>
This is probably a reasonable workaround until fixed versions of binutils
are more readily available. Please re-send this with a Signed-off-by and
I'll add it to my queue.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: sh64 build error - sh, kbuild or binutils problem?
2008-07-03 1:45 sh64 build error - sh, kbuild or binutils problem? Yoshinori Sato
2008-07-03 10:03 ` Paul Mundt
@ 2008-07-04 0:24 ` Yoshinori Sato
2008-07-04 3:55 ` Paul Mundt
2 siblings, 0 replies; 7+ messages in thread
From: Yoshinori Sato @ 2008-07-04 0:24 UTC (permalink / raw)
To: linux-sh
At Thu, 3 Jul 2008 19:03:23 +0900,
Paul Mundt wrote:
>
> On Wed, Jul 02, 2008 at 09:45:27PM -0400, Yoshinori Sato wrote:
> > At Sun, 1 Jun 2008 14:30:47 +0900,
> > Paul Mundt wrote:
> > >
> > > On Sat, May 31, 2008 at 11:22:39PM +0300, Adrian Bunk wrote:
> > > > Minimal example demonstrating the problem:
> > > >
> > > > $ sh64-linux-ar rcs tmp.o
> > > > $ sh64-linux-ld -EL -r -o tmp2.o tmp.o
> > > > $ sh64-linux-ld -EL -r -o out.o tmp2.o
> > > > sh64-linux-ld: sh3 architecture of input file `tmp2.o' is incompatible with sh5 output
> > > > $
> > > >
> > > Yes, it's a binutils bug. I've hit this on SH-2A zImage builds too, and
> > > hacked together a patch for it. I'll see about fixing it up fo sh64 too
> > > and then posting it to the list.
> >
> > I think ld is strict machine type check.
> >
> > This is workaround.
> > SH-2A build success.
> >
> This is probably a reasonable workaround until fixed versions of binutils
> are more readily available. Please re-send this with a Signed-off-by and
> I'll add it to my queue.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
diff --git a/arch/sh/boot/compressed/Makefile_32 b/arch/sh/boot/compressed/Makefile_32
index c0d25fb..47685f6 100644
--- a/arch/sh/boot/compressed/Makefile_32
+++ b/arch/sh/boot/compressed/Makefile_32
@@ -35,8 +35,7 @@ $(obj)/vmlinux.bin: vmlinux FORCE
$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
$(call if_changed,gzip)
-LDFLAGS_piggy.o := -r --format binary --oformat elf32-sh-linux -T
OBJCOPYFLAGS += -R .empty_zero_page
-$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
- $(call if_changed,ld)
+$(obj)/piggy.o: $(obj)/piggy.S $(obj)/vmlinux.bin.gz FORCE
+ $(call if_changed,as_o_S)
diff --git a/arch/sh/boot/compressed/Makefile_64 b/arch/sh/boot/compressed/Makefile_64
index 912f3e2..658d4f9 100644
--- a/arch/sh/boot/compressed/Makefile_64
+++ b/arch/sh/boot/compressed/Makefile_64
@@ -37,8 +37,7 @@ $(obj)/vmlinux.bin: vmlinux FORCE
$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
$(call if_changed,gzip)
-LDFLAGS_piggy.o := -r --format binary --oformat elf32-sh64-linux -T
OBJCOPYFLAGS += -R .empty_zero_page
-$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
- $(call if_changed,ld)
+$(obj)/piggy.o: $(obj)/piggy.S $(obj)/vmlinux.bin.gz FORCE
+ $(call if_changed,as_o_S)
diff --git a/arch/sh/boot/compressed/piggy.S b/arch/sh/boot/compressed/piggy.S
new file mode 100644
index 0000000..5660719
--- /dev/null
+++ b/arch/sh/boot/compressed/piggy.S
@@ -0,0 +1,8 @@
+ .global input_len, input_data
+ .data
+input_len:
+ .long input_data_end - input_data
+input_data:
+ .incbin "arch/sh/boot/compressed/vmlinux.bin.gz"
+input_data_end:
+ .end
diff --git a/arch/sh/boot/compressed/vmlinux.scr b/arch/sh/boot/compressed/vmlinux.scr
deleted file mode 100644
index 1ed9d79..0000000
--- a/arch/sh/boot/compressed/vmlinux.scr
+++ /dev/null
@@ -1,9 +0,0 @@
-SECTIONS
-{
- .data : {
- input_len = .;
- LONG(input_data_end - input_data) input_data = .;
- *(.data)
- input_data_end = .;
- }
-}
--
Yoshinori Sato
<ysato@users.sourceforge.jp>
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: sh64 build error - sh, kbuild or binutils problem?
2008-07-03 1:45 sh64 build error - sh, kbuild or binutils problem? Yoshinori Sato
2008-07-03 10:03 ` Paul Mundt
2008-07-04 0:24 ` Yoshinori Sato
@ 2008-07-04 3:55 ` Paul Mundt
2 siblings, 0 replies; 7+ messages in thread
From: Paul Mundt @ 2008-07-04 3:55 UTC (permalink / raw)
To: linux-sh
On Thu, Jul 03, 2008 at 08:24:52PM -0400, Yoshinori Sato wrote:
> At Thu, 3 Jul 2008 19:03:23 +0900,
> Paul Mundt wrote:
> >
> > On Wed, Jul 02, 2008 at 09:45:27PM -0400, Yoshinori Sato wrote:
> > > At Sun, 1 Jun 2008 14:30:47 +0900,
> > > Paul Mundt wrote:
> > > >
> > > > On Sat, May 31, 2008 at 11:22:39PM +0300, Adrian Bunk wrote:
> > > > > Minimal example demonstrating the problem:
> > > > >
> > > > > $ sh64-linux-ar rcs tmp.o
> > > > > $ sh64-linux-ld -EL -r -o tmp2.o tmp.o
> > > > > $ sh64-linux-ld -EL -r -o out.o tmp2.o
> > > > > sh64-linux-ld: sh3 architecture of input file `tmp2.o' is incompatible with sh5 output
> > > > > $
> > > > >
> > > > Yes, it's a binutils bug. I've hit this on SH-2A zImage builds too, and
> > > > hacked together a patch for it. I'll see about fixing it up fo sh64 too
> > > > and then posting it to the list.
> > >
> > > I think ld is strict machine type check.
> > >
> > > This is workaround.
> > > SH-2A build success.
> > >
> > This is probably a reasonable workaround until fixed versions of binutils
> > are more readily available. Please re-send this with a Signed-off-by and
> > I'll add it to my queue.
>
> Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
>
Applied, thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* sh64 build error - sh, kbuild or binutils problem?
@ 2008-05-31 20:22 Adrian Bunk
2008-06-01 5:30 ` Paul Mundt
0 siblings, 1 reply; 7+ messages in thread
From: Adrian Bunk @ 2008-05-31 20:22 UTC (permalink / raw)
To: sam, hjl.tools, lethal; +Cc: linux-kbuild, linux-sh, linux-kernel
cayman_defconfig fails to build with the following error
(using binutils 2.18.50.0.7):
<-- snip -->
...
LD drivers/macintosh/built-in.o
LD drivers/media/common/tuners/built-in.o
CC [M] drivers/media/common/tuners/tuner-xc2028.o
CC [M] drivers/media/common/tuners/tuner-simple.o
CC [M] drivers/media/common/tuners/tuner-types.o
CC [M] drivers/media/common/tuners/mt20xx.o
CC [M] drivers/media/common/tuners/tda8290.o
CC [M] drivers/media/common/tuners/tea5767.o
CC [M] drivers/media/common/tuners/tea5761.o
CC [M] drivers/media/common/tuners/tda9887.o
CC [M] drivers/media/common/tuners/xc5000.o
LD drivers/media/common/built-in.o
...
LD drivers/media/built-in.o
sh64-linux-ld: sh3 architecture of input file `drivers/media/common/built-in.o' is incompatible with sh5 outputmake[3]: *** [drivers/media/built-in.o] Error 1
<-- snip -->
Minimal example demonstrating the problem:
$ sh64-linux-ar rcs tmp.o
$ sh64-linux-ld -EL -r -o tmp2.o tmp.o
$ sh64-linux-ld -EL -r -o out.o tmp2.o
sh64-linux-ld: sh3 architecture of input file `tmp2.o' is incompatible with sh5 output
$
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: sh64 build error - sh, kbuild or binutils problem?
2008-05-31 20:22 Adrian Bunk
@ 2008-06-01 5:30 ` Paul Mundt
2008-06-01 19:53 ` Adrian Bunk
0 siblings, 1 reply; 7+ messages in thread
From: Paul Mundt @ 2008-06-01 5:30 UTC (permalink / raw)
To: Adrian Bunk; +Cc: sam, hjl.tools, linux-kbuild, linux-sh, linux-kernel
On Sat, May 31, 2008 at 11:22:39PM +0300, Adrian Bunk wrote:
> Minimal example demonstrating the problem:
>
> $ sh64-linux-ar rcs tmp.o
> $ sh64-linux-ld -EL -r -o tmp2.o tmp.o
> $ sh64-linux-ld -EL -r -o out.o tmp2.o
> sh64-linux-ld: sh3 architecture of input file `tmp2.o' is incompatible with sh5 output
> $
>
Yes, it's a binutils bug. I've hit this on SH-2A zImage builds too, and
hacked together a patch for it. I'll see about fixing it up fo sh64 too
and then posting it to the list.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: sh64 build error - sh, kbuild or binutils problem?
2008-06-01 5:30 ` Paul Mundt
@ 2008-06-01 19:53 ` Adrian Bunk
0 siblings, 0 replies; 7+ messages in thread
From: Adrian Bunk @ 2008-06-01 19:53 UTC (permalink / raw)
To: Paul Mundt, sam, hjl.tools, linux-kbuild, linux-sh, linux-kernel
On Sun, Jun 01, 2008 at 02:30:47PM +0900, Paul Mundt wrote:
> On Sat, May 31, 2008 at 11:22:39PM +0300, Adrian Bunk wrote:
> > Minimal example demonstrating the problem:
> >
> > $ sh64-linux-ar rcs tmp.o
> > $ sh64-linux-ld -EL -r -o tmp2.o tmp.o
> > $ sh64-linux-ld -EL -r -o out.o tmp2.o
> > sh64-linux-ld: sh3 architecture of input file `tmp2.o' is incompatible with sh5 output
> > $
> >
> Yes, it's a binutils bug. I've hit this on SH-2A zImage builds too, and
> hacked together a patch for it. I'll see about fixing it up fo sh64 too
> and then posting it to the list.
Thanks :-)
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-07-04 3:55 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-03 1:45 sh64 build error - sh, kbuild or binutils problem? Yoshinori Sato
2008-07-03 10:03 ` Paul Mundt
2008-07-04 0:24 ` Yoshinori Sato
2008-07-04 3:55 ` Paul Mundt
-- strict thread matches above, loose matches on Subject: below --
2008-05-31 20:22 Adrian Bunk
2008-06-01 5:30 ` Paul Mundt
2008-06-01 19:53 ` Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox