Subject: how rpath is set in gcc build
To: None <>
From: None <>
List: tech-toolchain
Date: 08/31/2002 09:54:43
I'm sending here instead of tech-pkg since the lang/gcc package should be
in sync with our in tree toolchain and more toolchain gurus probably read
this one...

I'm trying to understand whats going on here with  From the
warning during linking, it looks like its using the correct libstdc++, but
then ldd indicates that the rpath isn't set right.  So my question is,
how can I cause the gcc package to pre-pend
/usr/pkg/gcc-2.95.3/lib/gcc-lib/alpha--netbsd/2.95.3 to the rpath during
linking?  For that matter, how do I check what g++ thinks it should be?  

c++ -dumpspecs shows
-m elf64alpha   -e __start   %{O*:-O3} %{!O*:-O1}   %{assert*} %{R*}
%{shared:-shared}   %{!shared:     -dc -dp     %{!nostdlib:%{!r*:%{!e*:-e
__start}}}     %{
!static:       %{rdynamic:-export-dynamic}
%{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}}

but i'm not quite sure how to interpret that or if this is even the right
thing to look at.



bondage 726 # cat testprog.cpp
#include <iostream>
int main();
int main() {
    std::cout << "Hello World!\n";
    return 0;

bondage 727 # /usr/pkg/gcc-2.95.3/bin/c++ -o testprog testprog.cpp 
warning: reference to compatibility vfork(); include <unistd.h> for
correct reference

bondage 728 # ldd testprog
         -lstdc++ => /usr/lib/
         -lm.0 => /usr/lib/
         -lc.12 => /usr/lib/

bondage 729 # printenv | grep LD_