[fpc-pascal] Compiling for SPARC

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Tue Aug 15 12:06:55 CEST 2006


On 14 aug 2006, at 15:33, Jonas Maebe wrote:

> I forgot to add some more relevant code:
>
>       Replace(cmdstr,'$LIB',maybequoted(current_module.staticlibfilename^));
>       { create AR commands }
>       success := true;
>       nextcmd := cmdstr;
>       current := TStringListItem(SmartLinkOFiles.First);
>       repeat
>         Replace(nextcmd,'$FILES',GetNextFiles(240 - length(nextcmd) +
>				6 - length(binstr) - 1, current));
>         success:=DoExec(binstr,nextcmd,false,true);
>         nextcmd := cmdstr;
>       until (not assigned(current)) or (not success);
>
> The first replace already puts the library name in the string. So if
> the directory + name of that library (which always is in a subdir of
> the unit output directory) is around 120 chars, things do add up.
>
> Not sure how to fix this properly though, except by finally doing
> that whole "replace Dos and shortstrings with Sysutils and
> ansistrings for all external interfacing in the compiler" thing.

I think that for the moment I'd settle for an explicit warning and/or error
message, the first triggered when a path+file gets to be longer than around 105
characters and the second fatal.

I'm hoping that at some point I'll be familiar enough with things that I might
be some use working through problems like this, but I've got a long way to go
yet and a lot of problems on my plate at this end.

-- 
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-pascal mailing list