Subject: buildlink2 ld script drops -lc
To: None <tech-pkg@netbsd.org>
From: Klaus Heinz <k.heinz.nov.zwei@onlinehome.de>
List: tech-pkg
Date: 11/04/2002 03:51:23
Hi,

I am playing with bootstrap-pkgsrc on Solaris8 (x86). The first package
I tried to install was libtool-base and it almost worked. The invocation
of ld to link libltdl.so fails because the buildlink2 ld script (more
precisely .buildlink/bin/.logic-trans and .buildlink/bin/.cache-trans)
drops '-lc' deliberately:

  -I/opt/pkg/include) arg="" ;; #4
  -DPIC) arg="-DPIC" ;; #3
  -DHAVE_CONFIG_H) arg="-DHAVE_CONFIG_H" ;; #3
  -lc) arg="" ;; #4

Does this rely on GNU ld always including libc?
The Solaris linker chokes on the resulting command line (from
.wrapper.log)

  /usr/ccs/bin/ld -G -z defs -h libltdl.so.3 -o .libs/libltdl.so.3.0
  .libs/ltdl.o

with this output

  Undefined                       first referenced
   symbol                             in file
  __ctype                             .libs/ltdl.o
  malloc                              .libs/ltdl.o
  sprintf                             .libs/ltdl.o
  ...

Could someone look into this?

ciao
     Klaus