Uclinux-2008r1-rc8 (bf561) to VDSP5 porting (10): Compiler configuration

Source: Internet
Author: User
Tags definition config header

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.