From 73e1414cb829d02baef1bf241d4bdf3805f6f724 Mon Sep 17 00:00:00 2001 From: Martin Sebor Date: Wed, 5 Oct 2016 15:21:40 +0000 Subject: PR bootstrap/77819 - undefined reference to gnu_libc_printf_pointer_format with uClibc gcc/ChangeLog: PR bootstrap/77819 * config/linux.h (TARGET_PRINTF_POINTER_FORMAT): Define macro. * config/linux.c (gnu_libc_printf_pointer_format): Remove. * targhooks.c [DEFAULT_LIBC == LIBC_UCLIBC) && SINGLE_LIBC] (default_printf_pointer_format): Define function. * targhooks.c (linux_printf_pointer_format): Define new function. * targhooks.h (linux_printf_pointer_format): Declare. (gnu_libc_printf_pointer_format): Remove declaration. From-SVN: r240793 --- gcc/config/linux.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'gcc/config/linux.c') diff --git a/gcc/config/linux.c b/gcc/config/linux.c index 9aac38b..a393d3b 100644 --- a/gcc/config/linux.c +++ b/gcc/config/linux.c @@ -24,9 +24,6 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "linux-protos.h" -#undef TARGET_PRINTF_POINTER_FORMAT -#define TARGET_PRINTF_POINTER_FORMAT gnu_libc_printf_pointer_format - bool linux_libc_has_function (enum function_class fn_class) { @@ -40,16 +37,3 @@ linux_libc_has_function (enum function_class fn_class) return false; } - -/* Glibc formats pointers as if by "%zx" except for the null pointer - which outputs "(nil)". It ignores the pound ('#') format flag but - interprets the space and plus flags the same as in the integer - directive. */ - -const char* -gnu_libc_printf_pointer_format (tree arg, const char **flags) -{ - *flags = " +"; - - return arg && integer_zerop (arg) ? "(nil)" : "%#zx"; -} -- cgit v1.1