gcc, make: how to disable fail on warning?

后端 未结 7 1359
天命终不由人
天命终不由人 2021-01-11 13:54

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

7条回答
  •  梦毁少年i
    2021-01-11 14:14

    The trigger here is the -gnatpg (actually, the -gnatg): this is the "GNAT implementation mode (used for compiling GNAT units)". -gnatp means "suppress all checks".

    I'm not sure of the full effect of -gnatg, though it certainly causes warnings to be treated as errors -- like -Werror -- at any rate while building the compiler itself; I think I remember seeing non-fatal warnings while building the RTS.

    One possibility would be to compile just exp_ch5.adb by hand without -gnatg; the command you list was issued at gcc/, so

    $ cd gcc
    $ gcc -c -g -O2 -gnatp -gnata -nostdinc -I- -I. -Iada -I../../gcc/ada \
      ../../gcc/ada/exp_ch5.adb -o ada/exp_ch5.o
    

    Then back up one level, and 'make' again.

    This is a cross-compiler, so you won't (I hope!) need to repeat this for all three stages of a full build.

提交回复
热议问题