]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/65296 ([avr] fix various issues with specs file generation)
authorGeorg-Johann Lay <avr@gjlay.de>
Wed, 11 Mar 2015 18:35:52 +0000 (18:35 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Wed, 11 Mar 2015 18:35:52 +0000 (18:35 +0000)
gcc/
PR target/65296
* configure.ac [avr]: Check as for option -mrmw.
* configure: Regenerate.
* config.in: Regenerate.
* config/avr/driver-avr.c (avr_device_to_as): Don't add -mrmw to
assembler options if not HAVE_AS_AVR_MRMW_OPTION.

From-SVN: r221354

gcc/ChangeLog
gcc/config.in
gcc/config/avr/driver-avr.c
gcc/configure
gcc/configure.ac

index 59ee3fd80cda217225f88255acf747bbd4da0667..19363ac2b594ab85f39f2c1bbd5a2e9b6c4ffc7e 100644 (file)
@@ -1,3 +1,12 @@
+2015-03-11  Georg-Johann Lay  <avr@gjlay.de>
+
+       PR target/65296
+       * configure.ac [avr]: Check as for option -mrmw.
+       * configure: Regenerate.
+       * config.in: Regenerate.
+       * config/avr/driver-avr.c (avr_device_to_as): Don't add -mrmw to
+       assembler options if not HAVE_AS_AVR_MRMW_OPTION.
+
 2015-03-11  Marek Polacek  <polacek@redhat.com>
 
        Backported from mainline
index de4f09017f4e792c1fccfda0a9e72bf87beb23d0..ba3b7fc8bb5cdd6efc46b4de07a6d22cad709474 100644 (file)
 #endif
 
 
+/* Define if your assembler supports -mrmw option. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_AS_AVR_MRMW_OPTION
+#endif
+
+
 /* Define if your assembler supports cmpb. */
 #ifndef USED_FOR_TARGET
 #undef HAVE_AS_CMPB
 #endif
 
 
+/* Define if your assembler supports .module. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_AS_DOT_MODULE
+#endif
+
+
 /* Define if your assembler supports DSPR1 mult. */
 #ifndef USED_FOR_TARGET
 #undef HAVE_AS_DSPR1_MULT
 #endif
 
 
-/* Define if the assembler understands .module. */
-#ifndef USED_FOR_TARGET
-#undef HAVE_AS_DOT_MODULE
-#endif
-
-
 /* Define if your assembler supports the -no-mul-bug-abort option. */
 #ifndef USED_FOR_TARGET
 #undef HAVE_AS_NO_MUL_BUG_ABORT_OPTION
index 76c8b398064f9fb207b880e55dd5fd904b0638b7..2d95f1b797c00f926ad6f47f2603cb415d33e1df 100644 (file)
@@ -60,7 +60,10 @@ avr_device_to_as (int argc, const char **argv)
 
   return concat ("-mmcu=", avr_current_arch->arch_name,
     avr_current_device->dev_attribute & AVR_ERRATA_SKIP ? "" : " -mno-skip-bug",
-    avr_current_device->dev_attribute & AVR_ISA_RMW ? " -mrmw" : "", NULL);
+#ifdef HAVE_AS_AVR_MRMW_OPTION
+    avr_current_device->dev_attribute & AVR_ISA_RMW ? " -mrmw" : "",
+#endif // have as -mrmw
+    NULL);
 }
 
 /* Returns command line parameters to pass to ld.  */
index fbfbdbb53ede38eb7b5ed5d2cfbdbd98303fcc1e..64d0c50c5cec16b31cad8a003aa9bb8c03a00121 100755 (executable)
@@ -24155,6 +24155,39 @@ if test $gcc_cv_as_cris_no_mul_bug = yes; then
 
 $as_echo "#define HAVE_AS_NO_MUL_BUG_ABORT_OPTION 1" >>confdefs.h
 
+fi
+    ;;
+
+  avr-*-*)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -mrmw option" >&5
+$as_echo_n "checking assembler for -mrmw option... " >&6; }
+if test "${gcc_cv_as_avr_mrmw+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  gcc_cv_as_avr_mrmw=no
+  if test x$gcc_cv_as != x; then
+    $as_echo '.text' > conftest.s
+    if { ac_try='$gcc_cv_as $gcc_cv_as_flags -mrmw -o conftest.o conftest.s >&5'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }
+    then
+       gcc_cv_as_avr_mrmw=yes
+    else
+      echo "configure: failed program was" >&5
+      cat conftest.s >&5
+    fi
+    rm -f conftest.o conftest.s
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_avr_mrmw" >&5
+$as_echo "$gcc_cv_as_avr_mrmw" >&6; }
+if test $gcc_cv_as_avr_mrmw = yes; then
+
+$as_echo "#define HAVE_AS_AVR_MRMW_OPTION 1" >>confdefs.h
+
 fi
     ;;
 
index 792e9bb3d65f722b2b99c64997e5ef24017ffee4..8fec18253028aa9c141ee5207a3d3d276f5e90fe 100644 (file)
@@ -3603,6 +3603,13 @@ AS_HELP_STRING([--disable-fix-cortex-a53-835769],
                [Define if your assembler supports the -no-mul-bug-abort option.])])
     ;;
 
+  avr-*-*)
+    gcc_GAS_CHECK_FEATURE([-mrmw option], gcc_cv_as_avr_mrmw,,
+      [-mrmw], [.text],,
+      [AC_DEFINE(HAVE_AS_AVR_MRMW_OPTION, 1,
+               [Define if your assembler supports -mrmw option.])])
+    ;;
+
   sparc*-*-*)
     gcc_GAS_CHECK_FEATURE([.register], gcc_cv_as_sparc_register_op,,,
       [.register %g2, #scratch],,