Loading pkgs/development/libraries/qt-5/modules/qtwebengine-gperf-3.2.patch 0 → 100644 +25 −0 Original line number Diff line number Diff line Backported from: <https://github.com/chromium/chromium/commit/f8f21fb4aa01f75acbb12abf5ea8c263c6817141.patch> Original author: Daniel Richard G <iskunk@gmail.com> diff --git a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py index 5ee4905..6c500a0 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py @@ -36,10 +36,13 @@ def generate_gperf(gperf_path, gperf_input, gperf_args): # https://savannah.gnu.org/bugs/index.php?53028 gperf_output = re.sub(r'\bregister ', '', gperf_output) # -Wimplicit-fallthrough needs an explicit fallthrough statement, - # so replace gperf's /*FALLTHROUGH*/ comment with the statement. - # https://savannah.gnu.org/bugs/index.php?53029 - gperf_output = gperf_output.replace('/*FALLTHROUGH*/', - ' FALLTHROUGH;') + # so replace gperf 3.1's /*FALLTHROUGH*/ comment with the statement. + # https://savannah.gnu.org/bugs/index.php?53029 (fixed in 3.2) + if re.search( + r'/\* C\+\+ code produced by gperf version 3\.[01](\.\d+)? \*/', + gperf_output): + gperf_output = gperf_output.replace('/*FALLTHROUGH*/', + ' [[fallthrough]];') # -Wpointer-to-int-cast warns about casting pointers to smaller ints # Replace {(int)(long)&(foo), bar} with # {static_cast<int>(reinterpret_cast<uintptr_t>(&(foo)), bar} pkgs/development/libraries/qt-5/modules/qtwebengine.nix +3 −0 Original line number Diff line number Diff line Loading @@ -219,6 +219,9 @@ qtModule ( hash = "sha256-DcAYOV9b30ogPCiedvQimEmiZpUJquk5j6WLjJxR54U="; extraPrefix = ""; }) # Fix the build with gperf ≥ 3.2 and Clang 19. ./qtwebengine-gperf-3.2.patch ]; postPatch = '' Loading Loading
pkgs/development/libraries/qt-5/modules/qtwebengine-gperf-3.2.patch 0 → 100644 +25 −0 Original line number Diff line number Diff line Backported from: <https://github.com/chromium/chromium/commit/f8f21fb4aa01f75acbb12abf5ea8c263c6817141.patch> Original author: Daniel Richard G <iskunk@gmail.com> diff --git a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py index 5ee4905..6c500a0 100644 --- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py +++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/gperf.py @@ -36,10 +36,13 @@ def generate_gperf(gperf_path, gperf_input, gperf_args): # https://savannah.gnu.org/bugs/index.php?53028 gperf_output = re.sub(r'\bregister ', '', gperf_output) # -Wimplicit-fallthrough needs an explicit fallthrough statement, - # so replace gperf's /*FALLTHROUGH*/ comment with the statement. - # https://savannah.gnu.org/bugs/index.php?53029 - gperf_output = gperf_output.replace('/*FALLTHROUGH*/', - ' FALLTHROUGH;') + # so replace gperf 3.1's /*FALLTHROUGH*/ comment with the statement. + # https://savannah.gnu.org/bugs/index.php?53029 (fixed in 3.2) + if re.search( + r'/\* C\+\+ code produced by gperf version 3\.[01](\.\d+)? \*/', + gperf_output): + gperf_output = gperf_output.replace('/*FALLTHROUGH*/', + ' [[fallthrough]];') # -Wpointer-to-int-cast warns about casting pointers to smaller ints # Replace {(int)(long)&(foo), bar} with # {static_cast<int>(reinterpret_cast<uintptr_t>(&(foo)), bar}
pkgs/development/libraries/qt-5/modules/qtwebengine.nix +3 −0 Original line number Diff line number Diff line Loading @@ -219,6 +219,9 @@ qtModule ( hash = "sha256-DcAYOV9b30ogPCiedvQimEmiZpUJquk5j6WLjJxR54U="; extraPrefix = ""; }) # Fix the build with gperf ≥ 3.2 and Clang 19. ./qtwebengine-gperf-3.2.patch ]; postPatch = '' Loading