Buildsystem problem in libtool
Posted: 07 Dec 2006 17:09
Hi,
i have some libs that i need to link in a special order. Therefor i added the compiler flags
but when the gcc is called to link the libs i end up with:
-Wl,--start-group -Wl,--end-group -llib1 -llib2 -llib3
after the libtool was called.
I think the problem is in the libtool script in line 2110 which strips every -Wl, stuff and puts it in another order (which isn't too clever for the grouping ).
i tried it with:
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 'if ((! /^-Wl,--start-group/) && (! /^-Wl,--end-group/)) {s/^-Wl,//}'`
but this isn' perl.
Is anybody able to help me as i have realy no clue of SED.
Thanx a lot.
i have some libs that i need to link in a special order. Therefor i added the compiler flags
Code: Select all
-Wl,--start-group -llib1 -llib2 -llib3 -Wl,--end-group
-Wl,--start-group -Wl,--end-group -llib1 -llib2 -llib3
after the libtool was called.
I think the problem is in the libtool script in line 2110 which strips every -Wl, stuff and puts it in another order (which isn't too clever for the grouping ).
Code: Select all
---snip---
-Wl,*)
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
arg=
save_ifs="$IFS"; IFS=','
for flag in $args; do
IFS="$save_ifs"
case $flag in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
flag="\"$flag\""
;;
esac
arg="$arg $wl$flag"
compiler_flags="$compiler_flags $wl$flag"
linker_flags="$linker_flags $flag"
done
IFS="$save_ifs"
arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
;;
--snap---
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 'if ((! /^-Wl,--start-group/) && (! /^-Wl,--end-group/)) {s/^-Wl,//}'`
but this isn' perl.
Is anybody able to help me as i have realy no clue of SED.
Thanx a lot.