0008-perfetto.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. From b2b7cb0ad63d66fd035ae359a3dd548ab14abfd8 Mon Sep 17 00:00:00 2001
  2. From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  3. Date: Fri, 22 Jul 2022 11:30:53 +0800
  4. Subject: [PATCH] gn: add build flags for riscv64
  5. Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  6. ---
  7. gn/standalone/BUILD.gn | 10 ++++++++++
  8. .../importers/proto/packet_sequence_state.cc | 1 +
  9. 2 files changed, 11 insertions(+)
  10. diff --git a/gn/standalone/BUILD.gn b/gn/standalone/BUILD.gn
  11. index bd3311460..ac7134103 100644
  12. --- a/gn/standalone/BUILD.gn
  13. +++ b/gn/standalone/BUILD.gn
  14. @@ -243,6 +243,16 @@ config("default") {
  15. "-msse4.2",
  16. ]
  17. }
  18. + } else if (target_cpu == "riscv64") {
  19. + cflags += [
  20. + "-mabi=lp64d",
  21. + "-mno-relax",
  22. + "--target=riscv64-linux-gnu",
  23. + ]
  24. + ldflags += [
  25. + "-mno-relax",
  26. + "--target=riscv64-linux-gnu",
  27. + ]
  28. }
  29. if (is_linux) {
  30. diff --git a/src/trace_processor/importers/proto/packet_sequence_state.cc b/src/trace_processor/importers/proto/packet_sequence_state.cc
  31. index 2eb23509c..2bd8cce34 100644
  32. --- a/src/trace_processor/importers/proto/packet_sequence_state.cc
  33. +++ b/src/trace_processor/importers/proto/packet_sequence_state.cc
  34. @@ -14,6 +14,7 @@
  35. * limitations under the License.
  36. */
  37. +#pragma clang diagnostic ignored "-Wunused-private-field"
  38. #include "src/trace_processor/importers/proto/packet_sequence_state.h"
  39. namespace perfetto {
  40. --
  41. 2.30.2