fix gcc compile floating-point computation program when using option -march=native
When compile UnixBench, using command as below: gcc -o pgms/float -Wall -pedantic -O0 -march=native -mtune=native -I ./src -DTIME -Ddatum=float src/arith.c It will have an error: src/arith.c: In function ‘dumb_stuff’: src/arith.c:89:5: error: ‘+nofp’ feature modifier is incompatible with floating-point code The root cause is that gcc will read /proc/cpuinfo, get supported features from the line begin with 'Features'. But tk4 haven't 'Features', it using 'flags' instead, which causing gcc can't get the supported features. The correct usage is "Features:" always, just a buggy patch change it to 'flags' stupidly. Now change it back. Signed-off-by: Jianping Liu <frankjpliu@tencent.com> Signed-off-by: Alex Shi <alexsshi@tencent.com>
This commit is contained in:
parent
d064120985
commit
6bb115fdd7
|
@ -171,7 +171,7 @@ static int c_show(struct seq_file *m, void *v)
|
|||
* rather than attempting to parse this, but there's a body of
|
||||
* software which does already (at least for 32-bit).
|
||||
*/
|
||||
seq_puts(m, "flags\t\t:");
|
||||
seq_puts(m, "Features\t:");
|
||||
if (compat) {
|
||||
#ifdef CONFIG_COMPAT
|
||||
for (j = 0; compat_hwcap_str[j]; j++)
|
||||
|
|
Loading…
Reference in New Issue