summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordenisc <denisc@138bc75d-0d04-0410-961f-82ee72b054a4>2016-08-08 17:37:57 +0000
committerdenisc <denisc@138bc75d-0d04-0410-961f-82ee72b054a4>2016-08-08 17:37:57 +0000
commitd10ec4052c2242ea12bc962fe9b693f5b52fea98 (patch)
tree647f43c08947505a848ee3efe3eab74dc958451f
parenteb571c164fb63229f5d992bab126e1765f77a31a (diff)
downloadgcc-d10ec4052c2242ea12bc962fe9b693f5b52fea98.tar.gz
* config/avr/driver-avr.c (specfiles_doc_url): Remove.
(avr_diagnose_devicespecs_error): Remove. (avr_devicespecs_file): Remove composing absolute path for specfile and its verbose info. Remove conditions to check specs-file, git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239246 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/avr/driver-avr.c65
2 files changed, 17 insertions, 55 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1e9e56cae70..1d1f3594d01 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2016-07-29 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
+
+ * config/avr/driver-avr.c (specfiles_doc_url): Remove.
+ (avr_diagnose_devicespecs_error): Remove.
+ (avr_devicespecs_file): Remove composing absolute path for specfile
+ and its verbose info. Remove conditions to check specs-file,
+
2016-08-08 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/72821
diff --git a/gcc/config/avr/driver-avr.c b/gcc/config/avr/driver-avr.c
index 83ca3736195..8a8fd50449f 100644
--- a/gcc/config/avr/driver-avr.c
+++ b/gcc/config/avr/driver-avr.c
@@ -29,41 +29,18 @@ along with GCC; see the file COPYING3. If not see
static const char dir_separator_str[] = { DIR_SEPARATOR, 0 };
-static const char specfiles_doc_url[] =
- "http://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html";
-
-
-static const char*
-avr_diagnose_devicespecs_error (const char *mcu, const char *filename)
-{
- error ("cannot access device-specs for %qs expected at %qs",
- mcu, filename);
-
- // Inform about natively supported devices and cores.
-
- if (strncmp (mcu, "avr", strlen ("avr")))
- avr_inform_devices ();
-
- avr_inform_core_architectures ();
-
- inform (input_location, "you can provide your own specs files, "
- "see <%s> for details", specfiles_doc_url);
-
- return X_NODEVLIB;
-}
-
/* Implement spec function `device-specs-fileĀ“.
- Compose -specs=<specs-file-name>%s. If everything went well then argv[0]
- is the inflated (absolute) specs directory and argv[1] is a device or
- core name as supplied by -mmcu=*. When building GCC the path might
- be relative. */
+ Validate mcu name given with -mmcu option. Compose
+ -specs=<specs-file-name>%s. If everything went well then argv[0] is the
+ inflated (absolute) first device-specs directory and argv[1] is a device
+ or core name as supplied by -mmcu=*. When building GCC the path might be
+ relative. */
const char*
avr_devicespecs_file (int argc, const char **argv)
{
- char *specfile_name;
const char *mmcu = NULL;
#ifdef DEBUG_SPECS
@@ -111,14 +88,6 @@ avr_devicespecs_file (int argc, const char **argv)
break;
}
- specfile_name = concat (argv[0], dir_separator_str, "specs-", mmcu, NULL);
-
-#ifdef DEBUG_SPECS
- if (verbose_flag)
- fnotice (stderr, "'%s': mmcu='%s'\n'%s': specfile='%s'\n\n",
- __FUNCTION__, mmcu, __FUNCTION__, specfile_name);
-#endif
-
// Filter out silly -mmcu= arguments like "foo bar".
for (const char *s = mmcu; *s; s++)
@@ -131,26 +100,12 @@ avr_devicespecs_file (int argc, const char **argv)
return X_NODEVLIB;
}
- if (/* When building / configuring the compiler we might get a relative path
- as supplied by "-B.". Assume that the specs file exists and MCU is
- a core, not a proper device then, i.e. we have "-mmcu=avr*". */
- (0 == strncmp (mmcu, "avr", strlen ("avr"))
- && specfile_name[0] == '.')
- /* vanilla */
- || (IS_ABSOLUTE_PATH (specfile_name)
- && !access (specfile_name, R_OK)))
- {
- return concat ("-specs=device-specs", dir_separator_str, "specs-", mmcu,
- // Use '%s' instead of the expanded specfile_name. This
- // is the easiest way to handle pathes containing spaces.
- "%s",
+ return concat ("-specs=device-specs", dir_separator_str, "specs-",
+ mmcu, "%s"
#if defined (WITH_AVRLIBC)
- " %{mmcu=avr*:" X_NODEVLIB "} %{!mmcu=*:" X_NODEVLIB "}",
+ " %{mmcu=avr*:" X_NODEVLIB "} %{!mmcu=*:" X_NODEVLIB "}",
#else
- " " X_NODEVLIB,
+ " " X_NODEVLIB,
#endif
- NULL);
- }
-
- return avr_diagnose_devicespecs_error (mmcu, specfile_name);
+ NULL);
}