]> git.ipfire.org Git - thirdparty/gcc.git/commit
AVR: target/107201: Make -nodevicelib work for all devices.
authorGeorg-Johann Lay <avr@gjlay.de>
Mon, 15 Jan 2024 12:25:59 +0000 (13:25 +0100)
committerGeorg-Johann Lay <avr@gjlay.de>
Mon, 15 Jan 2024 15:16:19 +0000 (16:16 +0100)
commit86fac7ee1688bdec245a43f6d2ab49fb238892e4
tree7094e5fe2e753b36406620904de2ef421b3b5f7b
parent8414f10ad5bad6d522b72f9ae35e0bb86bb290ea
AVR: target/107201: Make -nodevicelib work for all devices.

driver-avr.cc contains a spec that discriminates bwtween cores
and devices by means of a mmcu=avr* spec pattern.  This does not
work for new devices like AVR128* which also start with mmcu=avr
like all cores do.  The patch uses a new spec function in order to
tell apart cores from devices.

gcc/
PR target/107201
* config/avr/avr.h (EXTRA_SPEC_FUNCTIONS): Add no-devlib, avr_no_devlib.
* config/avr/driver-avr.cc (avr_no_devlib): New function.
(avr_devicespecs_file): Use it to remove -nodevicelib from the
options for cores only.
* config/avr/avr-arch.h (avr_get_parch): New prototype.
* config/avr/avr-devices.cc (avr_get_parch): New function.
gcc/config/avr/avr-arch.h
gcc/config/avr/avr-devices.cc
gcc/config/avr/avr.h
gcc/config/avr/driver-avr.cc