]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: Add -nodevicespecs option for avr.
authorGeorg-Johann Lay <avr@gjlay.de>
Wed, 8 Jan 2020 09:46:07 +0000 (09:46 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Wed, 8 Jan 2020 09:46:07 +0000 (09:46 +0000)
Backport from 2020-01-08 trunk r279995.

Add -nodevicespecs option for avr.

PR target/93182
* 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.

From-SVN: r279996

gcc/ChangeLog
gcc/config/avr/avr.opt
gcc/config/avr/driver-avr.c
gcc/doc/invoke.texi

index 8118f90bae3a1cc01454bff8a20d108ded7450ce..70fff31239bf399e7bc304151b35374cc4229f84 100644 (file)
@@ -1,3 +1,15 @@
+2020-01-08  Georg-Johann Lay  <avr@gjlay.de>
+
+       Backport from 2020-01-08 trunk r279995.
+
+       Add -nodevicespecs option for avr.
+
+       PR target/93182
+       * 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.
+
 2020-01-06  John David Anglin  <danglin@gcc.gnu.org>
 
        * config/pa/pa.md: Revert change to use ordered_comparison_operator
index 3fc83a2fdb16c64a16f969f323983aeaceec374b..702400d45975543c6e6ef354e31c13e48a85d3cd 100644 (file)
@@ -118,3 +118,7 @@ Assume that all data in static storage can be accessed by LDS / STS.  This optio
 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 7b9e712be6be996cf0eac720ac2138c0a680f8cb..d804ed2cd58a1c181e224a82cbd620fd0240a4c5 100644 (file)
@@ -26,8 +26,8 @@ along with GCC; see the file COPYING3.  If not see
 #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 char **argv)
         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
index 1447ab056df9c4456c0f9151cbc1ce40d1f7412f..7d8c0802c08cef089c91ab4e98273c8ad57af293 100644 (file)
@@ -713,7 +713,7 @@ Objective-C and Objective-C++ Dialects}.
 -mn_flash=@var{size}  -mno-interrupts @gol
 -mmain-is-OS_task  -mrelax  -mrmw  -mstrict-X  -mtiny-stack @gol
 -mfract-convert-truncate @gol
--mshort-calls  -nodevicelib @gol
+-mshort-calls -nodevicelib  -nodevicespecs @gol
 -Waddr-space-convert  -Wmisspelled-isr}
 
 @emph{Blackfin Options}
@@ -18092,6 +18092,13 @@ Allow to use truncation instead of rounding towards zero for fractional fixed-po
 @opindex nodevicelib
 Don't link against AVR-LibC's device specific library @code{lib<mcu>.a}.
 
+@item -nodevicespecs
+@opindex nodevicespecs
+Don't add @option{-specs=device-specs/specs-<mcu>} to the compiler driver's
+command line.  The user takes responsibility for supplying the sub-processes
+like compiler proper, assembler and linker with appropriate command line
+options.
+
 @item -Waddr-space-convert
 @opindex Waddr-space-convert
 @opindex Wno-addr-space-convert