diff options
author | Zach Clark <zach@ibm.com> | 2019-05-15 16:55:47 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2019-05-30 10:43:19 -0500 |
commit | ff818674b1810fe56f3b7b2440dcf2eeae6798dd (patch) | |
tree | cf959b8b04094a2793d15efc5b0fbb559ec8ca96 /src/include | |
parent | cbac4e3d76af5885331b0e7de2bec53af059f695 (diff) | |
download | talos-hostboot-ff818674b1810fe56f3b7b2440dcf2eeae6798dd.tar.gz talos-hostboot-ff818674b1810fe56f3b7b2440dcf2eeae6798dd.zip |
Make GCOV support work with GCC 8.1 - 8.3
Using GCOV with GCC 8 also requires lcov >= 1.13
Change-Id: Iaa30b1816b8320aff8fe2b8c8c731a186a177d98
RTC: 208351
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/77429
Reviewed-by: Ilya Smirnov <ismirno@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/usr/gcov.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/include/usr/gcov.h b/src/include/usr/gcov.h index 8b506a935..975e755a9 100644 --- a/src/include/usr/gcov.h +++ b/src/include/usr/gcov.h @@ -114,8 +114,10 @@ static_assert(sizeof(gcov_type) == 8, "gcov_type isn't 64 bits for some reason") #if __GNUC__ == 4 && __GNUC_MINOR__ == 9 #define GCOV_COUNTERS 9 +#elif __GNUC__ == 8 && __GNUC_MINOR__ <= 3 +#define GCOV_COUNTERS 9 #else -#error We dont support this compiler yet +#error GCOV implementation does not support this compiler yet #endif /* Structures embedded in coveraged program. The structures generated @@ -332,7 +334,7 @@ void __gcov_module_copychain(gcov_info** const chain_ptr) } #endif -/** Unneeded function but must be defined to compile. +/** Unneeded function but must be defined to link. * * This function appears to be typically used by libgcov.so when instrumented * on a real linux-based system. It can be used to merge counters across @@ -346,4 +348,13 @@ void __gcov_merge_add() while(1); } +/** Unneeded function but must be defined to link. */ + +extern "C" +void __gcov_exit() +{ + MAGIC_INSTRUCTION(MAGIC_BREAK); + while (1); +} + #endif |