Remove CONFIG_USE_STDINT
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 6 Aug 2018 11:47:38 +0000 (20:47 +0900)
committerTom Rini <trini@konsulko.com>
Tue, 11 Sep 2018 00:48:16 +0000 (20:48 -0400)
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>
README
arch/sandbox/include/asm/types.h
arch/x86/include/asm/types.h
config.mk
include/compiler.h
include/inttypes.h
include/linux/types.h
scripts/config_whitelist.txt
test/stdint/test-includes.sh
tools/buildman/func_test.py

diff --git a/README b/README
index 903d51416e37ef03c1a3cda36963c9458fbaf13c..09822a317da8da4e71f8af460b1d305af4bcd9cd 100644 (file)
--- a/README
+++ b/README
@@ -3015,11 +3015,6 @@ Configuration Settings:
        If defined, don't allow the -f switch to env set override variable
        access flags.
 
-- CONFIG_USE_STDINT
-       If stdint.h is available with your toolchain you can define this
-       option to enable it. You can provide option 'USE_STDINT=1' when
-       building U-Boot to enable this.
-
 The following definitions that deal with the placement and management
 of environment data (variable area); in general, we support the
 following configurations:
index a10b4551fb6de04a16c5dac7621780e1a1903e1b..79c85aa5f64c46943d2b05cd63ca6642ce53d7a3 100644 (file)
@@ -41,13 +41,8 @@ typedef unsigned short u16;
 typedef signed int s32;
 typedef unsigned int u32;
 
-#if !defined(CONFIG_USE_STDINT) || !defined(__INT64_TYPE__)
 typedef signed long long s64;
 typedef unsigned long long u64;
-#else
-typedef __INT64_TYPE__ s64;
-typedef __UINT64_TYPE__ u64;
-#endif
 
 /*
  * Number of bits in a C 'long' on this architecture.
index a47e581fe3ab1f0ae9e046aeed97e5876c2ff448..7649c2bb0cc43b477cbe000803267eed2bbd6841 100644 (file)
@@ -36,13 +36,8 @@ typedef unsigned short u16;
 typedef signed int s32;
 typedef unsigned int u32;
 
-#if !defined(CONFIG_USE_STDINT) || !defined(__INT64_TYPE__)
 typedef signed long long s64;
 typedef unsigned long long u64;
-#else
-typedef __INT64_TYPE__ s64;
-typedef __UINT64_TYPE__ u64;
-#endif
 
 #if CONFIG_IS_ENABLED(X86_64)
 #define BITS_PER_LONG 64
index 78748cc04a9eb63f0ebed8b00ea458047b52a17c..b4e46189822d60b2a60572f5f722e5672d123a43 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -62,11 +62,6 @@ ifdef FTRACE
 PLATFORM_CPPFLAGS += -finstrument-functions -DFTRACE
 endif
 
-# Allow use of stdint.h if available
-ifneq ($(USE_STDINT),)
-PLATFORM_CPPFLAGS += -DCONFIG_USE_STDINT
-endif
-
 #########################################################################
 
 RELFLAGS := $(PLATFORM_RELFLAGS)
index 957f4b5d49a872f4642f0c2d34587a1a0abe1252..29507f9840e0dcbc72ea4c6961b65971f1149bb5 100644 (file)
@@ -120,13 +120,8 @@ typedef unsigned int uint;
 
 #else /* !USE_HOSTCC */
 
-#ifdef CONFIG_USE_STDINT
-/* Provided by gcc. */
-#include <stdint.h>
-#else
 /* Type for `void *' pointers. */
 typedef unsigned long int uintptr_t;
-#endif
 
 #include <linux/string.h>
 #include <linux/types.h>
index ea731ec86898d0564b883038c48f9723217bc18c..b86ad0428ec992df34b000c4da5d8db33be190c8 100644 (file)
@@ -34,19 +34,9 @@ typedef wchar_t __gwchar_t;
    defined if explicitly requested.  */
 #if !defined __cplusplus || defined __STDC_FORMAT_MACROS
 
-#ifdef CONFIG_USE_STDINT
-# if __WORDSIZE == 64
-#  define __PRI64_PREFIX       "l"
-#  define __PRIPTR_PREFIX      "l"
-# else
-#  define __PRI64_PREFIX       "ll"
-#  define __PRIPTR_PREFIX
-# endif
-#else
 /* linux/types.h always uses long long for 64-bit and long for uintptr_t */
 # define __PRI64_PREFIX        "ll"
 # define __PRIPTR_PREFIX       "l"
-#endif
 
 /* Macros for printing format specifiers.  */
 
index 7c33e7adbc2abf1d49adb27ea412b3cb1a9d421f..1f3cd63b8f2265545b8d6bd245b957741b3fb8fa 100644 (file)
@@ -106,8 +106,7 @@ typedef             __u8            uint8_t;
 typedef                __u16           uint16_t;
 typedef                __u32           uint32_t;
 
-#if defined(__GNUC__) && !defined(__STRICT_ANSI__) && \
-       (!defined(CONFIG_USE_STDINT) || !defined(__INT64_TYPE__))
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
 typedef                __u64           uint64_t;
 typedef                __u64           u_int64_t;
 typedef                __s64           int64_t;
@@ -120,12 +119,6 @@ typedef            __s64           int64_t;
 #define aligned_be64 __be64 __aligned(8)
 #define aligned_le64 __le64 __aligned(8)
 
-#if defined(CONFIG_USE_STDINT) && defined(__INT64_TYPE__)
-typedef                __UINT64_TYPE__ uint64_t;
-typedef                __UINT64_TYPE__ u_int64_t;
-typedef                __INT64_TYPE__          int64_t;
-#endif
-
 #ifdef __KERNEL__
 typedef phys_addr_t resource_size_t;
 #endif
index fc37099cbe0e464bfc5a3c6ac802753532ad6f66..30c79a643e4b5f71b42146beffb6e789cd94eb5a 100644 (file)
@@ -4633,7 +4633,6 @@ CONFIG_USE_INTERRUPT
 CONFIG_USE_NOR
 CONFIG_USE_ONENAND_BOARD_INIT
 CONFIG_USE_SPIFLASH
-CONFIG_USE_STDINT
 CONFIG_UTBIPAR_INIT_TBIPA
 CONFIG_U_BOOT_HDR_ADDR
 CONFIG_U_BOOT_HDR_SIZE
index 077bdc73a13619a7b5c338b900038a6078b15926..1db8515e82f7e2a7945e20ddff2ee0a8b01d3cf0 100755 (executable)
@@ -46,10 +46,8 @@ try_test() {
        $cmd
 }
 
-# Run a test with and without CONFIG_USE_STDINT
 try_both() {
        try_test $@
-       try_test $@ -DCONFIG_USE_STDINT
 }
 
 # board arch soc path-to-gcc
index 363db9d8ce2e43e96189e7f31647a69981205f64..119d02cbb2b64a69c0c06cc1556d318acaefb2b2 100644 (file)
@@ -27,7 +27,7 @@ settings_data = '''
 [make-flags]
 src=/home/sjg/c/src
 chroot=/home/sjg/c/chroot
-vboot=USE_STDINT=1 VBOOT_DEBUG=1 MAKEFLAGS_VBOOT=DEBUG=1 CFLAGS_EXTRA_VBOOT=-DUNROLL_LOOPS VBOOT_SOURCE=${src}/platform/vboot_reference
+vboot=VBOOT_DEBUG=1 MAKEFLAGS_VBOOT=DEBUG=1 CFLAGS_EXTRA_VBOOT=-DUNROLL_LOOPS VBOOT_SOURCE=${src}/platform/vboot_reference
 chromeos_coreboot=VBOOT=${chroot}/build/link/usr ${vboot}
 chromeos_daisy=VBOOT=${chroot}/build/daisy/usr ${vboot}
 chromeos_peach=VBOOT=${chroot}/build/peach_pit/usr ${vboot}