Message ID | ecb04582-5e44-c50f-a5b4-e7c1e1ff0b37@gjlay.de |
---|---|
State | New |
Headers | show |
Series | [avr] New option -nodevicespecs to omit -specs=... in self specs. | expand |
Ping #1 > Hi, currently device support in avr-gcc is accomplished by injecting a > specs file my means of -specs=... in dirver self specs. > > This patch adds a new avr driver option to omit the addition of > respective -specs option so give the user more freedom. > > Ok to apply? > > Johann > > * config/avr/avr.opt (-nodevicespecs): New driver option. > * config/avr/driver-avr.c (avr_devicespecs_file): Only issue > "-specs=device-specs/..." if that option is not set. > * doc/invoke.texi (AVR Options) <-nodevicespecs>: Document. >
Ping #2 > Hi, currently device support in avr-gcc is accomplished by injecting a > specs file my means of -specs=... in dirver self specs. > > This patch adds a new avr driver option to omit the addition of > respective -specs option so give the user more freedom. > > Ok to apply? > > Johann > > * config/avr/avr.opt (-nodevicespecs): New driver option. > * config/avr/driver-avr.c (avr_devicespecs_file): Only issue > "-specs=device-specs/..." if that option is not set. > * doc/invoke.texi (AVR Options) <-nodevicespecs>: Document. >
On Wed, 2019-12-18 at 16:36 +0100, Georg-Johann Lay wrote: > Hi, currently device support in avr-gcc is accomplished by injecting a > specs file my means of -specs=... in dirver self specs. > > This patch adds a new avr driver option to omit the addition of > respective -specs option so give the user more freedom. > > Ok to apply? > > Johann > > * config/avr/avr.opt (-nodevicespecs): New driver option. > * config/avr/driver-avr.c (avr_devicespecs_file): Only issue > "-specs=device-specs/..." if that option is not set. > * doc/invoke.texi (AVR Options) <-nodevicespecs>: Document. OK jeff
Index: config/avr/avr.opt =================================================================== --- config/avr/avr.opt (revision 279522) +++ config/avr/avr.opt (working copy) @@ -118,3 +118,7 @@ Assume that all data in static storage c nodevicelib Driver Target Report RejectNegative Do not link against the device-specific library lib<MCU>.a. + +nodevicespecs +Driver Target Report RejectNegative +Do not use the device-specific specs file device-specs/specs-<MCU>. Index: config/avr/driver-avr.c =================================================================== --- config/avr/driver-avr.c (revision 279522) +++ config/avr/driver-avr.c (working copy) @@ -26,8 +26,8 @@ along with GCC; see the file COPYING3. #include "diagnostic.h" #include "tm.h" -// Remove -nodevicelib from the command line if not needed -#define X_NODEVLIB "%<nodevicelib" +// Remove -nodevicelib and -nodevicespecs from the command line if not needed. +#define X_NODEVLIB "%<nodevicelib %<nodevicespecs" static const char dir_separator_str[] = { DIR_SEPARATOR, 0 }; @@ -102,8 +102,8 @@ avr_devicespecs_file (int argc, const ch return X_NODEVLIB; } - return concat ("-specs=device-specs", dir_separator_str, "specs-", - mmcu, "%s" + return concat ("%{!nodevicespecs:-specs=device-specs", dir_separator_str, + "specs-", mmcu, "%s} %<nodevicespecs" #if defined (WITH_AVRLIBC) " %{mmcu=avr*:" X_NODEVLIB "} %{!mmcu=*:" X_NODEVLIB "}", #else