aboutsummaryrefslogtreecommitdiff
path: root/include/libc-misc.h
AgeCommit message (Collapse)AuthorFilesLines
2025-01-01Update copyright dates with scripts/update-copyrightsPaul Eggert1-1/+1
2024-12-23Fix build without stack protector [BZ #32494]H.J. Lu1-1/+1
Without stack protector, inhibit_stack_protector is undefined during build: In file included from <command-line>: ./../include/libc-symbols.h:665:3: error: expected ';' before '__typeof' 665 | __typeof (type_name) *name##_ifunc (__VA_ARGS__) \ | ^~~~~~~~ ./../include/libc-symbols.h:676:3: note: in expansion of macro '__ifunc_resolver' 676 | __ifunc_resolver (type_name, name, expr, init, static, __VA_ARGS__) | ^~~~~~~~~~~~~~~~ ./../include/libc-symbols.h:703:3: note: in expansion of macro '__ifunc_args' 703 | __ifunc_args (type_name, name, expr, init, arg) | ^~~~~~~~~~~~ ./../include/libc-symbols.h:790:3: note: in expansion of macro '__ifunc' 790 | __ifunc (redirected_name, name, expr, void, INIT_ARCH) | ^~~~~~~ ../sysdeps/x86_64/multiarch/memchr.c:29:1: note: in expansion of macro 'libc_ifunc_redirected' 29 | libc_ifunc_redirected (__redirect_memchr, memchr, IFUNC_SELECTOR ()); | ^~~~~~~~~~~~~~~~~~~~~ 1. Fix a typo in include/libc-symbols.h to define inhibit_stack_protector for build. 2. Don't include <config.h> in include/libc-symbols.h since it has been included in include/libc-misc.h. 3. Change #include "libc-misc.h" to #include <libc-misc.h> in string/test-string.h. This fixes BZ #32494. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
2024-12-22Add include/libc-misc.hH.J. Lu1-0/+67
Add include/libc-misc.h to provide miscellaneous definitions for both glibc build and test: 1. Move inhibit_stack_protector to libc-misc.h and add Clang support. 2. Add test_inhibit_stack_protector for glibc testing. 3. Move inhibit_loop_to_libcall to libc-misc.h. 4. Add test_cc_inhibit_loop_to_libcall to handle TEST_CC != CC and replace inhibit_loop_to_libcall with test_cc_inhibit_loop_to_libcall in glibc tests. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Co-Authored-By: Adhemerval Zanella <adhemerval.zanella@linaro.org> Reviewed-by: Sam James <sam@gentoo.org>