public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/107201] New: [avr] -nodevicelib not working for devices -mmcu=avr...
@ 2022-10-10 14:37 gjl at gcc dot gnu.org
  2022-10-11 17:25 ` [Bug target/107201] " gjl at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: gjl at gcc dot gnu.org @ 2022-10-10 14:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107201

            Bug ID: 107201
           Summary: [avr] -nodevicelib not working for devices
                    -mmcu=avr...
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gjl at gcc dot gnu.org
  Target Milestone: ---

The -nodevicelib option can be used so that the executable is not linked
against -l<device> when a device is specified as -mmcu=<device>.  This is
useful if such a library is not avilable.

This is achieved by the following spec in the device-specs file specs-<device>:

*avrlibc_devicelib:
        %{!nodevicelib:-lavr64dd64}

However, in a spec function, the driver in
./gcc/config/avr/driver-avr.c[c]::avr_devicespecs_file() removes that option
because it thinks that -mmcu=avr* is a device *family* like avr25 or avrxmega2
etc.:

#if defined (WITH_AVRLIBC)
                 " %{mmcu=avr*:" X_NODEVLIB "} %{!mmcu=*:" X_NODEVLIB "}",
#else

where X_NODEVLIB resolves to "%<nodevicelib %<nodevicespecs"

This means that -nodevicelib is removed also for -mmcu=avr* devices, not only
for -mmcu=avr* cores.

All this worked because up to now, no AVR devices where named "avr*", so that
"avr*" worked to identify cores.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-01-16  8:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-10 14:37 [Bug target/107201] New: [avr] -nodevicelib not working for devices -mmcu=avr gjl at gcc dot gnu.org
2022-10-11 17:25 ` [Bug target/107201] " gjl at gcc dot gnu.org
2024-01-15 15:17 ` cvs-commit at gcc dot gnu.org
2024-01-16  7:42 ` cvs-commit at gcc dot gnu.org
2024-01-16  8:16 ` cvs-commit at gcc dot gnu.org
2024-01-16  8:18 ` gjl at gcc dot gnu.org
2024-01-16  8:40 ` gjl at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).