* 440 ebony patch seems to have broken 85xx build on powerpc.git
@ 2007-05-24 17:13 Dave Jiang
2007-05-24 17:37 ` Josh Boyer
` (2 more replies)
0 siblings, 3 replies; 19+ messages in thread
From: Dave Jiang @ 2007-05-24 17:13 UTC (permalink / raw)
To: linuxppc-dev
Has anyone been able to build mpc85xx_* from the latest powerpc.git? I have
tried mpc85xx_cds and mpc8560_ads. I pulled a new git tree and attempted to
build and hit the error message below.
Also, if I comment out the two lines in arch/powerpc/boot/Makefile that was
introduced by the 440 Ebony support patch everything is fine.
$(obj)/44x.o: BOOTCFLAGS += -Wa,-mbooke
$(obj)/ebony.o: BOOTCFLAGS += -Wa,-mbooke
make -f
/home/djiang/community/git-repos/tmp/ppc-master/scripts/Makefile.modpost vmlinux
scripts/mod/modpost -o
/home/djiang/community/git-repos/tmp/ppc-master/Module.symvers
arch/powerpc/kernel/head_fsl_booke.o init/built-in.o usr/built-in.o
arch/powerpc/kernel/built-in.o arch/powerpc/mm/built-in.o
arch/powerpc/lib/built-in.o arch/powerpc/sysdev/built-in.o
arch/powerpc/platforms/built-in.o arch/powerpc/math-emu/built-in.o
kernel/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o
security/built-in.o crypto/built-in.o block/built-in.o lib/lib.a
lib/built-in.o drivers/built-in.o sound/built-in.o net/built-in.o
WARNING: arch/powerpc/mm/built-in.o(.text+0x10bc): Section mismatch: reference
to .init.text:early_get_page (between 'pte_alloc_one_kernel' and 'steal_context')
rm -f .old_version
make ARCH=ppc64 -f scripts/Makefile.build obj=arch/powerpc/boot
arch/powerpc/boot/uImage
/opt/montavista/cge/devkit/ppc/85xx/bin/ppc_85xx-gcc -m32
-Wp,-MD,arch/powerpc/boot/.ebony.o.d -Wall -Wstrict-prototypes -O2
-fomit-frame-pointer -fno-builtin -nostdinc -isystem
/opt/montavista/cge/devkit/ppc/85xx/bin/../lib/gcc/powerpc-montavista-linux-gnuspe/4.2.0/include
-fPIC -fno-stack-protector -Iarch/powerpc/boot
-I/home/djiang/community/git-repos/tmp/ppc-master/arch/powerpc/boot -Wa,-mbooke
-c -o arch/powerpc/boot/ebony.o arch/powerpc/boot/ebony.c
/home/djiang/tmp/cc2UVyci.s: Assembler messages:
/home/djiang/tmp/cc2UVyci.s:142: Error: Unrecognized opcode: `isel'
make[1]: *** [arch/powerpc/boot/ebony.o] Error 1
--
------------------------------------------------------
Dave Jiang
Software Engineer
MontaVista Software, Inc.
http://www.mvista.com
------------------------------------------------------
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 440 ebony patch seems to have broken 85xx build on powerpc.git
2007-05-24 17:13 440 ebony patch seems to have broken 85xx build on powerpc.git Dave Jiang
@ 2007-05-24 17:37 ` Josh Boyer
2007-05-24 17:43 ` Dave Jiang
2007-05-24 18:02 ` Sergei Shtylyov
2007-05-24 19:05 ` Segher Boessenkool
2 siblings, 1 reply; 19+ messages in thread
From: Josh Boyer @ 2007-05-24 17:37 UTC (permalink / raw)
To: Dave Jiang; +Cc: linuxppc-dev
On Thu, 2007-05-24 at 10:13 -0700, Dave Jiang wrote:
> Has anyone been able to build mpc85xx_* from the latest powerpc.git? I have
> tried mpc85xx_cds and mpc8560_ads. I pulled a new git tree and attempted to
> build and hit the error message below.
>
> Also, if I comment out the two lines in arch/powerpc/boot/Makefile that was
> introduced by the 440 Ebony support patch everything is fine.
>
> $(obj)/44x.o: BOOTCFLAGS += -Wa,-mbooke
> $(obj)/ebony.o: BOOTCFLAGS += -Wa,-mbooke
Without those, other toolchains will break on those files because they
don't understand mtdcr/mfdcr by default.
> make -f
> /home/djiang/community/git-repos/tmp/ppc-master/scripts/Makefile.modpost vmlinux
> scripts/mod/modpost -o
> /home/djiang/community/git-repos/tmp/ppc-master/Module.symvers
> arch/powerpc/kernel/head_fsl_booke.o init/built-in.o usr/built-in.o
> arch/powerpc/kernel/built-in.o arch/powerpc/mm/built-in.o
> arch/powerpc/lib/built-in.o arch/powerpc/sysdev/built-in.o
> arch/powerpc/platforms/built-in.o arch/powerpc/math-emu/built-in.o
> kernel/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o
> security/built-in.o crypto/built-in.o block/built-in.o lib/lib.a
> lib/built-in.o drivers/built-in.o sound/built-in.o net/built-in.o
> WARNING: arch/powerpc/mm/built-in.o(.text+0x10bc): Section mismatch: reference
> to .init.text:early_get_page (between 'pte_alloc_one_kernel' and 'steal_context')
> rm -f .old_version
> make ARCH=ppc64 -f scripts/Makefile.build obj=arch/powerpc/boot
> arch/powerpc/boot/uImage
> /opt/montavista/cge/devkit/ppc/85xx/bin/ppc_85xx-gcc -m32
> -Wp,-MD,arch/powerpc/boot/.ebony.o.d -Wall -Wstrict-prototypes -O2
> -fomit-frame-pointer -fno-builtin -nostdinc -isystem
> /opt/montavista/cge/devkit/ppc/85xx/bin/../lib/gcc/powerpc-montavista-linux-gnuspe/4.2.0/include
> -fPIC -fno-stack-protector -Iarch/powerpc/boot
> -I/home/djiang/community/git-repos/tmp/ppc-master/arch/powerpc/boot -Wa,-mbooke
> -c -o arch/powerpc/boot/ebony.o arch/powerpc/boot/ebony.c
> /home/djiang/tmp/cc2UVyci.s: Assembler messages:
> /home/djiang/tmp/cc2UVyci.s:142: Error: Unrecognized opcode: `isel'
What versions of binutils, and gcc are you using?
It seems we're going to have to start doing conditional per-file CFLAGS
or something else if we continue to compile all the platform files in
the bootwrapper. I'm not too thrilled with that.
josh
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 440 ebony patch seems to have broken 85xx build on powerpc.git
2007-05-24 17:37 ` Josh Boyer
@ 2007-05-24 17:43 ` Dave Jiang
0 siblings, 0 replies; 19+ messages in thread
From: Dave Jiang @ 2007-05-24 17:43 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev
Josh Boyer wrote:
> On Thu, 2007-05-24 at 10:13 -0700, Dave Jiang wrote:
>> /opt/montavista/cge/devkit/ppc/85xx/bin/../lib/gcc/powerpc-montavista-linux-gnuspe/4.2.0/include
>> -fPIC -fno-stack-protector -Iarch/powerpc/boot
>> -I/home/djiang/community/git-repos/tmp/ppc-master/arch/powerpc/boot -Wa,-mbooke
>> -c -o arch/powerpc/boot/ebony.o arch/powerpc/boot/ebony.c
>> /home/djiang/tmp/cc2UVyci.s: Assembler messages:
>> /home/djiang/tmp/cc2UVyci.s:142: Error: Unrecognized opcode: `isel'
>
> What versions of binutils, and gcc are you using?
>
> It seems we're going to have to start doing conditional per-file CFLAGS
> or something else if we continue to compile all the platform files in
> the bootwrapper. I'm not too thrilled with that.
>
> josh
gcc 4.2.0
binutils 2.17.50
--
------------------------------------------------------
Dave Jiang
Software Engineer
MontaVista Software, Inc.
http://www.mvista.com
------------------------------------------------------
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 440 ebony patch seems to have broken 85xx build on powerpc.git
2007-05-24 17:13 440 ebony patch seems to have broken 85xx build on powerpc.git Dave Jiang
2007-05-24 17:37 ` Josh Boyer
@ 2007-05-24 18:02 ` Sergei Shtylyov
2007-05-24 18:09 ` Josh Boyer
2007-05-24 19:05 ` Segher Boessenkool
2 siblings, 1 reply; 19+ messages in thread
From: Sergei Shtylyov @ 2007-05-24 18:02 UTC (permalink / raw)
To: Dave Jiang; +Cc: linuxppc-dev
Dave Jiang wrote:
> Has anyone been able to build mpc85xx_* from the latest powerpc.git? I have
> tried mpc85xx_cds and mpc8560_ads. I pulled a new git tree and attempted to
> build and hit the error message below.
> Also, if I comment out the two lines in arch/powerpc/boot/Makefile that was
> introduced by the 440 Ebony support patch everything is fine.
> $(obj)/44x.o: BOOTCFLAGS += -Wa,-mbooke
> $(obj)/ebony.o: BOOTCFLAGS += -Wa,-mbooke
> make -f
> /home/djiang/community/git-repos/tmp/ppc-master/scripts/Makefile.modpost vmlinux
> scripts/mod/modpost -o
> /home/djiang/community/git-repos/tmp/ppc-master/Module.symvers
> arch/powerpc/kernel/head_fsl_booke.o init/built-in.o usr/built-in.o
> arch/powerpc/kernel/built-in.o arch/powerpc/mm/built-in.o
> arch/powerpc/lib/built-in.o arch/powerpc/sysdev/built-in.o
> arch/powerpc/platforms/built-in.o arch/powerpc/math-emu/built-in.o
> kernel/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o
> security/built-in.o crypto/built-in.o block/built-in.o lib/lib.a
> lib/built-in.o drivers/built-in.o sound/built-in.o net/built-in.o
> WARNING: arch/powerpc/mm/built-in.o(.text+0x10bc): Section mismatch: reference
> to .init.text:early_get_page (between 'pte_alloc_one_kernel' and 'steal_context')
> rm -f .old_version
> make ARCH=ppc64 -f scripts/Makefile.build obj=arch/powerpc/boot
> arch/powerpc/boot/uImage
> /opt/montavista/cge/devkit/ppc/85xx/bin/ppc_85xx-gcc -m32
> -Wp,-MD,arch/powerpc/boot/.ebony.o.d -Wall -Wstrict-prototypes -O2
> -fomit-frame-pointer -fno-builtin -nostdinc -isystem
> /opt/montavista/cge/devkit/ppc/85xx/bin/../lib/gcc/powerpc-montavista-linux-gnuspe/4.2.0/include
> -fPIC -fno-stack-protector -Iarch/powerpc/boot
> -I/home/djiang/community/git-repos/tmp/ppc-master/arch/powerpc/boot -Wa,-mbooke
> -c -o arch/powerpc/boot/ebony.o arch/powerpc/boot/ebony.c
> /home/djiang/tmp/cc2UVyci.s: Assembler messages:
> /home/djiang/tmp/cc2UVyci.s:142: Error: Unrecognized opcode: `isel'
> make[1]: *** [arch/powerpc/boot/ebony.o] Error 1
I wonder WTF ebony.c gets built for MPC85xx targets? :-O
WBR, Sergei
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 440 ebony patch seems to have broken 85xx build on powerpc.git
2007-05-24 18:02 ` Sergei Shtylyov
@ 2007-05-24 18:09 ` Josh Boyer
2007-05-25 1:27 ` David Gibson
0 siblings, 1 reply; 19+ messages in thread
From: Josh Boyer @ 2007-05-24 18:09 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: linuxppc-dev
On Thu, 2007-05-24 at 22:02 +0400, Sergei Shtylyov wrote:
> Dave Jiang wrote:
>
> > Has anyone been able to build mpc85xx_* from the latest powerpc.git? I have
> > tried mpc85xx_cds and mpc8560_ads. I pulled a new git tree and attempted to
> > build and hit the error message below.
>
> > Also, if I comment out the two lines in arch/powerpc/boot/Makefile that was
> > introduced by the 440 Ebony support patch everything is fine.
>
> > $(obj)/44x.o: BOOTCFLAGS += -Wa,-mbooke
> > $(obj)/ebony.o: BOOTCFLAGS += -Wa,-mbooke
>
> > make -f
> > /home/djiang/community/git-repos/tmp/ppc-master/scripts/Makefile.modpost vmlinux
> > scripts/mod/modpost -o
> > /home/djiang/community/git-repos/tmp/ppc-master/Module.symvers
> > arch/powerpc/kernel/head_fsl_booke.o init/built-in.o usr/built-in.o
> > arch/powerpc/kernel/built-in.o arch/powerpc/mm/built-in.o
> > arch/powerpc/lib/built-in.o arch/powerpc/sysdev/built-in.o
> > arch/powerpc/platforms/built-in.o arch/powerpc/math-emu/built-in.o
> > kernel/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o
> > security/built-in.o crypto/built-in.o block/built-in.o lib/lib.a
> > lib/built-in.o drivers/built-in.o sound/built-in.o net/built-in.o
> > WARNING: arch/powerpc/mm/built-in.o(.text+0x10bc): Section mismatch: reference
> > to .init.text:early_get_page (between 'pte_alloc_one_kernel' and 'steal_context')
> > rm -f .old_version
> > make ARCH=ppc64 -f scripts/Makefile.build obj=arch/powerpc/boot
> > arch/powerpc/boot/uImage
> > /opt/montavista/cge/devkit/ppc/85xx/bin/ppc_85xx-gcc -m32
> > -Wp,-MD,arch/powerpc/boot/.ebony.o.d -Wall -Wstrict-prototypes -O2
> > -fomit-frame-pointer -fno-builtin -nostdinc -isystem
> > /opt/montavista/cge/devkit/ppc/85xx/bin/../lib/gcc/powerpc-montavista-linux-gnuspe/4.2.0/include
> > -fPIC -fno-stack-protector -Iarch/powerpc/boot
> > -I/home/djiang/community/git-repos/tmp/ppc-master/arch/powerpc/boot -Wa,-mbooke
> > -c -o arch/powerpc/boot/ebony.o arch/powerpc/boot/ebony.c
> > /home/djiang/tmp/cc2UVyci.s: Assembler messages:
> > /home/djiang/tmp/cc2UVyci.s:142: Error: Unrecognized opcode: `isel'
> > make[1]: *** [arch/powerpc/boot/ebony.o] Error 1
>
> I wonder WTF ebony.c gets built for MPC85xx targets? :-O
Because it's part of the bootwrapper and all platform files get built no
matter what the actual target is at the moment.
We might want to take a look at why we're doing that again.
josh
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 440 ebony patch seems to have broken 85xx build on powerpc.git
2007-05-24 17:13 440 ebony patch seems to have broken 85xx build on powerpc.git Dave Jiang
2007-05-24 17:37 ` Josh Boyer
2007-05-24 18:02 ` Sergei Shtylyov
@ 2007-05-24 19:05 ` Segher Boessenkool
2007-05-24 19:39 ` Josh Boyer
2007-05-24 22:09 ` Segher Boessenkool
2 siblings, 2 replies; 19+ messages in thread
From: Segher Boessenkool @ 2007-05-24 19:05 UTC (permalink / raw)
To: Dave Jiang; +Cc: linuxppc-dev
> $(obj)/44x.o: BOOTCFLAGS += -Wa,-mbooke
> $(obj)/ebony.o: BOOTCFLAGS += -Wa,-mbooke
Probably -Wa,-m440 works better. However...
> /opt/montavista/cge/devkit/ppc/85xx/bin/ppc_85xx-gcc -m32
> -Wp,-MD,arch/powerpc/boot/.ebony.o.d -Wall -Wstrict-prototypes -O2
> -fomit-frame-pointer -fno-builtin -nostdinc -isystem
> /opt/montavista/cge/devkit/ppc/85xx/bin/../lib/gcc/powerpc-montavista-
> linux-gnuspe/4.2.0/include
> -fPIC -fno-stack-protector -Iarch/powerpc/boot
> -I/home/djiang/community/git-repos/tmp/ppc-master/arch/powerpc/boot
> -Wa,-mbooke
> -c -o arch/powerpc/boot/ebony.o arch/powerpc/boot/ebony.c
Nothing is telling GCC what CPU to compile for, so it
will just use the compiler's default, which very likely
is not what you want. For files that will only ever
be used on 440, the correct flags are -mcpu=440 -Wa,-m440 .
Segher
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 440 ebony patch seems to have broken 85xx build on powerpc.git
2007-05-24 19:05 ` Segher Boessenkool
@ 2007-05-24 19:39 ` Josh Boyer
2007-05-24 20:18 ` Segher Boessenkool
2007-05-24 20:21 ` Arnd Bergmann
2007-05-24 22:09 ` Segher Boessenkool
1 sibling, 2 replies; 19+ messages in thread
From: Josh Boyer @ 2007-05-24 19:39 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: linuxppc-dev
On Thu, 2007-05-24 at 21:05 +0200, Segher Boessenkool wrote:
> > $(obj)/44x.o: BOOTCFLAGS += -Wa,-mbooke
> > $(obj)/ebony.o: BOOTCFLAGS += -Wa,-mbooke
>
> Probably -Wa,-m440 works better. However...
>
> > /opt/montavista/cge/devkit/ppc/85xx/bin/ppc_85xx-gcc -m32
> > -Wp,-MD,arch/powerpc/boot/.ebony.o.d -Wall -Wstrict-prototypes -O2
> > -fomit-frame-pointer -fno-builtin -nostdinc -isystem
> > /opt/montavista/cge/devkit/ppc/85xx/bin/../lib/gcc/powerpc-montavista-
> > linux-gnuspe/4.2.0/include
> > -fPIC -fno-stack-protector -Iarch/powerpc/boot
> > -I/home/djiang/community/git-repos/tmp/ppc-master/arch/powerpc/boot
> > -Wa,-mbooke
> > -c -o arch/powerpc/boot/ebony.o arch/powerpc/boot/ebony.c
>
> Nothing is telling GCC what CPU to compile for, so it
> will just use the compiler's default, which very likely
> is not what you want. For files that will only ever
> be used on 440, the correct flags are -mcpu=440 -Wa,-m440 .
We could add that to the per-file flags already, right?
josh
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 440 ebony patch seems to have broken 85xx build on powerpc.git
2007-05-24 19:39 ` Josh Boyer
@ 2007-05-24 20:18 ` Segher Boessenkool
2007-05-24 20:21 ` Arnd Bergmann
1 sibling, 0 replies; 19+ messages in thread
From: Segher Boessenkool @ 2007-05-24 20:18 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev
>> Nothing is telling GCC what CPU to compile for, so it
>> will just use the compiler's default, which very likely
>> is not what you want. For files that will only ever
>> be used on 440, the correct flags are -mcpu=440 -Wa,-m440 .
>
> We could add that to the per-file flags already, right?
Yes, exactly.
Segher
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 440 ebony patch seems to have broken 85xx build on powerpc.git
2007-05-24 19:39 ` Josh Boyer
2007-05-24 20:18 ` Segher Boessenkool
@ 2007-05-24 20:21 ` Arnd Bergmann
2007-05-24 20:24 ` Josh Boyer
2007-05-24 22:02 ` Segher Boessenkool
1 sibling, 2 replies; 19+ messages in thread
From: Arnd Bergmann @ 2007-05-24 20:21 UTC (permalink / raw)
To: linuxppc-dev
On Thursday 24 May 2007, Josh Boyer wrote:
>=20
> > Nothing is telling GCC what CPU to compile for, so it
> > will just use the compiler's default, which very likely
> > is not what you want. =A0For files that will only ever
> > be used on 440, the correct flags are -mcpu=3D440 -Wa,-m440 .
>=20
> We could add that to the per-file flags already, right?
I think it should really use -mcpu=3Dpowerpc on all files.
The problem that Dave saw was the result of using a compiler
that defaults to -mcpu=3D8540, which uses instruction that
don't work on 440.
The common files really need to be built with -mcpu flags that
make the code work on any system if you want to be able
to use just a single boot wrapper binary for all.
Arnd <><
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 440 ebony patch seems to have broken 85xx build on powerpc.git
2007-05-24 20:21 ` Arnd Bergmann
@ 2007-05-24 20:24 ` Josh Boyer
2007-05-24 21:07 ` Mark A. Greer
` (2 more replies)
2007-05-24 22:02 ` Segher Boessenkool
1 sibling, 3 replies; 19+ messages in thread
From: Josh Boyer @ 2007-05-24 20:24 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linuxppc-dev
On Thu, 2007-05-24 at 22:21 +0200, Arnd Bergmann wrote:
> On Thursday 24 May 2007, Josh Boyer wrote:
> >
> > > Nothing is telling GCC what CPU to compile for, so it
> > > will just use the compiler's default, which very likely
> > > is not what you want. For files that will only ever
> > > be used on 440, the correct flags are -mcpu=440 -Wa,-m440 .
> >
> > We could add that to the per-file flags already, right?
>
> I think it should really use -mcpu=powerpc on all files.
> The problem that Dave saw was the result of using a compiler
> that defaults to -mcpu=8540, which uses instruction that
> don't work on 440.
You sure? It griped about isel, and isel is implemented on all 440s
with the exception of 440GP. Yay for consistency.
> The common files really need to be built with -mcpu flags that
> make the code work on any system if you want to be able
> to use just a single boot wrapper binary for all.
Yeah, it's finding those combinations that work for all the existing
toolchains out there that's the issue. That, or making the wrapper not
compile all the platform files... I don't know which makes more sense.
josh
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 440 ebony patch seems to have broken 85xx build on powerpc.git
2007-05-24 20:24 ` Josh Boyer
@ 2007-05-24 21:07 ` Mark A. Greer
2007-05-24 21:16 ` Arnd Bergmann
2007-05-24 22:03 ` Segher Boessenkool
2 siblings, 0 replies; 19+ messages in thread
From: Mark A. Greer @ 2007-05-24 21:07 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev, Arnd Bergmann
On Thu, May 24, 2007 at 03:24:55PM -0500, Josh Boyer wrote:
> On Thu, 2007-05-24 at 22:21 +0200, Arnd Bergmann wrote:
> > On Thursday 24 May 2007, Josh Boyer wrote:
> > The common files really need to be built with -mcpu flags that
> > make the code work on any system if you want to be able
> > to use just a single boot wrapper binary for all.
>
> Yeah, it's finding those combinations that work for all the existing
> toolchains out there that's the issue. That, or making the wrapper not
> compile all the platform files... I don't know which makes more sense.
The number of files in the bootwrapper is bound to grow, there are
so many combinations that will never be used together, and we're
bumping into lots of toolchain issues, that I'm beginning to think
that paring down wrapper.a is the way to go.
Mark
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 440 ebony patch seems to have broken 85xx build on powerpc.git
2007-05-24 20:24 ` Josh Boyer
2007-05-24 21:07 ` Mark A. Greer
@ 2007-05-24 21:16 ` Arnd Bergmann
2007-05-24 22:08 ` Segher Boessenkool
2007-05-24 22:03 ` Segher Boessenkool
2 siblings, 1 reply; 19+ messages in thread
From: Arnd Bergmann @ 2007-05-24 21:16 UTC (permalink / raw)
To: linuxppc-dev
On Thursday 24 May 2007, Josh Boyer wrote:
>=20
> > I think it should really use -mcpu=3Dpowerpc on all files.
> > The problem that Dave saw was the result of using a compiler
> > that defaults to -mcpu=3D8540, which uses instruction that
> > don't work on 440.
>=20
> You sure? =A0It griped about isel, and isel is implemented on all 440s
> with the exception of 440GP. =A0Yay for consistency.
strange indeed. -m440 does enable PPC_OPCODE_ISEL in the current
gas version, and probably all old ones as well.
> > The common files really need to be built with -mcpu flags that
> > make the code work on any system if you want to be able
> > to use just a single boot wrapper binary for all.
>=20
> Yeah, it's finding those combinations that work for all the existing
> toolchains out there that's the issue. =A0That, or making the wrapper not
> compile all the platform files... =A0I don't know which makes more sense.
I've looked up the gas source and found two ways that allow us to
compile everywhere:
1. Pass -Wa,-many to gcc
This will really allow any possible instruction to be assembled, including
the old POWER architecture, but also includes all the other strange
stuff like -maltivec, -mspe, -me500, ...
2. protect the use of special instructions with .machine directives.
You can write all the inline assemblies like
.machine push
.machine 440
<440 specific instruction>
.machine pop
This should work in any reasonably recent version of binutils, meaning
that we don't need to pass stuff like -Wa,-m440 any more.
Arnd <><
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 440 ebony patch seems to have broken 85xx build on powerpc.git
2007-05-24 20:21 ` Arnd Bergmann
2007-05-24 20:24 ` Josh Boyer
@ 2007-05-24 22:02 ` Segher Boessenkool
2007-05-25 1:30 ` David Gibson
1 sibling, 1 reply; 19+ messages in thread
From: Segher Boessenkool @ 2007-05-24 22:02 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linuxppc-dev
>>> Nothing is telling GCC what CPU to compile for, so it
>>> will just use the compiler's default, which very likely
>>> is not what you want. =A0For files that will only ever
>>> be used on 440, the correct flags are -mcpu=3D440 -Wa,-m440 .
>>
>> We could add that to the per-file flags already, right?
>
> I think it should really use -mcpu=3Dpowerpc on all files.
> The problem that Dave saw was the result of using a compiler
> that defaults to -mcpu=3D8540, which uses instruction that
> don't work on 440.
No, those options _do_ work on 440, but the -mbooke
assembler flag disallows isel (since it is an optional
insn).
> The common files really need to be built with -mcpu flags that
> make the code work on any system if you want to be able
> to use just a single boot wrapper binary for all.
On any system where they can run at all, yes. It should
be fine to compile a 440-only file with 440-specific flags.
Segher
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 440 ebony patch seems to have broken 85xx build on powerpc.git
2007-05-24 20:24 ` Josh Boyer
2007-05-24 21:07 ` Mark A. Greer
2007-05-24 21:16 ` Arnd Bergmann
@ 2007-05-24 22:03 ` Segher Boessenkool
2 siblings, 0 replies; 19+ messages in thread
From: Segher Boessenkool @ 2007-05-24 22:03 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev, Arnd Bergmann
> Yeah, it's finding those combinations that work for all the existing
> toolchains out there that's the issue.
No, it was a simple bug -- we shouldn't pass an assembler
flag for 440.o and ebony.o, but a compiler flag.
Segher
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 440 ebony patch seems to have broken 85xx build on powerpc.git
2007-05-24 21:16 ` Arnd Bergmann
@ 2007-05-24 22:08 ` Segher Boessenkool
0 siblings, 0 replies; 19+ messages in thread
From: Segher Boessenkool @ 2007-05-24 22:08 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linuxppc-dev
> 1. Pass -Wa,-many to gcc
> This will really allow any possible instruction to be assembled,
> including
> the old POWER architecture, but also includes all the other strange
> stuff like -maltivec, -mspe, -me500, ...
And it doesn't prevent the compiler from compiling insns
that can never work on the platform; for example, the
compiler in the original bug report will happily put isel
insns all over the place.
> 2. protect the use of special instructions with .machine directives.
> You can write all the inline assemblies like
>
> .machine push
> .machine 440
> <440 specific instruction>
> .machine pop
>
> This should work in any reasonably recent version of binutils, meaning
> that we don't need to pass stuff like -Wa,-m440 any more.
[You don't need the assembler flag at all, just the compiler
flag -mcpu=440].
This of course works, but is ultra-silly to do in a file
that will never run on anything other than 440 systems.
Segher
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 440 ebony patch seems to have broken 85xx build on powerpc.git
2007-05-24 19:05 ` Segher Boessenkool
2007-05-24 19:39 ` Josh Boyer
@ 2007-05-24 22:09 ` Segher Boessenkool
1 sibling, 0 replies; 19+ messages in thread
From: Segher Boessenkool @ 2007-05-24 22:09 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: linuxppc-dev
> For files that will only ever
> be used on 440, the correct flags are -mcpu=440 -Wa,-m440 .
For the archives: just -mcpu=440 is fine (it implies the
assembler option, via GCC specs).
Segher
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 440 ebony patch seems to have broken 85xx build on powerpc.git
2007-05-24 18:09 ` Josh Boyer
@ 2007-05-25 1:27 ` David Gibson
0 siblings, 0 replies; 19+ messages in thread
From: David Gibson @ 2007-05-25 1:27 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev
On Thu, May 24, 2007 at 01:09:00PM -0500, Josh Boyer wrote:
> On Thu, 2007-05-24 at 22:02 +0400, Sergei Shtylyov wrote:
> > Dave Jiang wrote:
> >
> > > Has anyone been able to build mpc85xx_* from the latest powerpc.git? I have
> > > tried mpc85xx_cds and mpc8560_ads. I pulled a new git tree and attempted to
> > > build and hit the error message below.
> >
> > > Also, if I comment out the two lines in arch/powerpc/boot/Makefile that was
> > > introduced by the 440 Ebony support patch everything is fine.
> >
> > > $(obj)/44x.o: BOOTCFLAGS += -Wa,-mbooke
> > > $(obj)/ebony.o: BOOTCFLAGS += -Wa,-mbooke
> >
> > > make -f
> > > /home/djiang/community/git-repos/tmp/ppc-master/scripts/Makefile.modpost vmlinux
> > > scripts/mod/modpost -o
> > > /home/djiang/community/git-repos/tmp/ppc-master/Module.symvers
> > > arch/powerpc/kernel/head_fsl_booke.o init/built-in.o usr/built-in.o
> > > arch/powerpc/kernel/built-in.o arch/powerpc/mm/built-in.o
> > > arch/powerpc/lib/built-in.o arch/powerpc/sysdev/built-in.o
> > > arch/powerpc/platforms/built-in.o arch/powerpc/math-emu/built-in.o
> > > kernel/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o
> > > security/built-in.o crypto/built-in.o block/built-in.o lib/lib.a
> > > lib/built-in.o drivers/built-in.o sound/built-in.o net/built-in.o
> > > WARNING: arch/powerpc/mm/built-in.o(.text+0x10bc): Section mismatch: reference
> > > to .init.text:early_get_page (between 'pte_alloc_one_kernel' and 'steal_context')
> > > rm -f .old_version
> > > make ARCH=ppc64 -f scripts/Makefile.build obj=arch/powerpc/boot
> > > arch/powerpc/boot/uImage
> > > /opt/montavista/cge/devkit/ppc/85xx/bin/ppc_85xx-gcc -m32
> > > -Wp,-MD,arch/powerpc/boot/.ebony.o.d -Wall -Wstrict-prototypes -O2
> > > -fomit-frame-pointer -fno-builtin -nostdinc -isystem
> > > /opt/montavista/cge/devkit/ppc/85xx/bin/../lib/gcc/powerpc-montavista-linux-gnuspe/4.2.0/include
> > > -fPIC -fno-stack-protector -Iarch/powerpc/boot
> > > -I/home/djiang/community/git-repos/tmp/ppc-master/arch/powerpc/boot -Wa,-mbooke
> > > -c -o arch/powerpc/boot/ebony.o arch/powerpc/boot/ebony.c
> > > /home/djiang/tmp/cc2UVyci.s: Assembler messages:
> > > /home/djiang/tmp/cc2UVyci.s:142: Error: Unrecognized opcode: `isel'
> > > make[1]: *** [arch/powerpc/boot/ebony.o] Error 1
> >
> > I wonder WTF ebony.c gets built for MPC85xx targets? :-O
>
> Because it's part of the bootwrapper and all platform files get built no
> matter what the actual target is at the moment.
>
> We might want to take a look at why we're doing that again.
So that we have a better chance of catching platform specific build
bugs: which we just did.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 440 ebony patch seems to have broken 85xx build on powerpc.git
2007-05-24 22:02 ` Segher Boessenkool
@ 2007-05-25 1:30 ` David Gibson
2007-05-25 14:01 ` Segher Boessenkool
0 siblings, 1 reply; 19+ messages in thread
From: David Gibson @ 2007-05-25 1:30 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: linuxppc-dev, Arnd Bergmann
On Fri, May 25, 2007 at 12:02:44AM +0200, Segher Boessenkool wrote:
> >>> Nothing is telling GCC what CPU to compile for, so it
> >>> will just use the compiler's default, which very likely
> >>> is not what you want. For files that will only ever
> >>> be used on 440, the correct flags are -mcpu=440 -Wa,-m440 .
> >>
> >> We could add that to the per-file flags already, right?
> >
> > I think it should really use -mcpu=powerpc on all files.
> > The problem that Dave saw was the result of using a compiler
> > that defaults to -mcpu=8540, which uses instruction that
> > don't work on 440.
>
> No, those options _do_ work on 440, but the -mbooke
> assembler flag disallows isel (since it is an optional
> insn).
But not on 440GP, which is what Ebony is.
> > The common files really need to be built with -mcpu flags that
> > make the code work on any system if you want to be able
> > to use just a single boot wrapper binary for all.
>
> On any system where they can run at all, yes. It should
> be fine to compile a 440-only file with 440-specific flags.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: 440 ebony patch seems to have broken 85xx build on powerpc.git
2007-05-25 1:30 ` David Gibson
@ 2007-05-25 14:01 ` Segher Boessenkool
0 siblings, 0 replies; 19+ messages in thread
From: Segher Boessenkool @ 2007-05-25 14:01 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev, Arnd Bergmann
>> No, those options _do_ work on 440, but the -mbooke
>> assembler flag disallows isel (since it is an optional
>> insn).
>
> But not on 440GP, which is what Ebony is.
I meant it is an optional insn in the arch.
-mcpu=440 doesn't enable isel, anyway; only -mcpu=e500
does in any FSF GCC release as far as I can see.
Segher
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2007-05-25 14:01 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-24 17:13 440 ebony patch seems to have broken 85xx build on powerpc.git Dave Jiang
2007-05-24 17:37 ` Josh Boyer
2007-05-24 17:43 ` Dave Jiang
2007-05-24 18:02 ` Sergei Shtylyov
2007-05-24 18:09 ` Josh Boyer
2007-05-25 1:27 ` David Gibson
2007-05-24 19:05 ` Segher Boessenkool
2007-05-24 19:39 ` Josh Boyer
2007-05-24 20:18 ` Segher Boessenkool
2007-05-24 20:21 ` Arnd Bergmann
2007-05-24 20:24 ` Josh Boyer
2007-05-24 21:07 ` Mark A. Greer
2007-05-24 21:16 ` Arnd Bergmann
2007-05-24 22:08 ` Segher Boessenkool
2007-05-24 22:03 ` Segher Boessenkool
2007-05-24 22:02 ` Segher Boessenkool
2007-05-25 1:30 ` David Gibson
2007-05-25 14:01 ` Segher Boessenkool
2007-05-24 22:09 ` Segher Boessenkool
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).