Explorar o código

Explicitly load C library on Linux as already done in dl unit, to avoid wrong sartup code

Pierre Muller hai 1 semana
pai
achega
06b17e6371
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      rtl/inc/heaptrc.pp

+ 7 - 0
rtl/inc/heaptrc.pp

@@ -1244,6 +1244,13 @@ const
     LibDL = 'dl';
   {$endif}
 {$endif}
+
+{$if defined(linux)}
+    { if libc is not linked explicitly, FPC might chose the wrong startup code, as
+      libdl depends on libc on linux, this does not hurt }
+    {$linklib c}
+{$endif}
+
 {$if defined(LINUX) or defined(BSD)}
 type
   Pdl_info = ^dl_info;