AnsweredAssumed Answered

'struct task_struct' declared inside parameter list: in /arch/powerpc/include/asm/hw_breakpoint.h"!

Question asked by antóniosilva on Dec 21, 2015
Latest reply on Dec 22, 2015 by antóniosilva

Hi,

 

 

I'm unsing a Umbuntu machine as a build machine. There I installed the toochain from "fsl-networking-eglibc-i686-ppce500v2-toolchain-QorIQ-SDK-V1.8.sh". I got it from SDK1v8 Virtual Envioroment for PPCE500mc. (yes, using e500v2 toolchain obtained from e550mc virtual enviroment, this is not a problem).

 

 

With the toochain installed in defaul path, I was able to compile (in build machine), the linux 3.12.xx. targeting QorIQ P1010! So, I'm cross-compiling from an Unbuntu build machine to a P1010.

In MenuConfig's Linux 3.12, I selected "Freescale 85xx" as Processor Type (I'm targeting P1010). I did not set "Workarround erratum A-006184". I did set SPE enable!

 

Them I did: "source /opt/fsl-networking/QorIQ-SDK-V1.8/environment-setup-ppce500v2-fsl-linux-gnuspe", and

make all V=2 LIBGCC=/opt/fsl-networking/QorIQ-SDK-V1.8/sysroots/ppce500v2-fsl-linux-gnuspe/usr/lib/powerpc-fsl-linux-gnuspe/4.9.2/libgcc.a in order to xcompile the kernell.

 

I added LIBCC=/opt/..." n make command, because otherwise I got an error: powerpc-fsl-linux-gnuspe-ld: cannot find libgcc.a: No such file or directory

Why this happen? Why I need to pass LIBGCC like that? If I do export LIBGCC="...", it will not be accessible!

 

After all this, I was able to xcompile the linux 3.12 targeting P1010 (then using ppce500v2 toochain ),

 

After I also did also performed :

make headers_install INSTALL_HDR_PATH=$PWD/../linux-inc V=1

 

 

But my question is: When compiling a 3th party code, I'm getting "'struct task_struct' declared inside parameter list" in "linux/arch/powerpc/include/asm/hw_breakpoint.h"!

To be clear, the flag: CONFIG_HAVE_HW_BREAKPOINT is NOT set anyway.

Why this happens? Could this issue related with any configuration option in Kernel MenuConfig?

There is anyone with a tip?

 

Log Error:

In file included from /home/amacedo/zebic/lib/linux/arch/powerpc/include/asm/processor.h:36:0,

                 from /home/amacedo/zebic/lib/linux/arch/powerpc/include/asm/thread_info.h:33,

                 from /home/amacedo/zebic/lib/linux/include/linux/thread_info.h:54,

                 from /home/amacedo/zebic/lib/linux/include/linux/preempt.h:9,

                 from /home/amacedo/zebic/lib/linux/include/linux/spinlock.h:50,

                 from /home/amacedo/zebic/lib/linux/include/linux/mmzone.h:7,

                 from /home/amacedo/zebic/lib/linux/include/linux/gfp.h:4,

                 from /home/amacedo/zebic/lib/linux/include/linux/slab.h:14,

                 from /home/amacedo/zebic/lib/sdk-xgs-robo-6.4.8/systems/linux/kernel/modules/include/lkm.h:65,

                 from /home/amacedo/zebic/lib/sdk-xgs-robo-6.4.8/systems/linux/kernel/modules/shared/gmodule.c:50:

/home/amacedo/zebic/lib/linux/arch/powerpc/include/asm/hw_breakpoint.h:96:69: error: 'struct task_struct' declared inside parameter list [-Werror]

static inline void thread_change_pc(struct task_struct *tsk, struct pt_regs *regs) { }

                                                                 ^

 

/home/amacedo/zebic/lib/linux/arch/powerpc/include/asm/hw_breakpoint.h:96:69: error: its scope is only this definition or declaration, which is probably not what you want [-Werror]

 

 

Thanks in advance for any tip.

Outcomes