Sign in Join

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

Mailing lists / fpc-devel / 2001-08

glibc21

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

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

Sergey Korshunoff

Hello!
There is a strange logic in t_linux about glibc21:

======================================================================
Glibc21:=false;
with Info do
 begin
   ExeCmd[1]:='ld $OPT $DYNLINK $STATIC $STRIP -L. -o $EXE $RES';
   DllCmd[1]:='ld $OPT $INIT $FINI $SONAME -shared -L. -o $EXE $RES';
   DllCmd[2]:='strip --strip-unneeded $EXE';
   { first try glibc2 }
   DynamicLinker:='/lib/ld-linux.so.2';
   if FileExists(DynamicLinker) then
    begin
      Glibc2:=true;
      { Check for 2.0 files, else use the glibc 2.1 stub }
      if FileExists('/lib/ld-2.0.*') then
       Glibc21:=false
      else
       Glibc21:=true;
    end
   else
    DynamicLinker:='/lib/ld-linux.so.1';
 end;
=====================================================================
But presence of /lib/ld* do not say anything about current gcc environment.
For my Linux;

# ls /lib/ld*

-rwxr-xr-x 1 root root May 30 1998 ld.so
lrwxrwxrwx 1 root root Jun 6 1998 ld-linux.so.1 lrwxrwxrwx 1 root root Jun 6 1998 ld-linux.so.2

Those ld* are from libc 4.7.6, libc 5.4.44 and glibc 2.0.6 And there is no one /lib/ld-2.0.*

May be better allow to say version of libc in FPC config?

Regards,
Sergey Korshunoff

PS: You can to say that we go to support only glibc > 2.1.3 ??? This may be true for dynamic linking, but it is wrong for static linking: size of static "hello, World!" is

libc 5.4.44 -- 80 kb
glibc 6.0.2 -- 200 kb
glibc 2.2.4 -- 400 kb

Reply by email