[Bug target/107201] [avr] -nodevicelib not working for devices -mmcu=avr...

2024-01-16 Thread gjl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107201

--- Comment #6 from Georg-Johann Lay  ---
As a work around, one can use an adjusted device-specs file with the
avrlibc_devicelib removed.  The spec looks like this:

*avrlibc_devicelib:
%{!nodevicelib:-lavr128da32}

[Bug target/107201] [avr] -nodevicelib not working for devices -mmcu=avr...

2024-01-16 Thread gjl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107201

Georg-Johann Lay  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
   Target Milestone|--- |13.3
   Priority|P3  |P4
   Keywords|patch   |
 Resolution|--- |FIXED

--- Comment #5 from Georg-Johann Lay  ---
Fixed in v12.4 and v13.3+.

[Bug target/107201] [avr] -nodevicelib not working for devices -mmcu=avr...

2024-01-16 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107201

--- Comment #4 from GCC Commits  ---
The releases/gcc-12 branch has been updated by Georg-Johann Lay
:

https://gcc.gnu.org/g:ebdc3aae0a4705d0b72b69a37fdafa5613343d5d

commit r12-10100-gebdc3aae0a4705d0b72b69a37fdafa5613343d5d
Author: Georg-Johann Lay 
Date:   Mon Jan 15 13:25:59 2024 +0100

AVR: target/107201: Make -nodevicelib work for all devices.

driver-avr.cc contains a spec that discriminates between 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.

(cherry picked from commit 86fac7ee1688bdec245a43f6d2ab49fb238892e4)

[Bug target/107201] [avr] -nodevicelib not working for devices -mmcu=avr...

2024-01-15 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107201

--- Comment #3 from GCC Commits  ---
The releases/gcc-13 branch has been updated by Georg-Johann Lay
:

https://gcc.gnu.org/g:3f6efe203484f7fb29c048d024dd8205e9e0f193

commit r13-8227-g3f6efe203484f7fb29c048d024dd8205e9e0f193
Author: Georg-Johann Lay 
Date:   Mon Jan 15 13:25:59 2024 +0100

AVR: target/107201: Make -nodevicelib work for all devices.

driver-avr.cc contains a spec that discriminates between 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.

(cherry picked from commit 86fac7ee1688bdec245a43f6d2ab49fb238892e4)

[Bug target/107201] [avr] -nodevicelib not working for devices -mmcu=avr...

2024-01-15 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107201

--- Comment #2 from GCC Commits  ---
The master branch has been updated by Georg-Johann Lay :

https://gcc.gnu.org/g:86fac7ee1688bdec245a43f6d2ab49fb238892e4

commit r14-7247-g86fac7ee1688bdec245a43f6d2ab49fb238892e4
Author: Georg-Johann Lay 
Date:   Mon Jan 15 13:25:59 2024 +0100

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.

[Bug target/107201] [avr] -nodevicelib not working for devices -mmcu=avr...

2022-10-11 Thread gjl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107201

--- Comment #1 from Georg-Johann Lay  ---
Created attachment 53691
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53691=edit
pr107201.diff: Proposed patch.

This proposed patch (effectively) sets macro X_NODEVLIB to "" in all of
./config/avr/driver-avr.cc.

-nodevicelib is a known driver option from avr.opt, so there should be no need
to explicitly remove it by hand by means of %