docprobe.c on PowerPC
There a bug in MTD and/or Linux and/or gcc for docprobe on PowerPC machines. I have a pretty recent linux.2.4.18-pre8 kernel from the bitkeeper linuxppc_devel archives. It seems that when setting up doc_locations[] that the #elif defined(__ppc__) is not executed. The gcc specs file does not mention this definition. I did a gcc -v on a test file and it seems that -DPPC -D__PPC and -D__PPC__ are defined but not -D__ppc__. Other architectures in the docprobe.c file use __alpha__, __i386 __x86_64__, etc. Where do these definitions come from (or where are they supposed to be defined) ? In GCC, the linux kernel or should the MTD code use __PPC__ instead ???
Thanks,
Brendan Simon.
Quoted 3 lines · [email protected] said:
Where do these definitions come from (or where are they supposed to
be defined) ? In GCC, the linux kernel or should the MTD code use__PPC__instead ???
They come from GCC and aren't really expected to be consistent across architectures. I've changed docprobe.c to use __PPC__. Thanks for pointing it out. I don't remember where that PPC address came from - perhaps they should be platform-specific like the Ocelot one, not arch-specific.
--
dwmw2