make -C /home/yflu/linux-3.10.48 M=/home/yflu/hello modules ARCH=powerpc CROSS_COMPILE=powerpc-fsl-linux-gnuspe-
make[1]: Entering directory `/home/yflu/linux-3.10.48'
Building modules, stage 2.
MODPOST 1 modules
LD [M] /home/yflu/hello/mo.ko
powerpc-fsl-linux-gnuspe-ld: unrecognized option '-Wl,-O1'
powerpc-fsl-linux-gnuspe-ld: use the --help option for usage information
make[2]: *** [/home/yflu/hello/mo.ko] Error 1
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/home/yflu/linux-3.10.48'
make: *** [all] Error 2
Solved! Go to Solution.
Your linker for some reason receives options that should rather be interpreted by GCC. This may happen
due to wrong makefiles or environment variables. Suggestions:
1. Check the Makefile or Kbuild in your module source directory. One of them must be present. See Section 3 of this:
https://www.kernel.org/doc/Documentation/kbuild/modules.txt
2. Use the kernel and the toolchain from QorIQ SDK.
3. Make sure you successfully built the kernel for the selected target before attempting to build an external module.
4. Refer to the following links for general information:
https://www.kernel.org/doc/Documentation/kbuild/modules.txt
Have a great day,
Platon
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Your linker for some reason receives options that should rather be interpreted by GCC. This may happen
due to wrong makefiles or environment variables. Suggestions:
1. Check the Makefile or Kbuild in your module source directory. One of them must be present. See Section 3 of this:
https://www.kernel.org/doc/Documentation/kbuild/modules.txt
2. Use the kernel and the toolchain from QorIQ SDK.
3. Make sure you successfully built the kernel for the selected target before attempting to build an external module.
4. Refer to the following links for general information:
https://www.kernel.org/doc/Documentation/kbuild/modules.txt
Have a great day,
Platon
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------