- Add workaround-gcc-issue-on-i586.patch to circumvent boo#1127564 while it's fixed in gcc - Add %check section to run tests OBS-URL: https://build.opensuse.org/request/show/680643 OBS-URL: https://build.opensuse.org/package/show/multimedia:voice-assistant/sphinxbase?expand=0&rev=7
35 lines
1.3 KiB
Diff
35 lines
1.3 KiB
Diff
From: Antonio Larrosa <alarrosa@suse.com>
|
|
Subject: Workaround a gcc issue on i586
|
|
|
|
This is a workaround to circumvent
|
|
https://bugzilla.opensuse.org/show_bug.cgi?id=1127564
|
|
|
|
Index: sphinxbase-0.8/src/libsphinxbase/util/logmath.c
|
|
===================================================================
|
|
--- sphinxbase-0.8.orig/src/libsphinxbase/util/logmath.c
|
|
+++ sphinxbase-0.8/src/libsphinxbase/util/logmath.c
|
|
@@ -449,7 +449,9 @@ logmath_log(logmath_t *lmath, float64 p)
|
|
if (p <= 0) {
|
|
return lmath->zero;
|
|
}
|
|
- return (int)(log(p) * lmath->inv_log_of_base) >> lmath->t.shift;
|
|
+ double g1 = log(p);
|
|
+ double g3 = g1 * lmath->inv_log_of_base;
|
|
+ return (int)g3 >> lmath->t.shift;
|
|
}
|
|
|
|
float64
|
|
Index: sphinxbase-0.8/include/sphinxbase/logmath.h
|
|
===================================================================
|
|
--- sphinxbase-0.8.orig/include/sphinxbase/logmath.h
|
|
+++ sphinxbase-0.8/include/sphinxbase/logmath.h
|
|
@@ -197,7 +197,7 @@ int logmath_add(logmath_t *lmath, int lo
|
|
* Convert linear floating point number to integer log in base B.
|
|
*/
|
|
SPHINXBASE_EXPORT
|
|
-int logmath_log(logmath_t *lmath, float64 p);
|
|
+int logmath_log(logmath_t *lmath, float64 p) __attribute__((optimize("-O0")));
|
|
|
|
/**
|
|
* Convert integer log in base B to linear floating point.
|