powerpc: question concerning insmod

Harald Küthe harald-tuxbox at arcor.de
Sun Jul 13 19:36:18 UTC 2008


On Thursday 03 July 2008 21:57, beck0778 at umn.edu <http://busybox.net/cgi-bin/mailman/listinfo/busybox> wrote:
>/ 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
/
Does it work if you add || defined(__powerpc__) ?

--
vda



It works for me.

Regards
Harald

Patch:
--- busybox-1.11.1.orig/modutils/insmod.c.orig    2008-06-25 
14:51:18.000000000 +0200
+++ busybox-1.11.1/modutils/insmod.c    2008-07-13 15:58:34.000000000 +0200
@@ -839,7 +839,7 @@
                struct obj_symbol *sym,
                ElfW(RelM) *rel, ElfW(Addr) v)
{
-#if defined(__arm__) || defined(__i386__) || defined(__mc68000__) \
+#if defined(__arm__) || defined(__i386__) || defined(__mc68000__) || 
defined(__powerpc__) \
 || defined(__sh__) || defined(__s390__) || defined(__x86_64__)
    struct arch_file *ifile = (struct arch_file *) f;
#endif






More information about the busybox mailing list