https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119077
Bug ID: 119077 Summary: gcc option -mint8 leads to undefined reference to `__builtin_avr_delay_cycles' Product: gcc Version: 14.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: ul...@t-online.de Target Milestone: --- Created attachment 60625 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60625&action=edit example If the avr-gcc option -mint8 is used with a _delay_ms() or _delay_us() function, ld exits with the error-message "undefined reference to `__builtin_avr_delay_cycles'". GCC version and build flags: $ avr-gcc -v Using built-in specs. Reading specs from /usr/local/avr/lib/gcc/avr/14.2.0/device-specs/specs-avr2 COLLECT_GCC=avr-gcc COLLECT_LTO_WRAPPER=/usr/local/avr/libexec/gcc/avr/14.2.0/lto-wrapper Target: avr Configured with: ../configure --prefix=/usr/local/avr --target=avr --enable-languages=c,c++ --disable-nls --disable-libssp --with-dwarf2 Thread model: single Supported LTO compression algorithms: zlib gcc version 14.2.0 (GCC) Compilation: avr-gcc -mint8 -Os -fwhole-program -mrelax -Wall -Wextra --save-temps -mmcu=avr25 -DF_CPU=1000000 main.c -o main.elf Error message: /usr/local/avr/lib/gcc/avr/14.2.0/../../../../avr/bin/ld: main.elf-main.o: in function `main': main.c:(.text.startup+0x4): undefined reference to `__builtin_avr_delay_cycles' collect2: error: ld returned 1 exit status