[v2,06/15] string/strlen: Add mechanism to set function attributes

Message ID 20240527111900.1060546-7-christoph.muellner@vrull.eu
State New
Headers
Series RISC-V: Add Zbb-optimized string routines as ifuncs |

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_glibc_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-arm success Testing passed

Commit Message

Christoph Müllner May 27, 2024, 11:18 a.m. UTC
  This patch introduces the __CODEGEN_ATTRIBUTES macro which can be
used to set function attributes when building the code.

Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
---
 string/strlen.c | 5 +++++
 1 file changed, 5 insertions(+)
  

Patch

diff --git a/string/strlen.c b/string/strlen.c
index a0378c500e..dcf03769d7 100644
--- a/string/strlen.c
+++ b/string/strlen.c
@@ -26,8 +26,13 @@ 
 # define __strlen STRLEN
 #endif
 
+#ifndef __CODEGEN_ATTRIBUTES
+# define __CODEGEN_ATTRIBUTES
+#endif
+
 /* Return the length of the null-terminated string STR.  Scan for
    the null terminator quickly by testing four bytes at a time.  */
+__CODEGEN_ATTRIBUTES
 size_t
 __strlen (const char *str)
 {