)]}'
{
  "commit": "c2b915e2a5cdb2ef79124e1a558f67959c78cc62",
  "tree": "fdd1516d9578b32203e9dbdd8215be2ddf29f5eb",
  "parents": [
    "4ac16d6607c045d2c4fa4b3712eb8f617af09e1b"
  ],
  "author": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Tue May 14 11:29:49 2024 +0100"
  },
  "committer": {
    "name": "Andrew Burgess",
    "email": "aburgess@redhat.com",
    "time": "Tue May 14 16:51:50 2024 +0100"
  },
  "message": "gdb/testsuite: remove unnecessary -Wl,-soname,NAME build flags\n\nWhile working on another patch I needed to pass -Wl,-soname,NAME as a\ncompiler flag.  I initially looked for other tests that did this, and\nfound a few examples, so I copied what they did.\n\nBut when I checked the gdb.log file I noticed that we were actually\ngetting -Wl,-soname passed twice.\n\nI tracked the repeated option to \u0027proc gdb_compile_shlib_1\u0027 in\nlib/gdb.exp.  It turns out that we always add -Wl,-soname when\ncompiling a shared library.\n\nHere\u0027s an example of a build command from gdb.base/prelink.exp:\n\n  builtin_spawn -ignore SIGHUP gcc -fno-stack-protector \\\n    /tmp/build/gdb/testsuite/outputs/gdb.base/prelink/prelink-lib.c.o \\\n    -fdiagnostics-color\u003dnever -shared -g \\\n    -Wl,-soname,prelink.so -Wl,-soname,prelink.so -lm \\\n    -o /tmp/build/gdb/testsuite/outputs/gdb.base/prelink/prelink.so\n\nNotice that \u0027-Wl,-soname,prelink.so\u0027 is repeated.\n\nI believe that all of the places where tests add \u0027-Wl,-soname,NAME\u0027 as\na build option, are unnecessary.\n\nIn this commit I propose we remove them all.\n\nAs part of this change I\u0027ve switched from calling gdb_compile_shlib\ndirectly, to instead call build_executable and adding the \u0027shlib\u0027\nflag.\n\nI\u0027ve tested with gcc and clang and see no changes in the test results\nafter this commit.  All the compile commands still have -Wl,-soname\nadded, but now it\u0027s only added once, from within lib/gdb.exp.\n\nThere should be no change in what is tested after this commit.\n\nApproved-By: Tom Tromey \u003ctom@tromey.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d7f84db4770e2769c5e33734fc4f689e12af5e39",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.base/break-interp.exp",
      "new_id": "98f67eee2278a82ba62a47bc1ddc6d7e929a0686",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.base/break-interp.exp"
    },
    {
      "type": "modify",
      "old_id": "50f7367d9d7f38f4862284d45697d9293d6c05af",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.base/prelink.exp",
      "new_id": "6b4790e6003b211dc08cda7b120fd53e2321cb11",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.base/prelink.exp"
    },
    {
      "type": "modify",
      "old_id": "625f06f3a9dd2a345aea3f33113005a1e353d5e1",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.base/solib-nodir.exp",
      "new_id": "fe3439613dfc71d19ac005c327ce3c075e24dd0d",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.base/solib-nodir.exp"
    },
    {
      "type": "modify",
      "old_id": "182a3f289d3d974d1ea9790ebb9a7f9a002b2a9c",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.threads/tls-sepdebug.exp",
      "new_id": "14a0c45c7d953f870d343bccd9c74a5791e86d4e",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.threads/tls-sepdebug.exp"
    }
  ]
}
