Package: z88dk
Version: 1.8.ds1-2
Severity: normal

test program:
#include <stdio.h>
int main(int argc, char** argv)
{
  while(1) printf("hello\n");
}

using 1.8.ds1-2:
zcc -v
zcc - Frontend for the z88dk Cross-C Compiler
v2.57 (C) 7.10.2007 D.J.Morris
zcc +cpcansi -lndos -lmz -l664_math -create-app -o test.cpc test.c
cp /usr/share/z88dk/lib/cpc_crt0.opt /tmp/tmpXXcuD2xY.opt
cp /tmp/tmpXXcuD2xY.opt /tmp/tmpXXcuD2xY.asm
z88dk-zcpp -I. -DZ80 -DSMALL_C -DCPC -D__CPC__ -DSCCZ80
-D__NATIVE_MATH__ -I/usr/share/z88dk/include  test.c /tmp/tmpXXBmQ6YD.i
z88dk-sccz80    -//  /tmp/tmpXXBmQ6YD.i
z88dk-copt /usr/share/z88dk/lib/z80rules.2 < /tmp/tmpXXBmQ6YD.asm >
/tmp/tmpXXBmQ6YD.op1
z88dk-copt /usr/share/z88dk/lib/z80rules.1 < /tmp/tmpXXBmQ6YD.op1 >
/tmp/tmpXXBmQ6YD.opt
z88dk-z80asm -eopt -ns -Mo /tmp/tmpXXBmQ6YD.opt
z88dk-z80asm -a -m -Mo -otest.cpc -i/usr/share/z88dk/lib/clibs/664_math
-i/usr/share/z88dk/lib/clibs/cpc_math  -i/usr/share/z88dk/lib/clibs/ndos
-i/usr/share/z88dk/lib/clibs/cpcansi_clib
-i/usr/share/z88dk/lib/clibs/z80_crt0  /tmp/tmpXXcuD2xY.opt
/tmp/tmpXXBmQ6YD.o
z88dk-appmake +cpc  -b test.cpc -c /tmp/tmpXXcuD2xY
cp test.cpc test.bin
rm test.cpc
cp test.bin test-2.75.bin

running the executable produces gargabe and the system hangs

using 1.7.ds1-2:
[EMAIL PROTECTED]:~/develop/cpc/bug$ make test.bin
zcc -v
zcc - Frontend for the z88dk Cross-C Compiler
v2.56 (C) 18.7.2006 D.J.Morris
zcc +cpcansi -lndos -lmz -l664_math -create-app -o test.cpc test.c
cp /usr/share/z88dk/lib/cpc_crt0.opt /tmp/tmpXXIHNan4.opt
cp /tmp/tmpXXIHNan4.opt /tmp/tmpXXIHNan4.asm
z88dk-zcpp -I. -DZ80 -DSMALL_C -DCPC -D__CPC__ -DSCCZ80
-D__NATIVE_MATH__ -I/usr/share/z88dk/include  test.c /tmp/tmpXXhBytKM.i
z88dk-sccz80    -//  /tmp/tmpXXhBytKM.i
z88dk-copt /usr/share/z88dk/lib/z80rules.2 < /tmp/tmpXXhBytKM.asm >
/tmp/tmpXXhBytKM.op1
z88dk-copt /usr/share/z88dk/lib/z80rules.1 < /tmp/tmpXXhBytKM.op1 >
/tmp/tmpXXhBytKM.opt
z88dk-z80asm -eopt -ns -Mo /tmp/tmpXXhBytKM.opt
z88dk-z80asm -a -m -Mo -otest.cpc -i/usr/share/z88dk/lib/clibs/664_math
-i/usr/share/z88dk/lib/clibs/cpc_math  -i/usr/share/z88dk/lib/clibs/ndos
-i/usr/share/z88dk/lib/clibs/cpcansi_clib
-i/usr/share/z88dk/lib/clibs/z80_crt0  /tmp/tmpXXIHNan4.opt
/tmp/tmpXXhBytKM.o
z88dk-appmake +cpc  -b test.cpc -c /tmp/tmpXXIHNan4
cp test.bin test-2.56.bin

running the executable works as expected

I compared the output of the the first steps above:
preprocessor output is eseentially the same
(z88dk-zcpp -I. -DZ80 -DSMALL_C -DCPC -D__CPC__ -DSCCZ80
-D__NATIVE_MATH__ -I/usr/share/z88dk/include test.c test.i)

assembler output is essentially the same, too
(z88dk-sccz80    -//  test.i)

stopped here
I guess it is a problem with the lib or startup code?

attached the binaries (maybe those help to debug the problem)
if you need more info please let me know
this is most probably an upstream bug?

Greetings,
Jens

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-1-686 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages z88dk depends on:
ii  debconf                       1.5.20     Debian configuration management sy
ii  z88dk-bin                     1.8.ds1-2  executable files for z88dk
ii  z88dk-data                    1.8.ds1-2  data files for z88dk

z88dk recommends no packages.

-- debconf information:
  z88dk/configure-defaultpackage: z88

Attachment: test-2.56.bin
Description: Binary data

Attachment: test-2.57.bin
Description: Binary data

Reply via email to