[PATCH 1/2] Fix kexec on powerpc32
Maxim Uvarov
muvarov at gmail.com
Wed May 12 02:31:26 EDT 2010
2010/5/12 Christian Kujau <lists at nerdbynature.de>
> Maxim Uvarov wrote on 2010-05-11 10:47 :
> > This patch is required in case if you are using new toolchains.
>
> I'm on Debian/stable (binutils 2.18, gcc 4.3.2), so I applied your patches
> to the latest -git checkout:
>
> First, compilation fails with:
>
> cc1: warnings being treated as errors
> kexec/arch/ppc/kexec-ppc.c: In function ‘get_base_ranges’:
> kexec/arch/ppc/kexec-ppc.c:258: error: value computed is not used
> make: *** [kexec/arch/ppc/kexec-ppc.o] Error 1
>
> Somehow a "-" hyphen made it into one of the functions:
>
> > --- a/kexec/arch/ppc/kexec-ppc.c
> > +++ b/kexec/arch/ppc/kexec-ppc.c
> [...]
> > if (local_memory_ranges >= max_memory_ranges) {
> > - fclose(file);
> > - break;
> > + if (realloc_memory_ranges() < 0){
> > + - fclose(file);
>
> Oh, I sent this patch twice with stg -a by mistake. And second version has
"-". I will fix and resend patches.
>
> Removing this, gets me further, until:
>
>
> purgatory/arch/ppc/crt.o: In function `__lshrdi3':
> (.text+0xf0): multiple definition of `__lshrdi3'
> purgatory/arch/ppc/misc.o:(.text+0x50): first defined here
> collect2: ld returned 1 exit status
> make: *** [purgatory/purgatory.ro] Error 1
>
> And has been defined in purgatory/arch/ppc/crt.S and
> ./purgatory/arch/ppc/misc.S. Removing it from e.g. crt.S
> makes it compile, I have not tested it yet, though :-)
>
Yes, that is expected result for old tool chains. New tool chains (from code
sourcery ) need this crt.S.
I think we can have --with-oldtoolchain option to configure to point to old
tool chains. (or even rename it to --with-crts,
I don't know what is better.)
>
> Thanks,
> Christian.
>
> PS: Where is -Werror defined? I could not find it anywhere in the kexec
> source (execpt in arch/mips)...
> --
>
This -Werror came from mips. kexec/arch/mips/Makefile. It is already removed
in the git. We already saw this problem.
> make bzImage, not war
>
--
Best regards,
Maxim Uvarov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/kexec/attachments/20100512/c6f64874/attachment.htm>
More information about the kexec
mailing list