gcc, make: how to disable fail on warning?

2020-04-02 07:47发布

I'm trying to build gcc for use with an AVR micro controller and avr-ada, and I've hit a roadblock caused by my regular compiler being too picky about the version I needed for the AVR. I get the following warning, which in turn causes the gcc or make to report an error:

gcc -c -g -O2 -gnatpg -gnata -nostdinc -I- -I. -Iada 
  -I../../gcc/ada ../../gcc/ada/exp_ch5.adb -o ada/exp_ch5.o
exp_ch5.adb:177:16: warning: function "Has_Address_Clause" is not referenced
make[2]: *** [ada/exp_ch5.o] Error 1
make[1]: *** [all-gcc] Error 2
make: *** [all] Error 2

Is there a way to instruct gcc or make to not fail on warnings?

标签: c gcc makefile ada
7条回答
何必那么认真
2楼-- · 2020-04-02 08:31

In gcc configure you can add --disable-werror.

Though it's advisable to seek out a proper patch first.

查看更多
登录 后发表回答