On Wednesday 11 April 2001 23:44, Frank Heckenbach wrote:
pavenis@lanet.lv wrote:
In your previous test report (forwarded by Maurice Lombardi), you also had the following errors in dialdef4.pas, fjf421l.pas and fjf421m.pas. I didn't understand them, and they didn't appear to occur now, so I suppose (hope ;-) it was some intermittent problem.
c:\djgpp\tmp\cceaaaaa: In function `pascal_main_program': fjf421m.pas:8: undefined reference to `_p_stdout' fjf421m.pas(.text+0x20): undefined reference to `_p_write' fjf421m.pas(.text+0x29): undefined reference to `_p_inoutres' fjf421m.pas(.text+0x31): undefined reference to `_p_check_inoutres' fjf421m.pas:9: undefined reference to `_p_atexit' fjf421m.pas(.text+0x82): undefined reference to `_p_initialize' fjf421m.pas(.text+0x91): undefined reference to `_p_finalize' collect2: ld returned 1 exit status failed
The source of problem was errorous setting static variable library (in gpc.c) to 0 in some cases when command line contains something like '-I .'
We are not testing: - that we have at least 2 characters in option (this causes test problems in some cases as 3th character could be anything including 0, it's not very often though ...)
- if we have exactly 2 characters we should check whether 1st one is '-'. Try for example 'gpc --automake -I xc hello.pas' to get a problem (no linking when -c specified, in this cases xc not distinguished from -c)
Included patch should fix box problems
Andris
--- gpc.c~1 Tue Apr 17 20:36:18 2001 +++ gpc.c Fri Apr 20 20:11:43 2001 @@ -1348,6 +1348,8 @@ while (i < newindex) { if (library != 0 + && newv[i][0]=='-' + && newv[i][1] && newv[i][2] == '\0' && (char *) strchr ("hv", newv[i][1]) != NULL && (newindex == 2 @@ -1360,7 +1362,10 @@ dialect = 0; } if (library != 0 - && ((newv[i][2] == '\0' + && ((newv[i][0]=='-' + && newv[i][1] + && newv[i][2] == '\0' + && (char *) strchr ("cSEM", newv[i][1]) != NULL) || strcmp (newv[i], "-MM") == 0 || strcmp (newv[i], "-fsyntax-only") == 0)) Ā