Hello,

I am attempting to build busybox-1.11.0 for powerpc. I have unsuccessfully 
tried:

1) custom-built cross compiling toolchain built with crosstool (gcc 4.1.0, 
glibc 2.3.6)

2) vendor-provided cross compiling toolchain (gcc 3.4.3, glibc 2.3.3)

3) vendor-provided native powerpc toolchain (gcc 3.4.3, glibc 2.3.3)

For the cross compilers, I'm trying to build with:
$ make ARCH=powerpc CROSS_COMPILE=powerpc-405-linux-gnu-

For the native compiler, I'm just using:
$ make

I am getting an error while compiling the file modutils/insmod.c using any 
of these toolchains:

For all three toolchains, I get the following error messages:

  CC modutils/insmod.o modutils/insmod.c: In function 
'arch_apply_relocation': modutils/insmod.c:864: error: 'ifile' undeclared 
(first use in this function) modutils/insmod.c:864: error: (Each undeclared 
identifier is reported only once modutils/insmod.c:864: error: for each 
function it appears in.) modutils/insmod.c:836: warning: unused parameter 
'f' make[1]: *** [modutils/insmod.o] Error 1 make: *** [modutils] Error 2

I looked into the source file indicated, and it seems like the variable 
ifile is defined in this section, which does not include a " || 
defined(__powerpc__)" condition:

#if defined(__arm__) || defined(__i386__) || defined(__mc68000__) \
 || defined(__sh__) || defined(__s390__) || defined(__x86_64__)
        struct arch_file *ifile = (struct arch_file *) f;
#endif


The error line is 864:
#if defined(USE_PLT_ENTRIES)
        ElfW(Addr) plt = ifile->plt ? ifile->plt->header.sh_addr : 0;
        unsigned long *ip;
...
#endif

If we look up near the top, we see:

#elif defined(__powerpc__)
#define MATCH_MACHINE(x) (x == EM_PPC)
#define SHT_RELM        SHT_RELA
#define Elf32_RelM      Elf32_Rela
#define ELFCLASSM       ELFCLASS32
#define USE_PLT_ENTRIES
#define PLT_ENTRY_SIZE 16
#define USE_PLT_LIST
#define LIST_ARCHTYPE ElfW(Addr)
#define USE_LIST
#define ARCHDATAM       "__ftr_fixup"
#endif

Here it looks like USE_PLT_ENTRIES is defined for powerpc, but the ifile 
variable isn't defined for powerpc.

I'm guessing that someone else has had success cross compiling 
busybox-1.11.0 for powerpc, and this is a problem with my setup. If anyone 
has run into this before, or has any suggestions, I would really appreciate 
any help.

Thank you in advance,
Matthew

_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to