diff mbox

[avr,committed] Fix PR81754

Message ID 8fff362e-66c4-c6be-9608-cbf247d752a9@gjlay.de
State New
Headers show

Commit Message

Georg-Johann Lay Aug. 14, 2017, 9:58 a.m. UTC
https://gcc.gnu.org/r251085

Fixed mentioned avr build hiccup that occurs when used with
Binutils < 2.29.

Johann

	PR target/81754
	PR target/81268
	* config/avr/avr.opt (mgas-isr-prologues): New Var
	avr_gasisr_prologues.
	* config/avr/avr.md (gasisr, *gasisr): Use it instead of
	TARGET_GASISR_PROLOGUES.
	* config/avr/avr.c (avr_option_override): Same.
	(avr_pass_pre_proep::execute): Same.
diff mbox

Patch

Index: config/avr/avr.c
===================================================================
--- config/avr/avr.c	(revision 251082)
+++ config/avr/avr.c	(working copy)
@@ -777,7 +777,7 @@  avr_option_override (void)
     warning (OPT_fPIE, "-fPIE is not supported");
 
 #if !defined (HAVE_AS_AVR_MGCCISR_OPTION)
-  TARGET_GASISR_PROLOGUES = 0;
+  avr_gasisr_prologues = 0;
 #endif
 
   if (!avr_set_core_architecture())
@@ -1459,7 +1459,7 @@  public:
 
   virtual unsigned int execute (function *fun)
   {
-    if (TARGET_GASISR_PROLOGUES
+    if (avr_gasisr_prologues
         // Whether this function is an ISR worth scanning at all.
         && !fun->machine->is_no_gccisr
         && (fun->machine->is_interrupt
Index: config/avr/avr.md
===================================================================
--- config/avr/avr.md	(revision 251082)
+++ config/avr/avr.md	(working copy)
@@ -5819,7 +5819,7 @@  (define_expand "gasisr"
               (set (match_dup 2)
                    (unspec_volatile:BLK [(match_dup 2)]
                                         UNSPECV_MEMORY_BARRIER))])]
-  "TARGET_GASISR_PROLOGUES"
+  "avr_gasisr_prologues"
   {
     operands[2] = gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (Pmode));
     MEM_VOLATILE_P (operands[2]) = 1;
@@ -5833,7 +5833,7 @@  (define_insn "*gasisr"
         (unspec_volatile:HI [(reg:HI REG_SP)] UNSPECV_GASISR))
    (set (match_operand:BLK 2)
         (unspec_volatile:BLK [(match_dup 2)] UNSPECV_MEMORY_BARRIER))]
-  "TARGET_GASISR_PROLOGUES"
+  "avr_gasisr_prologues"
   "__gcc_isr %0"
   [(set_attr "length" "6,5")
    (set_attr "cc" "clobber")])
Index: config/avr/avr.opt
===================================================================
--- config/avr/avr.opt	(revision 251082)
+++ config/avr/avr.opt	(working copy)
@@ -27,7 +27,7 @@  Target RejectNegative Joined Var(avr_mmc
 -mmcu=MCU	Select the target MCU.
 
 mgas-isr-prologues
-Target Report Mask(GASISR_PROLOGUES)
+Target Report Var(avr_gasisr_prologues) UInteger Init(0)
 Allow usage of __gcc_isr pseudo instructions in ISR prologues and epilogues.
 
 mn-flash=