diff options
author | davidovski <david@davidovski.xyz> | 2022-05-04 23:52:30 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-05-04 23:52:30 +0100 |
commit | 739c65c54cb0e957df5e9b76f93fb02554e5cac3 (patch) | |
tree | 09ddfa0a342f3ea9de136cb50abdd79821bf1b53 /repo/system/syslinux/0018-prevent-pow-optimization.patch | |
parent | 4c585ad54388285500fd18a6aaa516894e0f2c16 (diff) |
moved everything to new file formatting
Diffstat (limited to 'repo/system/syslinux/0018-prevent-pow-optimization.patch')
-rw-r--r-- | repo/system/syslinux/0018-prevent-pow-optimization.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/repo/system/syslinux/0018-prevent-pow-optimization.patch b/repo/system/syslinux/0018-prevent-pow-optimization.patch new file mode 100644 index 0000000..0c42c7b --- /dev/null +++ b/repo/system/syslinux/0018-prevent-pow-optimization.patch @@ -0,0 +1,36 @@ +From: Lukas Schwaighofer <lukas@schwaighofer.name> +Date: Tue, 26 Feb 2019 23:13:58 +0100 +Subject: Prevent optimizing the pow() function + +With the current GCC 8.2.0 from Debian, a section of code calling pow() in +zzjson_parse.c is turned into a sequence calling exp(). Since no exp() +implementation is available in syslinux those optimizations need to be +disabled. +--- + com32/gpllib/zzjson/zzjson_parse.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/com32/gpllib/zzjson/zzjson_parse.c b/com32/gpllib/zzjson/zzjson_parse.c +index ecb6f61..e66a9d8 100644 +--- a/com32/gpllib/zzjson/zzjson_parse.c ++++ b/com32/gpllib/zzjson/zzjson_parse.c +@@ -138,6 +138,10 @@ static ZZJSON *parse_string2(ZZJSON_CONFIG *config) { + return zzjson; + } + ++static double __attribute__((optimize("O0"))) pow_noopt(double x, double y) { ++ return pow(x, y); ++} ++ + static ZZJSON *parse_number(ZZJSON_CONFIG *config) { + ZZJSON *zzjson; + unsigned long long ival = 0, expo = 0; +@@ -213,7 +217,7 @@ skipexpo: + if (dbl) { + dval = sign * (long long) ival; + dval += sign * frac; +- dval *= pow(10.0, (double) signexpo * expo); ++ dval *= pow_noopt(10.0, (double) signexpo * expo); + } + + zzjson = config->calloc(1, sizeof(ZZJSON)); |