From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1F2D93841889; Mon, 10 Oct 2022 14:38:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1F2D93841889 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665412681; bh=wRdVB1uSGgeqPO73Mt5ApAJOU+6safBCnXIFN+I9eTc=; h=From:To:Subject:Date:From; b=J48WlIx8K9Ad1cUj9Eqz9LOnjPmphn8JssxZ+yjXqV+xHEwuUo/nGm8R9VpXgkF1b o3FbpjDJX55TYSyriXhWCXdalvrjqar8UjdEqVKa07ZrDwSlxAe01Hhb1gluAtCKnJ fQKllr1ustzXUgKX7BTYJI8K0I/SqWVEDJIBIMGk= From: "gjl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/107201] New: [avr] -nodevicelib not working for devices -mmcu=avr... Date: Mon, 10 Oct 2022 14:37:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gjl at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107201 Bug ID: 107201 Summary: [avr] -nodevicelib not working for devices -mmcu=3Davr... 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 when a device is specified as -mmcu=3D. This is useful if such a library is not avilable. This is achieved by the following spec in the device-specs file specs-: *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=3Davr* is a device *family* like avr25 or avrx= mega2 etc.: #if defined (WITH_AVRLIBC) " %{mmcu=3Davr*:" X_NODEVLIB "} %{!mmcu=3D*:" X_NODEVLIB "= }", #else where X_NODEVLIB resolves to "%