I am trying to cross compile a program for an AVR using avr-gcc that I installed through macports. In the terminal:
avr-gcc -O1 -DF_CPU=1000000UL -DBAUD=9600 -I. -I/opt/local/avr/include/ -Wl,-Map,main.map -mmcu=atmega328p main.c -c
which results in the errors:
clang: error: unknown argument: '-mgcc-isr'
clang: error: unknown argument: '-mno-skip-bug'
The above cross compile used to work but after updating to Catalina and reinstalling avr-gcc something has gotten messed up. Searching google I have found that, with newer versions of Clang, if Clang doesn't recognize the command line argument then it raises an error. The suggestions said to use something like -Wno-error=gcc-isr. So my command becomes:
avr-gcc -O1 -Wno-error=gcc-isr -DF_CPU=1000000UL -DBAUD=9600 -I. -I/opt/local/avr/include/ -Wl,-Map,main.map -mmcu=atmega328p main.c -c
which results in:
cc1: error: ‘-Werror=gcc-isr’: no option -Wgcc-isr
It looks like something is getting messed up between Clang and avr-gcc. Although I'm not sure why Clang gets called when I am using avr-gcc. Does anyone have any idea what's going on here?