diff mbox

[avr,committed] : ad PR65296: work around device-specs file + dejagnu for c++.

Message ID 55266627.5000803@gjlay.de
State New
Headers show

Commit Message

Georg-Johann Lay April 9, 2015, 11:44 a.m. UTC
Applied this patch:

http://gcc.gnu.org/r221947


Johann


	* config/avr/driver-avr.c (avr_devicespecs_file): Don't specify a
	device specs file if "device-specs%s" didn't resolve to a path.
diff mbox

Patch

Index: config/avr/driver-avr.c
===================================================================
--- config/avr/driver-avr.c     (revision 221946)
+++ config/avr/driver-avr.c     (working copy)
@@ -80,6 +80,19 @@  avr_devicespecs_file (int argc, const ch
        return X_NODEVLIB;

      case 1:
+      if (0 == strcmp ("device-specs", argv[0]))
+        {
+          /* FIXME:  This means "device-specs%s" from avr.h:DRIVER_SELF_SPECS
+             has not been resolved to a path.  That case can occur when the
+             c++ testsuite is run from the build directory.  DejaGNU's
+             libgloss.exp:get_multilibs runs $compiler without -B, i.e.runs
+             xgcc without specifying a prefix.  Without any prefix, there is
+             no means to find out where the specs files might be located.
+             get_multilibs runs xgcc --print-multi-lib, hence we don't actually
+             need information form a specs file and may skip it here.  */
+          return X_NODEVLIB;
+        }
+
        mmcu = AVR_MMCU_DEFAULT;
        break;