]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
AVR: Tabify driver-avr.cc.
authorGeorg-Johann Lay <avr@gjlay.de>
Thu, 18 Jan 2024 10:56:20 +0000 (11:56 +0100)
committerGeorg-Johann Lay <avr@gjlay.de>
Thu, 18 Jan 2024 10:57:09 +0000 (11:57 +0100)
gcc/
* config/avr/driver-avr.cc: Tabify.

gcc/config/avr/driver-avr.cc

index 727f7f00dddef2ef0d2c0940983fc190fe91a98c..92e875a66c9eb48b1e03b9a39ad99d6b4f0c2293 100644 (file)
@@ -40,7 +40,7 @@ static const char dir_separator_str[] = { DIR_SEPARATOR, 0 };
    or core name as supplied by -mmcu=*. When building GCC the path might be
    relative.  */
 
-const char*
+const char *
 avr_devicespecs_file (int argc, const char **argv)
 {
   const char *mmcu = NULL;
@@ -48,29 +48,29 @@ avr_devicespecs_file (int argc, const char **argv)
 #ifdef DEBUG_SPECS
   if (verbose_flag)
     fnotice (stderr, "Running spec function '%s' with %d args\n\n",
-             __FUNCTION__, argc);
+            __FUNCTION__, argc);
 #endif
 
   switch (argc)
     {
     case 0:
       fatal_error (input_location,
-                   "bad usage of spec function %qs", "device-specs-file");
+                  "bad usage of spec function %qs", "device-specs-file");
       return X_NODEVLIB;
 
     case 1:
       if (strcmp ("device-specs", argv[0]) == 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;
-        }
+       {
+         /* 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;
@@ -82,10 +82,10 @@ avr_devicespecs_file (int argc, const char **argv)
 
       for (int i = 2; i < argc; i++)
        if (strcmp (mmcu, argv[i]) != 0)
-          {
-            error ("specified option %qs more than once", "-mmcu");
-            return X_NODEVLIB;
-          }
+         {
+           error ("specified option %qs more than once", "-mmcu");
+           return X_NODEVLIB;
+         }
 
       break;
     }
@@ -94,12 +94,12 @@ avr_devicespecs_file (int argc, const char **argv)
 
   for (const char *s = mmcu; *s; s++)
     if (!ISALNUM (*s)
-        && '-' != *s
-        && '_' != *s)
+       && '-' != *s
+       && '_' != *s)
       {
-        error ("strange device name %qs after %qs: bad character %qc",
-               mmcu, "-mmcu=", *s);
-        return X_NODEVLIB;
+       error ("strange device name %qs after %qs: bad character %qc",
+              mmcu, "-mmcu=", *s);
+       return X_NODEVLIB;
       }
 
   return concat ("%{!nodevicespecs:-specs=device-specs", dir_separator_str,
@@ -112,9 +112,9 @@ avr_devicespecs_file (int argc, const char **argv)
                 // See also PR107201.
                 " %{mmcu=avr*:%:no-devlib(avr%*)} %{!mmcu=*:" X_NODEVLIB "}",
 #else
-                 " " X_NODEVLIB,
+                " " X_NODEVLIB,
 #endif
-                 NULL);
+                NULL);
 }
 
 
@@ -159,30 +159,30 @@ avr_double_lib (int argc, const char **argv)
   for (int i = 0; i < argc; i++)
     {
       if (strcmp (argv[i], "mdouble=32") == 0)
-        {
-          dbl = 32;
+       {
+         dbl = 32;
 #ifdef HAVE_LONG_DOUBLE_IS_DOUBLE
-          ldb = dbl;
+         ldb = dbl;
 #endif
-        }
+       }
       else if (strcmp (argv[i], "mdouble=64") == 0)
-        {
-          ldb = dbl = 64;
-        }
+       {
+         ldb = dbl = 64;
+       }
       else if (strcmp (argv[i], "mlong-double=32") == 0)
-        {
-          ldb = dbl = 32;
-        }
+       {
+         ldb = dbl = 32;
+       }
       else if (strcmp (argv[i], "mlong-double=64") == 0)
-        {
-          ldb = 64;
+       {
+         ldb = 64;
 #ifdef HAVE_LONG_DOUBLE_IS_DOUBLE
-          dbl = ldb;
+         dbl = ldb;
 #endif
-        }
+       }
     }
 
   return concat (" %<mdouble=* -mdouble=", dbl == 32 ? "32" : "64",
-                 " %<mlong-double=* -mlong-double=", ldb == 32 ? "32" : "64",
-                 NULL);
+                " %<mlong-double=* -mlong-double=", ldb == 32 ? "32" : "64",
+                NULL);
 }