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.
configs/turris1x/gcc
0 → 100644
Please register or sign in to comment