[fpc-devel] Compiling for libgdb, and using make -j on larger SPARC systems
Mark Morgan Lloyd
markMLl.fpc-devel at telemetry.co.uk
Fri Aug 9 21:03:01 CEST 2013
Sven Barth wrote:
>> if len <= 0 then
>> len := sizeof(aint);
> So you changed the "len = 0" to "len <= 0"? Then this is very strange,
> because that almost surely shouldn't happen.
No, I /added/ those two lines to make sure that len was never zero. I'm
not saying that it's a valid hack, but after seeing that len == 0 only
in that one place (i.e. never when compiling the remainder of the
compiler etc.) I thought it a worthwhile experiment.
> Could you please print
> somehow (either debugging or Writeln) the value of left.resultdef.typ
> (yes, without "e" at the end!) when len <= 0? Then we could at least
> check which def produces problematic results here (is suspect records,
> but just to be sure).
That of course was one of the things I was asking :-) With code as below
(reformatted to avoid problems with wrap)
else
begin
{ TODO: HACK: unaligned test, maybe remove all unaligned locations
(array of char) from the compiler}
{ Use unaligned copy when the offset is not aligned }
len:=left.resultdef.size;
if len = 0 then begin
WriteLn('=====> len: ', len);
WriteLn('=====> typ: ', left.resultdef.typ)
end;
// if len <= 0 then
// len := sizeof(aint);
{ data smaller than an aint has less alignment requirements }
alignmentrequirement:=min(len,sizeof(aint));
if (right.location.reference.offset mod alignmentrequirement<>0) or
..
I get
=====> len: 0
=====> typ: recorddef
But it does appear to build properly on x86, without any zero-length types.
>> /usr/local/src/fpc/libgdb/gdb-6.7.1/gdb/ada-lang.c:8651: undefined
>> reference to `_Q_utoq'
>> ..
>>
>> which I've not seen previously. Unless anybody has any suggestions (and
>> time permitting) I'll take a look at older versions and try to work out
>> when things started going wrong.
>>
>
> This isn't related to FPC itself however. Here libgdb has some
> unresolved symbols.
[Nod] I'm investigating, but I /think/ I've had this version (6.7)
working in the past. Fixing up the gcc-lib path in fpc.cfg doesn't help,
in fact -vt output suggests that fpc automagically finds the right file
irrespective.
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the fpc-devel
mailing list