bugs in gpc-19990530-i386-pc-djgppv202.zip
Hi all, I have found a couple of bugs after downloading this last version 1) A minor one, already present in the previous beta (january): the specs file is not correct. It seems to be the one used to cross-compile to DOS in your system. The correct one is contained in the gcc2.8.1 distribution of djgpp v2.02 and I have attached it for reference. 2) more serious a new bug (not present in the previous beta) has popped up in the automake process. It occurs when an unit is referred to both directly in the program and indirectly in an other unit as in the following example: ----------------------------------------- file bug.pas ----------------------------------------- program bug; uses u,uu; begin writeln(O,K); end. ------------------------------------------ file u.pas ------------------------------------------ unit u; interface uses uu; var O:string[2] = 'O'; implementation end. ---------------------------------------- file uu.pas ---------------------------------------- unit uu; interface var K: string[2] = 'K'; implementation end. ------------------------------------- compiled with redir -o bug.out -eo gpc -v -g --automake -o bug.exe bug.pas gives the attached bug.out file The error is in the link stage. The files u.o and uu.o are not included in the ld command (as they were in the previous beta). If I include them explicitly with gpc -v -g --automake -o bug.exe u.o uu.o bug.pas all is correct Hope this helps Maurice -- Maurice Lombardi Laboratoire de Spectrometrie Physique, Universite Joseph Fourier de Grenoble, BP87 38402 Saint Martin d'Heres Cedex FRANCE Tel: 33 (0)4 76 51 47 51 Fax: 33 (0)4 76 51 45 44 mailto:Maurice.Lombardi@ujf-grenoble.fr *asm: *asm_final: *cpp: %{posix:-D_POSIX_SOURCE} *cc1: %(cc1_spec) *cc1plus: *endfile: *link: *lib: -lc *libgcc: -lgcc *startfile: crtf.o%s %{pg:gcrt0.o%s}%{!pg:crt0.o%s} *switches_need_spaces: *signed_char: %{funsigned-char:-D__CHAR_UNSIGNED__} *predefines: -Dunix -Di386 -DGO32 -DMSDOS -DDJGPP=2 -DDJGPP_MINOR=1 *cross_compile: 0 *version: 2.8.1 *multilib: . ; *multilib_defaults: *multilib_extra: *multilib_matches: *cpp_cpu: -Di386 -Asystem(unix) -Acpu(i386) -Amachine(i386) %{mcpu=i486:-Di486} %{m486:-Di486} %{mpentium:-Dpentium -Di586} %{mcpu=pentium:-Dpentium -Di586} %{mpentiumpro:-Dpentiumpro -Di686} %{mcpu=pentiumpro:-Dpentiumpro -Di686} *cc1_cpu: %{!mcpu*: %{m386:-mcpu=i386 -march=i386} %{mno-486:-mcpu=i386 -march=i386} %{m486:-mcpu=i486 -march=i486} %{mno-386:-mcpu=i486 -march=i486} %{mno-pentium:-mcpu=i486 -march=i486} %{mpentium:-mcpu=pentium} %{mno-pentiumpro:-mcpu=pentium} %{mpentiumpro:-mcpu=pentiumpro}} *link_command: %{!fsyntax-only: \ %{!c:%{!M:%{!MM:%{!E:%{!S:ld %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} \ %{r} %{s} %{t} %{u*} %{x} %{z} %{Z}\ %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\ %{static:} %{L*} %D %o\ %{!nostdlib:%{!nodefaultlibs:%G %L %G}}\ %{!A:%{!nostdlib:%{!nostartfiles:%E}}}\ -Tdjgpp.djl %{T*}}}}}}} %{!c:%{!M:%{!MM:%{!E:%{!S:stubify %{v} %{o*:%*} %{!o*:a.out} }}}}}
participants (2)
-
Maurice Lombardi -
Peter Gerwinski