diff options
author | Daniel Isaksen <d@duniel.no> | 2019-06-08 16:08:28 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-06-10 09:21:58 +0000 |
commit | 0ab839af36e71914fb2da45786aa2d88fbe033cf (patch) | |
tree | f6adc2209da2836955b339c5c48d860d5b89ad70 | |
parent | c0d166d5b136bc5aca00381cd0d30c180f0c888b (diff) | |
download | alpine_aports-0ab839af36e71914fb2da45786aa2d88fbe033cf.tar.bz2 alpine_aports-0ab839af36e71914fb2da45786aa2d88fbe033cf.tar.xz alpine_aports-0ab839af36e71914fb2da45786aa2d88fbe033cf.zip |
main/syslinux: Apply Debian's patch to fix HDT.
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.
Closes #10546
-rw-r--r-- | main/syslinux/0018-prevent-pow-optimization.patch | 36 | ||||
-rw-r--r-- | main/syslinux/APKBUILD | 6 |
2 files changed, 40 insertions, 2 deletions
diff --git a/main/syslinux/0018-prevent-pow-optimization.patch b/main/syslinux/0018-prevent-pow-optimization.patch new file mode 100644 index 0000000000..0c42c7bbb3 --- /dev/null +++ b/main/syslinux/0018-prevent-pow-optimization.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From: Lukas Schwaighofer <lukas@schwaighofer.name> | ||
2 | Date: Tue, 26 Feb 2019 23:13:58 +0100 | ||
3 | Subject: Prevent optimizing the pow() function | ||
4 | |||
5 | With the current GCC 8.2.0 from Debian, a section of code calling pow() in | ||
6 | zzjson_parse.c is turned into a sequence calling exp(). Since no exp() | ||
7 | implementation is available in syslinux those optimizations need to be | ||
8 | disabled. | ||
9 | --- | ||
10 | com32/gpllib/zzjson/zzjson_parse.c | 6 +++++- | ||
11 | 1 file changed, 5 insertions(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/com32/gpllib/zzjson/zzjson_parse.c b/com32/gpllib/zzjson/zzjson_parse.c | ||
14 | index ecb6f61..e66a9d8 100644 | ||
15 | --- a/com32/gpllib/zzjson/zzjson_parse.c | ||
16 | +++ b/com32/gpllib/zzjson/zzjson_parse.c | ||
17 | @@ -138,6 +138,10 @@ static ZZJSON *parse_string2(ZZJSON_CONFIG *config) { | ||
18 | return zzjson; | ||
19 | } | ||
20 | |||
21 | +static double __attribute__((optimize("O0"))) pow_noopt(double x, double y) { | ||
22 | + return pow(x, y); | ||
23 | +} | ||
24 | + | ||
25 | static ZZJSON *parse_number(ZZJSON_CONFIG *config) { | ||
26 | ZZJSON *zzjson; | ||
27 | unsigned long long ival = 0, expo = 0; | ||
28 | @@ -213,7 +217,7 @@ skipexpo: | ||
29 | if (dbl) { | ||
30 | dval = sign * (long long) ival; | ||
31 | dval += sign * frac; | ||
32 | - dval *= pow(10.0, (double) signexpo * expo); | ||
33 | + dval *= pow_noopt(10.0, (double) signexpo * expo); | ||
34 | } | ||
35 | |||
36 | zzjson = config->calloc(1, sizeof(ZZJSON)); | ||
diff --git a/main/syslinux/APKBUILD b/main/syslinux/APKBUILD index c6ada9b092..06806bf17a 100644 --- a/main/syslinux/APKBUILD +++ b/main/syslinux/APKBUILD | |||
@@ -1,7 +1,7 @@ | |||
1 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> | 1 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> |
2 | pkgname=syslinux | 2 | pkgname=syslinux |
3 | pkgver=6.04_pre1 | 3 | pkgver=6.04_pre1 |
4 | pkgrel=2 | 4 | pkgrel=3 |
5 | _ver=${pkgver/_/-} | 5 | _ver=${pkgver/_/-} |
6 | pkgdesc="Boot loader for the Linux operating system" | 6 | pkgdesc="Boot loader for the Linux operating system" |
7 | url="http://syslinux.org" | 7 | url="http://syslinux.org" |
@@ -17,6 +17,7 @@ ldpath="/usr/share/syslinux" | |||
17 | source="https://www.kernel.org/pub/linux/utils/boot/syslinux/Testing/${pkgver%_pre*}/syslinux-$_ver.tar.xz | 17 | source="https://www.kernel.org/pub/linux/utils/boot/syslinux/Testing/${pkgver%_pre*}/syslinux-$_ver.tar.xz |
18 | update-extlinux.conf | 18 | update-extlinux.conf |
19 | update-extlinux | 19 | update-extlinux |
20 | 0018-prevent-pow-optimization.patch | ||
20 | " | 21 | " |
21 | subpackages="$pkgname-doc $pkgname-dev" | 22 | subpackages="$pkgname-doc $pkgname-dev" |
22 | 23 | ||
@@ -57,4 +58,5 @@ package() { | |||
57 | 58 | ||
58 | sha512sums="7927dd39be8e2dcf4138a6fea33def67d19d938379d694f15b48fdd2f5924c028b7a9e7bd71d0c7c6630c203e9e2a54296628e530632ad5e6f55b1ebefe8fc98 syslinux-6.04-pre1.tar.xz | 59 | sha512sums="7927dd39be8e2dcf4138a6fea33def67d19d938379d694f15b48fdd2f5924c028b7a9e7bd71d0c7c6630c203e9e2a54296628e530632ad5e6f55b1ebefe8fc98 syslinux-6.04-pre1.tar.xz |
59 | c3ff809f9cd60aa8a837d9508e6fcd08204b03cd8a9df86ab42fc6a8fe68784416b359b46378fb0a8f4163bbcbe444957e0e5751c30ff4631d4677eaa94874f4 update-extlinux.conf | 60 | c3ff809f9cd60aa8a837d9508e6fcd08204b03cd8a9df86ab42fc6a8fe68784416b359b46378fb0a8f4163bbcbe444957e0e5751c30ff4631d4677eaa94874f4 update-extlinux.conf |
60 | bfeb911507c079c8b01027a7823e562d81100b1fcd0786c707ad33c5ce18fa0eb6d6db34bc7b6cbbc419248188970cebe8286345f4aa3662d16644c51f50b98c update-extlinux" | 61 | bfeb911507c079c8b01027a7823e562d81100b1fcd0786c707ad33c5ce18fa0eb6d6db34bc7b6cbbc419248188970cebe8286345f4aa3662d16644c51f50b98c update-extlinux |
62 | 92fa48133ef702092d7acafae0e0e20f9355cd2b5fe199b96fcccba5a1e688c360de4d069391815255f5493228ad03998d20b99748323396d20d12a1f27c60cd 0018-prevent-pow-optimization.patch" | ||