Browse Source

Remove CONFIG_USE_STDINT

You do not need to use the typedefs provided by compiler.

Our compilers are either IPL32 or LP64.  Hence, U-Boot can/should
always use int-ll64.h typedefs like Linux kernel, whatever the
typedefs the compiler internally uses.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Masahiro Yamada 3 years ago
parent
commit
9865543ae6

+ 0 - 5
README

@@ -3015,11 +3015,6 @@ Configuration Settings:
3015 3015
 	If defined, don't allow the -f switch to env set override variable
3016 3016
 	access flags.
3017 3017
 
3018
-- CONFIG_USE_STDINT
3019
-	If stdint.h is available with your toolchain you can define this
3020
-	option to enable it. You can provide option 'USE_STDINT=1' when
3021
-	building U-Boot to enable this.
3022
-
3023 3018
 The following definitions that deal with the placement and management
3024 3019
 of environment data (variable area); in general, we support the
3025 3020
 following configurations:

+ 0 - 5
arch/sandbox/include/asm/types.h

@@ -41,13 +41,8 @@ typedef unsigned short u16;
41 41
 typedef signed int s32;
42 42
 typedef unsigned int u32;
43 43
 
44
-#if !defined(CONFIG_USE_STDINT) || !defined(__INT64_TYPE__)
45 44
 typedef signed long long s64;
46 45
 typedef unsigned long long u64;
47
-#else
48
-typedef __INT64_TYPE__ s64;
49
-typedef __UINT64_TYPE__ u64;
50
-#endif
51 46
 
52 47
 /*
53 48
  * Number of bits in a C 'long' on this architecture.

+ 0 - 5
arch/x86/include/asm/types.h

@@ -36,13 +36,8 @@ typedef unsigned short u16;
36 36
 typedef signed int s32;
37 37
 typedef unsigned int u32;
38 38
 
39
-#if !defined(CONFIG_USE_STDINT) || !defined(__INT64_TYPE__)
40 39
 typedef signed long long s64;
41 40
 typedef unsigned long long u64;
42
-#else
43
-typedef __INT64_TYPE__ s64;
44
-typedef __UINT64_TYPE__ u64;
45
-#endif
46 41
 
47 42
 #if CONFIG_IS_ENABLED(X86_64)
48 43
 #define BITS_PER_LONG 64

+ 0 - 5
config.mk

@@ -62,11 +62,6 @@ ifdef FTRACE
62 62
 PLATFORM_CPPFLAGS += -finstrument-functions -DFTRACE
63 63
 endif
64 64
 
65
-# Allow use of stdint.h if available
66
-ifneq ($(USE_STDINT),)
67
-PLATFORM_CPPFLAGS += -DCONFIG_USE_STDINT
68
-endif
69
-
70 65
 #########################################################################
71 66
 
72 67
 RELFLAGS := $(PLATFORM_RELFLAGS)

+ 0 - 5
include/compiler.h

@@ -120,13 +120,8 @@ typedef unsigned int uint;
120 120
 
121 121
 #else /* !USE_HOSTCC */
122 122
 
123
-#ifdef CONFIG_USE_STDINT
124
-/* Provided by gcc. */
125
-#include <stdint.h>
126
-#else
127 123
 /* Type for `void *' pointers. */
128 124
 typedef unsigned long int uintptr_t;
129
-#endif
130 125
 
131 126
 #include <linux/string.h>
132 127
 #include <linux/types.h>

+ 0 - 10
include/inttypes.h

@@ -34,19 +34,9 @@ typedef wchar_t __gwchar_t;
34 34
    defined if explicitly requested.  */
35 35
 #if !defined __cplusplus || defined __STDC_FORMAT_MACROS
36 36
 
37
-#ifdef CONFIG_USE_STDINT
38
-# if __WORDSIZE == 64
39
-#  define __PRI64_PREFIX	"l"
40
-#  define __PRIPTR_PREFIX	"l"
41
-# else
42
-#  define __PRI64_PREFIX	"ll"
43
-#  define __PRIPTR_PREFIX
44
-# endif
45
-#else
46 37
 /* linux/types.h always uses long long for 64-bit and long for uintptr_t */
47 38
 # define __PRI64_PREFIX	"ll"
48 39
 # define __PRIPTR_PREFIX	"l"
49
-#endif
50 40
 
51 41
 /* Macros for printing format specifiers.  */
52 42
 

+ 1 - 8
include/linux/types.h

@@ -106,8 +106,7 @@ typedef		__u8		uint8_t;
106 106
 typedef		__u16		uint16_t;
107 107
 typedef		__u32		uint32_t;
108 108
 
109
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__) && \
110
-	(!defined(CONFIG_USE_STDINT) || !defined(__INT64_TYPE__))
109
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
111 110
 typedef		__u64		uint64_t;
112 111
 typedef		__u64		u_int64_t;
113 112
 typedef		__s64		int64_t;
@@ -120,12 +119,6 @@ typedef		__s64		int64_t;
120 119
 #define aligned_be64 __be64 __aligned(8)
121 120
 #define aligned_le64 __le64 __aligned(8)
122 121
 
123
-#if defined(CONFIG_USE_STDINT) && defined(__INT64_TYPE__)
124
-typedef		__UINT64_TYPE__	uint64_t;
125
-typedef		__UINT64_TYPE__	u_int64_t;
126
-typedef		__INT64_TYPE__		int64_t;
127
-#endif
128
-
129 122
 #ifdef __KERNEL__
130 123
 typedef phys_addr_t resource_size_t;
131 124
 #endif

+ 0 - 1
scripts/config_whitelist.txt

@@ -4633,7 +4633,6 @@ CONFIG_USE_INTERRUPT
4633 4633
 CONFIG_USE_NOR
4634 4634
 CONFIG_USE_ONENAND_BOARD_INIT
4635 4635
 CONFIG_USE_SPIFLASH
4636
-CONFIG_USE_STDINT
4637 4636
 CONFIG_UTBIPAR_INIT_TBIPA
4638 4637
 CONFIG_U_BOOT_HDR_ADDR
4639 4638
 CONFIG_U_BOOT_HDR_SIZE

+ 0 - 2
test/stdint/test-includes.sh

@@ -46,10 +46,8 @@ try_test() {
46 46
 	$cmd
47 47
 }
48 48
 
49
-# Run a test with and without CONFIG_USE_STDINT
50 49
 try_both() {
51 50
 	try_test $@
52
-	try_test $@ -DCONFIG_USE_STDINT
53 51
 }
54 52
 
55 53
 # board arch soc path-to-gcc

+ 1 - 1
tools/buildman/func_test.py

@@ -27,7 +27,7 @@ settings_data = '''
27 27
 [make-flags]
28 28
 src=/home/sjg/c/src
29 29
 chroot=/home/sjg/c/chroot
30
-vboot=USE_STDINT=1 VBOOT_DEBUG=1 MAKEFLAGS_VBOOT=DEBUG=1 CFLAGS_EXTRA_VBOOT=-DUNROLL_LOOPS VBOOT_SOURCE=${src}/platform/vboot_reference
30
+vboot=VBOOT_DEBUG=1 MAKEFLAGS_VBOOT=DEBUG=1 CFLAGS_EXTRA_VBOOT=-DUNROLL_LOOPS VBOOT_SOURCE=${src}/platform/vboot_reference
31 31
 chromeos_coreboot=VBOOT=${chroot}/build/link/usr ${vboot}
32 32
 chromeos_daisy=VBOOT=${chroot}/build/daisy/usr ${vboot}
33 33
 chromeos_peach=VBOOT=${chroot}/build/peach_pit/usr ${vboot}