Due to the difference between VDSP5 and GCC, the appropriate configuration is required in Config.h.
1 __kernel__
For uclinux kernel compilation, the definition of __kernel__ must be added. This is accomplished in the original file of Uclinux by controlling the compiler's options in makefile. I added #include <config.h> to the C file header of each uclinux kernel, so I put this definition directly in Config.h:
#define __KERNEL__ 1//only applies to kernel configuration
2 GCC version number
In Uclinux header file (include/compiler.h), to detect the version number of GCC:
#if __GNUC__ >= 4
# include <linux/compiler-gcc4.h>
#elif __GNUC__ == 3 && __GNUC_MINOR__ >= 2
# include <linux/compiler-gcc3.h>
#else
# error Sorry, your compiler is too old/not recognized.
#endif
Because VDSP is known to have good compatibility with gcc3.4, add the following definition to the Config.h:
#define __GNUC__ 3
#define __GNUC_MINOR__ 4