Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gcc/dist/gcc/config/aarch64 port the -mnative ...



details:   https://anonhg.NetBSD.org/src/rev/3e5a413688ea
branches:  trunk
changeset: 378570:3e5a413688ea
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sat Apr 17 10:19:09 2021 +0000

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

diffstat:

 external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c |  7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diffs (29 lines):

diff -r bdd8e184d0b4 -r 3e5a413688ea external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c
--- a/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c        Sat Apr 17 10:13:09 2021 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/aarch64/driver-aarch64.c        Sat Apr 17 10:19:09 2021 +0000
@@ -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.  */



Home | Main Index | Thread Index | Old Index