I just noticed I couldn't compile a program that needed float math for cpm or the test target using the classic c library. I think all the cfg files are missing:
Z88MATHFLG -D__NATIVE_MATH__
except for zx and zx81?
------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/ ... 1&iu=/4140
[z88dk-dev] floating point linking broken on all classic compiles?
>Z88MATHFLG -D__NATIVE_MATH__
>
>except for zx and zx81?
It could be. It is very long I don't use the FP code outside the Sinclair clones (the last time it was for the Lambda 8300, but issue we were having on sccz80 confused me a lot). If you're busy I can put the definition on the CFG files.
------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/ ... 1&iu=/4140
>
>except for zx and zx81?
It could be. It is very long I don't use the FP code outside the Sinclair clones (the last time it was for the Lambda 8300, but issue we were having on sccz80 confused me a lot). If you're busy I can put the definition on the CFG files.
------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/ ... 1&iu=/4140
Maybe doublecheck if that's the problem? If you're volunteering to fix things up I'm ok with thatIt could be. It is very long I don't use the FP code outside the Sinclair clones (the last time it was for the Lambda 8300, but issue we were having on sccz80 confused me a lot). If you're busy I can put the definition on the CFG files.Z88MATHFLG -D__NATIVE_MATH__
except for zx and zx81?
------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/ ... 1&iu=/4140
I also changed line 619 in zcc.c to disable the math lib configuration for new c lib compiles some time ago. I don't think that's the problem but just so you know.It could be. It is very long I don't use the FP code outside the Sinclair clones (the last time it was for the Lambda 8300, but issue we were having on sccz80 confused me a lot). If you're busy I can put the definition on the CFG files.Z88MATHFLG -D__NATIVE_MATH__
except for zx and zx81?
------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/ ... 1&iu=/4140
On Mon, 9 Nov 2015, alvin (alvin_albrecht@...) wrote:
sorting out how the fp number is represented - the -math-z88 flag switches
on the 40 bit representation, though I think CPC might need -doublestr to
work correctly.
------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/ ... 1&iu=/4140
I think that's only needed for the CPC maths library. The main thing isI just noticed I couldn't compile a program that needed float math for
cpm or the test target using the classic c library. I think all the cfg
files are missing:
Z88MATHFLG -D__NATIVE_MATH__
except for zx and zx81?
sorting out how the fp number is represented - the -math-z88 flag switches
on the 40 bit representation, though I think CPC might need -doublestr to
work correctly.
------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/ ... 1&iu=/4140
That's right, I got to the same conclusion checking the configurations.I think that's only needed for the CPC maths library. The main thing is
sorting out how the fp number is represented - the -math-z88 flag switches
on the 40 bit representation, though I think CPC might need -doublestr to
work correctly.
The CPC related part doesn't even need the "-D__NATIVE_MATH__" flag: checking for the target type is enough for "math.h".
Time ago I chose to keep this same definition on the Sinclair machines because they could have had extra native math functions in ROM, but it was useless. I'm going to fix "math.h", so you need to care for the -math-z88 flag only.
------------------------------------------------------------------------------
I isolated an example:
#include <stdio.h>
unsigned int c;
unsigned long d;
main()
{
printf("%.4d", c + (unsigned int)(d / 10000UL));
}
zcc +cpm -vn test.c -o test
Comes up with missing float routines. I assumed that sccz80 decided to pull in the large printf with %f in it so another compile with -lm:
zcc +cpm -vn test.c -o test -lm
Leads to even more errors.
A compile with zx target *with the float library linked* works:
zcc +zx -vn test.c -o test -lndos -lm
This only affects classic c compiles.
I successfully compiled the whetstone benchmark with classic c using a cpm target so it's not that the float library can't be used with cpm (eg) there is something else here.
------------------------------------------------------------------------------
#include <stdio.h>
unsigned int c;
unsigned long d;
main()
{
printf("%.4d", c + (unsigned int)(d / 10000UL));
}
zcc +cpm -vn test.c -o test
Comes up with missing float routines. I assumed that sccz80 decided to pull in the large printf with %f in it so another compile with -lm:
zcc +cpm -vn test.c -o test -lm
Leads to even more errors.
A compile with zx target *with the float library linked* works:
zcc +zx -vn test.c -o test -lndos -lm
This only affects classic c compiles.
I successfully compiled the whetstone benchmark with classic c using a cpm target so it's not that the float library can't be used with cpm (eg) there is something else here.
------------------------------------------------------------------------------
That's a fun one, because it's dragging in the FP version of printf then we need to get the FP accumulator in the crt in - it's excluded by default for space reasons. It looks like that isn't happening automatically, so you need to compile with an extra option: zcc +cpm -pragma-need=floatpack test.c -lmComes up with missing float routines. I assumed that sccz80 decided to pull in the large printf with %f in it so another compile with -lm:
zcc +cpm -vn test.c -o test -lm
Leads to even more errors.
A compile with zx target *with the float library linked* works:
zcc +zx -vn test.c -o test -lndos -lm
This only affects classic c compiles.
I successfully compiled the whetstone benchmark with classic c using a cpm target so it's not that the float library can't be used with cpm (eg) there is something else here.
In the ZX crt0 it looks like fa etc are always included regardless of whether they are used.
------------------------------------------------------------------------------