Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2019-12

Cross-linking a DLL

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Alfred

Dear All,

, this code is common (also for other system
files):

if (isdll) then
begin
      Add('INPUT(');
      Add(sysrootpath+info.DynamicLinker);
      Add(')');
end;

And also:

if libraryadded and not(linklibc) and not(isdll) and (tf_section_threadvars in target_info.flags) then

   Add('-l:'+ExtractFileName(defdynlinker));

When cross-compiling, this linker cannot be found in a flat directory with library-files (including the dynamic linker). The only way to solve is using a -XR , and some extra directories. But this causes the linker not to be found on the target itself.

Before resorting to all kinds of trickery, I would like to ask if there is a more elegant way of handling this.

Executables can easily be cross-compiled. Its the compilation of libs that causes problems.

Greetings and thanks.

Reply by email