diff --git a/bin/caam b/bin/caam index f7b7014..19d3c0f 100755 --- a/bin/caam +++ b/bin/caam @@ -7,7 +7,7 @@ ca=`echo $CAAM_ADD|tr : ' '` cpx=`echo $CAAM_PREFIXES|tr : ' '` -CAAM_GCC=${GCC:-`which gcc`} +CAAM_GCC=${GCC:-`which cc`} CAAM_CXX=${CXX:-`which c++`} if [ -x /usr/xpg4/bin/sh ]; then CAAM_SH=/usr/xpg4/bin/sh @@ -108,7 +108,7 @@ [ $debug ] && echo checking $pfx [ -d $pfx ] || continue cf="$cf -I${pfx}${e:+/}include" - lf="$lf -L${pfx}${e:+/}lib -R${pfx}${e:+/}lib" + lf="$lf -L${pfx}${e:+/}lib -Wl,-rpath=${pfx}${e:+/}lib" lp="$lp${lp:+:}${pfx}${e:+/}lib" [ -d $pfx/lib/pkgconfig ] && pcp=$pcp${pcp:+:}$pfx${e:+/}lib/pkgconfig done @@ -146,7 +146,7 @@ oifs=$IFS IFS=: for d in $LD_RUN_PATH; do - ldf=$ldf${ldf:+\ }"-R $d -L $d" + ldf=$ldf${ldf:+\ }"-Wl,-rpath=$d -L$d" done IFS=$oifs fi