u-boot移植时出现inline function 'coloured_LED_init' cannot be declared weak及相关错误时的解决办法!
2012-03-30 01:11
645 查看
board.c:127: error: inline function 'coloured_LED_init' cannot be declared weak
board.c:129: error: inline function 'red_LED_on' cannot be declared weak
board.c:131: error: inline function 'red_LED_off' cannot be declared weak
board.c:133: error: inline function 'green_LED_on' cannot be declared weak
board.c:135: error: inline function 'green_LED_off' cannot be declared weak
board.c:137: error: inline function 'yellow_LED_on' cannot be declared weak
board.c:139: error: inline function 'yellow_LED_off' cannot be declared weak
board.c:141: error: inline function 'blue_LED_on' cannot be declared weak
board.c:143: error: inline function 'blue_LED_off' cannot be declared weak
make[1]: *** [board.o] 错误 1
make[1]: Leaving directory `/root/workspace/u-boot-2009.08/lib_arm'
make: *** [lib_arm/libarm.a] 错误 2
[root@localhost u-boot-2009.08]#
出现错误,内嵌函数不能被声明为weak属性,打开lib_arm/board.c,定位到127行开始,将其注释掉,修改后结果如下:
void inline __coloured_LED_init (void) {}
//void inline coloured_LED_init (void) __attribute__((weak, alias("__coloured_LED_init")));
void inline __red_LED_on (void) {}
//void inline red_LED_on (void) __attribute__((weak, alias("__red_LED_on")));
void inline __red_LED_off(void) {}
//void inline red_LED_off(void) __attribute__((weak, alias("__red_LED_off")));
void inline __green_LED_on(void) {}
//void inline green_LED_on(void) __attribute__((weak, alias("__green_LED_on")));
void inline __green_LED_off(void) {}
//void inline green_LED_off(void)__attribute__((weak, alias("__green_LED_off")));
void inline __yellow_LED_on(void) {}
//void inline yellow_LED_on(void)__attribute__((weak, alias("__yellow_LED_on")));
void inline __yellow_LED_off(void) {}
//void inline yellow_LED_off(void)__attribute__((weak, alias("__yellow_LED_off")));
void inline __blue_LED_on(void) {}
//void inline blue_LED_on(void)__attribute__((weak, alias("__blue_LED_on")));
void inline __blue_LED_off(void) {}
//void inline blue_LED_off(void)__attribute__((weak, alias("__blue_LED_off")));
[root@localhost u-boot-2009.08]# make clean
[root@localhost u-boot-2009.08]# make
本篇文章来源于 Linux公社网站(www.linuxidc.com) 原文链接:http://www.linuxidc.com/Linux/2011-05/35982.htm
board.c:129: error: inline function 'red_LED_on' cannot be declared weak
board.c:131: error: inline function 'red_LED_off' cannot be declared weak
board.c:133: error: inline function 'green_LED_on' cannot be declared weak
board.c:135: error: inline function 'green_LED_off' cannot be declared weak
board.c:137: error: inline function 'yellow_LED_on' cannot be declared weak
board.c:139: error: inline function 'yellow_LED_off' cannot be declared weak
board.c:141: error: inline function 'blue_LED_on' cannot be declared weak
board.c:143: error: inline function 'blue_LED_off' cannot be declared weak
make[1]: *** [board.o] 错误 1
make[1]: Leaving directory `/root/workspace/u-boot-2009.08/lib_arm'
make: *** [lib_arm/libarm.a] 错误 2
[root@localhost u-boot-2009.08]#
出现错误,内嵌函数不能被声明为weak属性,打开lib_arm/board.c,定位到127行开始,将其注释掉,修改后结果如下:
void inline __coloured_LED_init (void) {}
//void inline coloured_LED_init (void) __attribute__((weak, alias("__coloured_LED_init")));
void inline __red_LED_on (void) {}
//void inline red_LED_on (void) __attribute__((weak, alias("__red_LED_on")));
void inline __red_LED_off(void) {}
//void inline red_LED_off(void) __attribute__((weak, alias("__red_LED_off")));
void inline __green_LED_on(void) {}
//void inline green_LED_on(void) __attribute__((weak, alias("__green_LED_on")));
void inline __green_LED_off(void) {}
//void inline green_LED_off(void)__attribute__((weak, alias("__green_LED_off")));
void inline __yellow_LED_on(void) {}
//void inline yellow_LED_on(void)__attribute__((weak, alias("__yellow_LED_on")));
void inline __yellow_LED_off(void) {}
//void inline yellow_LED_off(void)__attribute__((weak, alias("__yellow_LED_off")));
void inline __blue_LED_on(void) {}
//void inline blue_LED_on(void)__attribute__((weak, alias("__blue_LED_on")));
void inline __blue_LED_off(void) {}
//void inline blue_LED_off(void)__attribute__((weak, alias("__blue_LED_off")));
[root@localhost u-boot-2009.08]# make clean
[root@localhost u-boot-2009.08]# make
本篇文章来源于 Linux公社网站(www.linuxidc.com) 原文链接:http://www.linuxidc.com/Linux/2011-05/35982.htm
相关文章推荐
- u-boot移植时出现inline function 'coloured_LED_init' cannot be declared weak及相关错误时的解决办法!
- u-boot移植时出现inline function 'coloured_LED_init' cannot be declared weak及相关错误时的解决办法
- error:undefined reference to `coloured_LED_init'及相关错误时的解决办法!
- U_BOOT移植时出现相关错误时解决办法
- U-Boot中使用tftp下载文件出现错误TFTP error: 'Access violation' (2)的解决办法
- 编译linux内核时出现"mkimage" command not found - U-Boot images will not be built错误的解决办法
- Nothing to be done for `_depend' 解决 make uboot时出现的错误
- vc 出现“fatal error C1085: Cannot write precompiled header file: 'Debug/xxx.pch': The parameter is incorrect“的错误的解决办法
- 移植uip-0.9到u-boot中出现undefined reference to `strstr'错误的解决过程
- PLS-S-00201, identifier 'CALLDEMO.GET_EMPLOYEES' must be declared 预编译错误原因及解决办法
- 升级as后,老工程gradle文件出现"dependencies' cannot be applied to '(groovy.lang.Closure)'警告的解决办法
- nginx + passenger 出现 Cannot stat .../config.ru': Permission denied 的错误的解决办法
- 突然断电,出现'an error occurred during the file system check'错误解决办法
- Praat在CentOS 6.5中安装出现./praat /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.18' not found错误的解决办法
- eclipse下启动tomcat出现Setting property 'source' to 'org.eclipse.jst.jee.server: '错误的解决办法
- 在Eclipse中编写servlet时出现"The import javax.servlet cannot be resolved" 问题解决办法
- GCC编译uboot出现(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'错误的解决办法
- 导入android项目出现:出现Unable to resolve target 'android-8'错误及其他的一些解决办法
- error C4996: 'fopen': This function or variable may be unsafe. use _CRT_SECURE_NO_WARNINGS错误的解决方法
- java hibernate 中"node to traverse cannot be null"错误解决办法