)]}'
{
  "commit": "77252bf26e98bda49baffc2657bd99143e1c7626",
  "tree": "869b7066cea9501daae69b61babe6046188e55d1",
  "parents": [
    "b0b8879e292218bfb27584515e98a46379c9c666"
  ],
  "author": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Mon Oct 04 18:51:09 2021 +0200"
  },
  "committer": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Mon Oct 04 18:51:09 2021 +0200"
  },
  "message": "[gdb/build] Add CXX_DIALECT to CXX\n\nSay we use a gcc version that (while supporting c++11) does not support c++11\nby default, and needs an -std setting to enable it.\n\nIf gdb would use the default AX_CXX_COMPILE_STDCXX from autoconf-archive, then\nwe\u0027d have:\n...\nCXX\u003d\"g++ -std\u003dgnu++11\"\n...\n\nThat mechanism however has the following problem (quoting from commit\n0bcda685399):\n...\nthe top level Makefile passes CXX down to subdirs, and that overrides whatever\ngdb/Makefile may set CXX to.  The result would be that a make invocation from\nthe build/gdb/ directory would use \"g++ -std\u003dgnu++11\" as expected, while a\nmake invocation at the top level would not.\n...\n\nCommit 0bcda685399 fixes this by using a custom AX_CXX_COMPILE_STDCXX which\ndoes:\n...\nCXX\u003dg++\nCXX_DIALECT\u003d-std\u003dgnu++11\n...\n\nThe problem reported in PR28318 is that using the custom instead of the\ndefault AX_CXX_COMPILE_STDCXX makes the configure test for std::thread\nsupport fail.\n\nWe could simply add $CXX_DIALECT to the test for std::thread support, but\nthat would have to be repeated for each added c++ support test.\n\nInstead, fix this by doing:\n...\nCXX\u003d\"g++ -std\u003dgnu++11\"\nCXX_DIALECT\u003d-std\u003dgnu++11\n...\n\nThis is somewhat awkward, since it results in -std\u003dgnu++11 occuring twice in\nsome situations:\n...\n$ touch src/gdb/dwarf2/read.c\n$ ( cd build/gdb; make V\u003d1 dwarf2/read.o )\ng++-4.8 -std\u003dgnu++11 -x c++ -std\u003dgnu++11 ...\n...\n\nHowever, both settings are needed:\n - the switch in CXX for the std::thread tests (and other tests)\n - the switch in CXX_DIALECT so it can be appended in Makefiles, to\n   counteract the fact that the top-level Makefile overrides CXX\n\nThe code added in gdb/ax_cxx_compile_stdcxx.m4 is copied from the default\nAX_CXX_COMPILE_STDCXX from autoconf-archive.\n\nTested on x86_64-linux.\n\nBug: https://sourceware.org/bugzilla/show_bug.cgi?id\u003d28318\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "413755a2e886c69ae8eff75cadb9db5390cf0cb6",
      "old_mode": 33188,
      "old_path": "gdb/ax_cxx_compile_stdcxx.m4",
      "new_id": "29d8e10bcc4017624d468d4820589cee0fbfacb3",
      "new_mode": 33188,
      "new_path": "gdb/ax_cxx_compile_stdcxx.m4"
    },
    {
      "type": "modify",
      "old_id": "7c8335f2576e5ca3a126dab42b0df03d5b1817bf",
      "old_mode": 33261,
      "old_path": "gdb/configure",
      "new_id": "1876cbfefa43090eca2c9cfce9899fe4ce7a9a6b",
      "new_mode": 33261,
      "new_path": "gdb/configure"
    },
    {
      "type": "modify",
      "old_id": "b227167e270c0ca2cbed6e0f333d39b7e5b05705",
      "old_mode": 33261,
      "old_path": "gdbserver/configure",
      "new_id": "f05c1a9b9761e47144b37150ef38eebcbebdf642",
      "new_mode": 33261,
      "new_path": "gdbserver/configure"
    },
    {
      "type": "modify",
      "old_id": "08800228aa59e339dcd54f8b60006de4169afdfa",
      "old_mode": 33261,
      "old_path": "gdbsupport/configure",
      "new_id": "f13ae76641f99e3c6a88366830b7adb4463c4976",
      "new_mode": 33261,
      "new_path": "gdbsupport/configure"
    }
  ]
}
