From c73f9b2f08fec6692c1396ad9a8910277afe0b18 Mon Sep 17 00:00:00 2001 From: Junkyeong Kim Date: Fri, 11 Oct 2024 19:13:52 +0900 Subject: haltest: Support new gcc version gcov Change-Id: I5a195695ca7338a62d833c18ac37cc069e1f8957 Signed-off-by: Junkyeong Kim --- haltests/tc_main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/haltests/tc_main.cpp b/haltests/tc_main.cpp index 7545995..b01d3ab 100644 --- a/haltests/tc_main.cpp +++ b/haltests/tc_main.cpp @@ -32,6 +32,13 @@ #ifdef TIZEN_TEST_GCOV extern "C" void __gcov_flush(void); +#if (defined(__GNUC__) && ((__GNUC__ == 11 && __GNUC_MINOR__ >= 1) || (__GNUC__ >= 12))) \ || (defined(__clang__) && (__clang_major__ >= 12)) +extern void __gcov_dump(void); +extern void __gcov_reset(void); +#define __gcov_flush() do { __gcov_dump(); __gcov_reset(); } while (0) +#else +extern void __gcov_flush(void); +#endif #endif int main(int argc, char **argv) -- cgit v1.2.3