summarylogtreecommitdiffstats
path: root/0021-Add-GCC-built-in-functions.patch
diff options
context:
space:
mode:
Diffstat (limited to '0021-Add-GCC-built-in-functions.patch')
-rw-r--r--0021-Add-GCC-built-in-functions.patch181
1 files changed, 181 insertions, 0 deletions
diff --git a/0021-Add-GCC-built-in-functions.patch b/0021-Add-GCC-built-in-functions.patch
new file mode 100644
index 00000000000..9afd5eabd27
--- /dev/null
+++ b/0021-Add-GCC-built-in-functions.patch
@@ -0,0 +1,181 @@
+From d83bcb77f0610b0c8f560c8275f9638e5b3d805d Mon Sep 17 00:00:00 2001
+From: Sergei Litvin <litvindev@gmail.com>
+Date: Fri, 16 Jun 2017 22:10:08 +0300
+Subject: [PATCH 21/33] Add GCC built-in functions
+
+---
+ src/options.c | 151 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 151 insertions(+)
+
+diff --git a/src/options.c b/src/options.c
+index 555e59e..2c40574 100644
+--- a/src/options.c
++++ b/src/options.c
+@@ -44,6 +44,81 @@ static char *s_standardCOptions[] = {
+ "-Dtypeof(xxx) int",
+ "-D__typeof__(xxx) int",
+ "-D__gnuc_va_list void",
++ "-D__builtin_va_list void",
++ "-D__builtin_va_start(v, l) ",
++ "-D__builtin_va_end(v) ",
++ "-D__builtin_va_arg(v, l) 0",
++ "-D__builtin_va_copy(d, s) ",
++ "-D__builtin_offsetof(a, b) 8",
++ "-D__builtin_types_compatible_p(a, b) 0"
++ "-D__builtin_alloca(size) 0",
++ "-D__builtin_alloca_with_align(size, alignment) 0",
++ "-D__builtin_types_compatible_p(type1, type2) 0",
++ "-D__builtin_call_with_static_chain(call_exp, pointer_exp) 0",
++ "-D__builtin_choose_expr(const_exp, exp1, exp2) exp1",
++ "-D__builtin_complex(real, imag) 0",
++ "-D__builtin_constant_p(exp) 0",
++ "-D__builtin_expect(exp, c) 0",
++ "-D__builtin_trap() ",
++ "-D__builtin_unreachable() ",
++ "-D__builtin_assume_aligned(const void *exp, size_t align, ...) 0",
++ "-D__builtin_LINE() 0",
++ "-D__builtin_FUNCTION() \"__FUNCTION__\"",
++ "-D__builtin_FILE() \"__FILE__\"",
++ "-D__builtin___clear_cache(begin, end) ",
++ "-D__builtin_prefetch(addr, ...) ",
++ "-D__builtin_huge_val() 0",
++ "-D__builtin_huge_valf() 0",
++ "-D__builtin_huge_vall() 0",
++ "-D__builtin_huge_valfn() 0",
++ "-D__builtin_huge_valfnx() 0",
++ "-D__builtin_fpclassify(a, b, c, d, e, ...) 0",
++ "-D__builtin_inf() 0",
++ "-D__builtin_infd32() 0",
++ "-D__builtin_infd64() 0",
++ "-D__builtin_infd128() 0",
++ "-D__builtin_inff() 0",
++ "-D__builtin_infl() 0",
++ "-D__builtin_inffn() 0",
++ "-D__builtin_inffnx() 0",
++ "-D__builtin_isinf_sign(...) 0",
++ "-D__builtin_nan(str) 0",
++ "-D__builtin_nand32(str) 0",
++ "-D__builtin_nand64(str) 0",
++ "-D__builtin_nand128(str) 0",
++ "-D__builtin_nanf(str) 0",
++ "-D__builtin_nanl(str) 0",
++ "-D__builtin_nanfn(str) 0",
++ "-D__builtin_nanfnx(str) 0",
++ "-D__builtin_nans(str) 0",
++ "-D__builtin_nansf(str) 0",
++ "-D__builtin_nansl(str) 0",
++ "-D__builtin_nansfn(str) 0",
++ "-D__builtin_nansfnx(const char *str) 0",
++ "-D__builtin_ffs(x) 0",
++ "-D__builtin_clz(x) 0",
++ "-D__builtin_ctz(x) 0",
++ "-D__builtin_clrsb(x) 0",
++ "-D__builtin_popcount(x) 0",
++ "-D__builtin_parity(x) 0",
++ "-D__builtin_ffsl(x) 0",
++ "-D__builtin_clzl(x) 0",
++ "-D__builtin_ctzl(x) 0",
++ "-D__builtin_clrsbl(x) 0",
++ "-D__builtin_popcountl(x) 0",
++ "-D__builtin_parityl() 0",
++ "-D__builtin_ffsll(x) 0",
++ "-D__builtin_clzll(x) 0",
++ "-D__builtin_ctzll(x) 0",
++ "-D__builtin_clrsbll(x) 0",
++ "-D__builtin_popcountll(x) 0",
++ "-D__builtin_parityll(0) 0",
++ "-D__builtin_powi(x, y) 0",
++ "-D__builtin_powif(x, y) 0",
++ "-D__builtin_powil(x, y) 0",
++ "-D__builtin_bswap16(x) 0",
++ "-D__builtin_bswap32(x) 0",
++ "-D__builtin_bswap64(x) 0",
+ #endif /*SBD*/
+
+ };
+@@ -66,6 +141,82 @@ static char *s_standardCccOptions[] = {
+ "-D__alignof__(xxx) 8",
+ "-Dtypeof(xxx) int",
+ "-D__typeof__(xxx) int",
++ "-D__gnuc_va_list void",
++ "-D__builtin_va_list void",
++ "-D__builtin_va_start(v, l) ",
++ "-D__builtin_va_end(v) ",
++ "-D__builtin_va_arg(v, l) 0",
++ "-D__builtin_va_copy(d, s) ",
++ "-D__builtin_offsetof(a, b) 8",
++ "-D__builtin_types_compatible_p(a, b) 0"
++ "-D__builtin_alloca(size) 0",
++ "-D__builtin_alloca_with_align(size, alignment) 0",
++ "-D__builtin_types_compatible_p(type1, type2) 0",
++ "-D__builtin_call_with_static_chain(call_exp, pointer_exp) 0",
++ "-D__builtin_choose_expr(const_exp, exp1, exp2) exp1",
++ "-D__builtin_complex(real, imag) 0",
++ "-D__builtin_constant_p(exp) 0",
++ "-D__builtin_expect(exp, c) 0",
++ "-D__builtin_trap() ",
++ "-D__builtin_unreachable() ",
++ "-D__builtin_assume_aligned(const void *exp, size_t align, ...) 0",
++ "-D__builtin_LINE() 0",
++ "-D__builtin_FUNCTION() \"__FUNCTION__\"",
++ "-D__builtin_FILE() \"__FILE__\"",
++ "-D__builtin___clear_cache(begin, end) ",
++ "-D__builtin_prefetch(addr, ...) ",
++ "-D__builtin_huge_val() 0",
++ "-D__builtin_huge_valf() 0",
++ "-D__builtin_huge_vall() 0",
++ "-D__builtin_huge_valfn() 0",
++ "-D__builtin_huge_valfnx() 0",
++ "-D__builtin_fpclassify(a, b, c, d, e, ...) 0",
++ "-D__builtin_inf() 0",
++ "-D__builtin_infd32() 0",
++ "-D__builtin_infd64() 0",
++ "-D__builtin_infd128() 0",
++ "-D__builtin_inff() 0",
++ "-D__builtin_infl() 0",
++ "-D__builtin_inffn() 0",
++ "-D__builtin_inffnx() 0",
++ "-D__builtin_isinf_sign(...) 0",
++ "-D__builtin_nan(str) 0",
++ "-D__builtin_nand32(str) 0",
++ "-D__builtin_nand64(str) 0",
++ "-D__builtin_nand128(str) 0",
++ "-D__builtin_nanf(str) 0",
++ "-D__builtin_nanl(str) 0",
++ "-D__builtin_nanfn(str) 0",
++ "-D__builtin_nanfnx(str) 0",
++ "-D__builtin_nans(str) 0",
++ "-D__builtin_nansf(str) 0",
++ "-D__builtin_nansl(str) 0",
++ "-D__builtin_nansfn(str) 0",
++ "-D__builtin_nansfnx(const char *str) 0",
++ "-D__builtin_ffs(x) 0",
++ "-D__builtin_clz(x) 0",
++ "-D__builtin_ctz(x) 0",
++ "-D__builtin_clrsb(x) 0",
++ "-D__builtin_popcount(x) 0",
++ "-D__builtin_parity(x) 0",
++ "-D__builtin_ffsl(x) 0",
++ "-D__builtin_clzl(x) 0",
++ "-D__builtin_ctzl(x) 0",
++ "-D__builtin_clrsbl(x) 0",
++ "-D__builtin_popcountl(x) 0",
++ "-D__builtin_parityl() 0",
++ "-D__builtin_ffsll(x) 0",
++ "-D__builtin_clzll(x) 0",
++ "-D__builtin_ctzll(x) 0",
++ "-D__builtin_clrsbll(x) 0",
++ "-D__builtin_popcountll(x) 0",
++ "-D__builtin_parityll(0) 0",
++ "-D__builtin_powi(x, y) 0",
++ "-D__builtin_powif(x, y) 0",
++ "-D__builtin_powil(x, y) 0",
++ "-D__builtin_bswap16(x) 0",
++ "-D__builtin_bswap32(x) 0",
++ "-D__builtin_bswap64(x) 0",
+ #endif /*SBD*/
+
+ };
+--
+2.18.0
+