Subject: pkg/21996: devel/libtool-base strips path from $CC
To: None <>
From: None <>
List: netbsd-bugs
Date: 06/26/2003 10:09:28
>Number:         21996
>Category:       pkg
>Synopsis:       devel/libtool-base strips path from $CC
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 26 14:12:00 UTC 2003
>Originator:     Todd Vierling
>Release:        NetBSD 1.6.1-ish
	DUH.ORG:  Pointing out the obvious since 1994.

When something compiles with libtool and provides an explicit path to
$CC (see editors/pico, which is passing the full buildlink path to "cc"
to libtool), libtool for some reason strips the path from $CC and
invokes "cc" from $PATH.  This invalidates the use of a replacement
compiler like gcc3.


Install gcc3.  Include $PREFIX/share/examples/gcc/mk.conf into /etc/mk.conf.

Symlink /usr/bin/{cc,gcc,c++,g++,f77,g77} to /usr/bin/false to prevent
running them from /usr/bin.

Compile pkgsrc/editors/pico:

/usr/pkgsrc/editors/pico/work/.buildlink/bin/libtool /usr/pkgsrc/editors/pico/work/.buildlink/bin/cc -o attach.lo basic.lo bind.lo browse.lo buffer.lo composer.lo display.lo file.lo fileio.lo line.lo pico_os.lo pico.lo random.lo region.lo search.lo window.lo word.lo -rpath /usr/pkg/lib  -version-info 4:0
cc -shared  .libs/attach.o .libs/basic.o .libs/bind.o .libs/browse.o .libs/buffer.o .libs/composer.o .libs/display.o .libs/file.o .libs/fileio.o .libs/line.o .libs/pico_os.o .libs/pico.o .libs/random.o .libs/region.o .libs/search.o .libs/window.o .libs/word.o   -Wl,-soname -Wl, -o .libs/
*** Error code 1



Not sure.  Maybe the buildlink2 wrapper around libtool does it?