diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-02-03 14:45:26 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-02-05 09:22:18 +0000 |
commit | c62908e6a3ecd4d3cde2576f226d669a8299298d (patch) | |
tree | a7ade97b13e405543d53da904d647fcc6f626237 /meta/recipes-devtools/gcc | |
parent | 297c16866097ab82950ac5d3d598e33d5e8fd307 (diff) | |
download | poky-c62908e6a3ecd4d3cde2576f226d669a8299298d.tar.gz |
gcc-6: Sync gcc stddef.h with musl stddef.h
GCC provides some of std* headers including stddef.h
and it syncs with glibc definitions via __needed* defines
to find which datatypes are expected to be defined on top
of glibc. we need same for musl.
Drop unused 0048-ARM-PR-target-71056-Don-t-use-vectorized-builtins-wh.patch
(From OE-Core rev: 7da04721a620ad741ea50adf116e6b5afd47caa5)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc')
3 files changed, 92 insertions, 92 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-6.3.inc b/meta/recipes-devtools/gcc/gcc-6.3.inc index 0b84597a42..0f1b88bea7 100644 --- a/meta/recipes-devtools/gcc/gcc-6.3.inc +++ b/meta/recipes-devtools/gcc/gcc-6.3.inc | |||
@@ -78,6 +78,7 @@ SRC_URI = "\ | |||
78 | file://0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch \ | 78 | file://0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch \ |
79 | file://0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \ | 79 | file://0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \ |
80 | file://0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \ | 80 | file://0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \ |
81 | file://0048-sync-gcc-stddef.h-with-musl.patch \ | ||
81 | ${BACKPORTS} \ | 82 | ${BACKPORTS} \ |
82 | " | 83 | " |
83 | BACKPORTS = "" | 84 | BACKPORTS = "" |
diff --git a/meta/recipes-devtools/gcc/gcc-6.3/0048-ARM-PR-target-71056-Don-t-use-vectorized-builtins-wh.patch b/meta/recipes-devtools/gcc/gcc-6.3/0048-ARM-PR-target-71056-Don-t-use-vectorized-builtins-wh.patch deleted file mode 100644 index 9c39c7f7ad..0000000000 --- a/meta/recipes-devtools/gcc/gcc-6.3/0048-ARM-PR-target-71056-Don-t-use-vectorized-builtins-wh.patch +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | From 84d2a5509892b65ed60d39e6e2f9719e3762e40e Mon Sep 17 00:00:00 2001 | ||
2 | From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Tue, 31 May 2016 08:29:39 +0000 | ||
4 | Subject: [PATCH] [ARM] PR target/71056: Don't use vectorized builtins when | ||
5 | NEON is not available | ||
6 | |||
7 | PR target/71056 | ||
8 | * config/arm/arm-builtins.c (arm_builtin_vectorized_function): Return | ||
9 | NULL_TREE early if NEON is not available. Remove now redundant check | ||
10 | in ARM_CHECK_BUILTIN_MODE. | ||
11 | |||
12 | * gcc.target/arm/pr71056.c: New test. | ||
13 | |||
14 | |||
15 | |||
16 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@236910 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
17 | --- | ||
18 | Upstream-Status: Backport | ||
19 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
20 | |||
21 | gcc/ChangeLog | 7 +++++++ | ||
22 | gcc/config/arm/arm-builtins.c | 6 +++++- | ||
23 | gcc/testsuite/ChangeLog | 5 +++++ | ||
24 | gcc/testsuite/gcc.target/arm/pr71056.c | 32 ++++++++++++++++++++++++++++++++ | ||
25 | 4 files changed, 49 insertions(+), 1 deletion(-) | ||
26 | create mode 100644 gcc/testsuite/gcc.target/arm/pr71056.c | ||
27 | |||
28 | diff --git a/gcc/config/arm/arm-builtins.c b/gcc/config/arm/arm-builtins.c | ||
29 | index 90fb40f..68b2839 100644 | ||
30 | --- a/gcc/config/arm/arm-builtins.c | ||
31 | +++ b/gcc/config/arm/arm-builtins.c | ||
32 | @@ -2861,6 +2861,10 @@ arm_builtin_vectorized_function (unsigned int fn, tree type_out, tree type_in) | ||
33 | int in_n, out_n; | ||
34 | bool out_unsigned_p = TYPE_UNSIGNED (type_out); | ||
35 | |||
36 | + /* Can't provide any vectorized builtins when we can't use NEON. */ | ||
37 | + if (!TARGET_NEON) | ||
38 | + return NULL_TREE; | ||
39 | + | ||
40 | if (TREE_CODE (type_out) != VECTOR_TYPE | ||
41 | || TREE_CODE (type_in) != VECTOR_TYPE) | ||
42 | return NULL_TREE; | ||
43 | @@ -2875,7 +2879,7 @@ arm_builtin_vectorized_function (unsigned int fn, tree type_out, tree type_in) | ||
44 | NULL_TREE is returned if no such builtin is available. */ | ||
45 | #undef ARM_CHECK_BUILTIN_MODE | ||
46 | #define ARM_CHECK_BUILTIN_MODE(C) \ | ||
47 | - (TARGET_NEON && TARGET_FPU_ARMV8 \ | ||
48 | + (TARGET_FPU_ARMV8 \ | ||
49 | && flag_unsafe_math_optimizations \ | ||
50 | && ARM_CHECK_BUILTIN_MODE_1 (C)) | ||
51 | |||
52 | diff --git a/gcc/testsuite/gcc.target/arm/pr71056.c b/gcc/testsuite/gcc.target/arm/pr71056.c | ||
53 | new file mode 100644 | ||
54 | index 0000000..136754e | ||
55 | --- /dev/null | ||
56 | +++ b/gcc/testsuite/gcc.target/arm/pr71056.c | ||
57 | @@ -0,0 +1,32 @@ | ||
58 | +/* PR target/71056. */ | ||
59 | +/* { dg-do compile } */ | ||
60 | +/* { dg-require-effective-target arm_vfp3_ok } */ | ||
61 | +/* { dg-options "-O3 -mfpu=vfpv3" } */ | ||
62 | + | ||
63 | +/* Check that compiling for a non-NEON target doesn't try to introduce | ||
64 | + a NEON vectorized builtin. */ | ||
65 | + | ||
66 | +extern char *buff; | ||
67 | +int f2 (); | ||
68 | +struct T1 | ||
69 | +{ | ||
70 | + int reserved[2]; | ||
71 | + unsigned int ip; | ||
72 | + unsigned short cs; | ||
73 | + unsigned short rsrv2; | ||
74 | +}; | ||
75 | +void | ||
76 | +f3 (const char *p) | ||
77 | +{ | ||
78 | + struct T1 x; | ||
79 | + __builtin_memcpy (&x, p, sizeof (struct T1)); | ||
80 | + x.reserved[0] = __builtin_bswap32 (x.reserved[0]); | ||
81 | + x.reserved[1] = __builtin_bswap32 (x.reserved[1]); | ||
82 | + x.ip = __builtin_bswap32 (x.ip); | ||
83 | + x.cs = x.cs << 8 | x.cs >> 8; | ||
84 | + x.rsrv2 = x.rsrv2 << 8 | x.rsrv2 >> 8; | ||
85 | + if (f2 ()) | ||
86 | + { | ||
87 | + __builtin_memcpy (buff, "\n", 1); | ||
88 | + } | ||
89 | +} | ||
90 | -- | ||
91 | 2.9.0 | ||
92 | |||
diff --git a/meta/recipes-devtools/gcc/gcc-6.3/0048-sync-gcc-stddef.h-with-musl.patch b/meta/recipes-devtools/gcc/gcc-6.3/0048-sync-gcc-stddef.h-with-musl.patch new file mode 100644 index 0000000000..30c158d7da --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-6.3/0048-sync-gcc-stddef.h-with-musl.patch | |||
@@ -0,0 +1,91 @@ | |||
1 | From 10595c03c39b4e980d2a00e16fc84e9caf82292e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 3 Feb 2017 12:56:00 -0800 | ||
4 | Subject: [PATCH 48/48] sync gcc stddef.h with musl | ||
5 | |||
6 | musl defines ptrdiff_t size_t and wchar_t | ||
7 | so dont define them here if musl is definining them | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | Upstream-Status: Pending | ||
12 | |||
13 | gcc/ginclude/stddef.h | 9 +++++++++ | ||
14 | 1 file changed, 9 insertions(+) | ||
15 | |||
16 | diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h | ||
17 | index d711530d053..c315b7a97c1 100644 | ||
18 | --- a/gcc/ginclude/stddef.h | ||
19 | +++ b/gcc/ginclude/stddef.h | ||
20 | @@ -134,6 +134,7 @@ _TYPE_wchar_t; | ||
21 | #ifndef ___int_ptrdiff_t_h | ||
22 | #ifndef _GCC_PTRDIFF_T | ||
23 | #ifndef _PTRDIFF_T_DECLARED /* DragonFly */ | ||
24 | +#ifndef __DEFINED_ptrdiff_t /* musl */ | ||
25 | #define _PTRDIFF_T | ||
26 | #define _T_PTRDIFF_ | ||
27 | #define _T_PTRDIFF | ||
28 | @@ -143,10 +144,12 @@ _TYPE_wchar_t; | ||
29 | #define ___int_ptrdiff_t_h | ||
30 | #define _GCC_PTRDIFF_T | ||
31 | #define _PTRDIFF_T_DECLARED | ||
32 | +#define __DEFINED_ptrdiff_t /* musl */ | ||
33 | #ifndef __PTRDIFF_TYPE__ | ||
34 | #define __PTRDIFF_TYPE__ long int | ||
35 | #endif | ||
36 | typedef __PTRDIFF_TYPE__ ptrdiff_t; | ||
37 | +#endif /* __DEFINED_ptrdiff_t */ | ||
38 | #endif /* _PTRDIFF_T_DECLARED */ | ||
39 | #endif /* _GCC_PTRDIFF_T */ | ||
40 | #endif /* ___int_ptrdiff_t_h */ | ||
41 | @@ -184,6 +187,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; | ||
42 | #ifndef _GCC_SIZE_T | ||
43 | #ifndef _SIZET_ | ||
44 | #ifndef __size_t | ||
45 | +#ifndef __DEFINED_size_t /* musl */ | ||
46 | #define __size_t__ /* BeOS */ | ||
47 | #define __SIZE_T__ /* Cray Unicos/Mk */ | ||
48 | #define _SIZE_T | ||
49 | @@ -200,6 +204,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; | ||
50 | #define ___int_size_t_h | ||
51 | #define _GCC_SIZE_T | ||
52 | #define _SIZET_ | ||
53 | +#define __DEFINED_size_t /* musl */ | ||
54 | #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \ | ||
55 | || defined(__DragonFly__) \ | ||
56 | || defined(__FreeBSD_kernel__) | ||
57 | @@ -235,6 +240,7 @@ typedef long ssize_t; | ||
58 | #endif /* _SIZE_T */ | ||
59 | #endif /* __SIZE_T__ */ | ||
60 | #endif /* __size_t__ */ | ||
61 | +#endif /* __DEFINED_size_t */ | ||
62 | #undef __need_size_t | ||
63 | #endif /* _STDDEF_H or __need_size_t. */ | ||
64 | |||
65 | @@ -264,6 +270,7 @@ typedef long ssize_t; | ||
66 | #ifndef ___int_wchar_t_h | ||
67 | #ifndef __INT_WCHAR_T_H | ||
68 | #ifndef _GCC_WCHAR_T | ||
69 | +#ifndef __DEFINED_wchar_t /* musl */ | ||
70 | #define __wchar_t__ /* BeOS */ | ||
71 | #define __WCHAR_T__ /* Cray Unicos/Mk */ | ||
72 | #define _WCHAR_T | ||
73 | @@ -279,6 +286,7 @@ typedef long ssize_t; | ||
74 | #define __INT_WCHAR_T_H | ||
75 | #define _GCC_WCHAR_T | ||
76 | #define _WCHAR_T_DECLARED | ||
77 | +#define __DEFINED_wchar_t /* musl */ | ||
78 | |||
79 | /* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_ | ||
80 | instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other | ||
81 | @@ -344,6 +352,7 @@ typedef __WCHAR_TYPE__ wchar_t; | ||
82 | #endif | ||
83 | #endif /* __WCHAR_T__ */ | ||
84 | #endif /* __wchar_t__ */ | ||
85 | +#endif /* __DEFINED_wchar_t musl */ | ||
86 | #undef __need_wchar_t | ||
87 | #endif /* _STDDEF_H or __need_wchar_t. */ | ||
88 | |||
89 | -- | ||
90 | 2.11.0 | ||
91 | |||