Skip to content
Snippets Groups Projects
Verified Commit 51cc8f7c authored by Michal Hrusecky's avatar Michal Hrusecky :mouse:
Browse files

turris1x: Fix gcc floating points

There are wrong flags passed to gcc during compilation for Turris 1.X.
Problem description bellow:

$ cat test.c
int main(int argc, char *argv[]) { printf("Hello World %lg\n",
atof(argv[1]) + atof(argv[2])); return 0; }

$ usr/bin/gcc test.c
/usr/bin/ld: Warning: /tmp/usr/bin/../lib/gcc/powerpc-openwrt-linux-muslspe/8.4.0/libgcc.a(adddf3.o)
uses double-precision hard float, a.out uses single-precision hard
float

$ usr/bin/gcc --help=target -Q | grep -E
'(-mcpu=|-mdouble-float|-mfloat-gprs=|-mtune=)'
-mcpu= 8540
-mdouble-float [disabled]
-mfloat-gprs= single
-mtune= 8540

The take out of this is that -mcpu and-mtune má byť 8548, and
-mdouble-float should be enabled and -mfloat-gprs should be double.

This should be fixed by passing `--with-cpu=8548 --enable-e500-double`
to configure script.
parent 80788185
Branches
Tags
No related merge requests found
Pipeline #116052 passed with stages
in 9 minutes and 24 seconds
CONFIG_EXTRA_GCC_CONFIG_OPTIONS="--with-cpu=8548 --enable-e500-double"
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment