Module Name:    src
Committed By:   mrg
Date:           Sat Apr 17 10:19:09 UTC 2021

Modified Files:
        src/external/gpl3/gcc/dist/gcc/config/aarch64: driver-aarch64.c

Log Message:
port the -mnative support in GCC 10 to netbsd.  (much simpler than 8->9!)


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
    src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c
diff -u src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c:1.11 src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c:1.12
--- src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c:1.11	Sun Apr 11 00:02:13 2021
+++ src/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c	Sat Apr 17 10:19:09 2021
@@ -514,9 +514,6 @@ host_detect_local_cpu (int argc, const c
 	    }
 #endif
 
-	  strncpy(buf, exts.c_str(), sizeof(buf) - 1);
-	  buf[sizeof(buf) - 1] = '\0';
-
           for (i = 0; i < num_exts; i++)
             {
 	      const char *p = aarch64_extensions[i].feat_string;
@@ -530,13 +527,13 @@ host_detect_local_cpu (int argc, const c
 
 	      /* This may be a multi-token feature string.  We need
 		 to match all parts, which could be in any order.  */
-	      size_t len = strlen (buf);
+	      size_t len = strlen (exts.c_str());
 	      do
 		{
 		  const char *end = strchr (p, ' ');
 		  if (end == NULL)
 		    end = strchr (p, '\0');
-		  if (memmem (buf, len, p, end - p) == NULL)
+		  if (memmem (exts.c_str(), len, p, end - p) == NULL)
 		    {
 		      /* Failed to match this token.  Turn off the
 			 features we'd otherwise enable.  */

Reply via email to