summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2015-03-23 19:22:04 -0400
committermidipix <writeonce@midipix.org>2015-03-23 19:22:04 -0400
commit72276572766915890129711b16907ef3065ac630 (patch)
tree0265f6225595cb113e0c75d19fc34c9f208f0fd0
parent9aec288c73dbdfcffb272ef56f8de6dd411f4145 (diff)
downloadcbb-gcc-4.6.4-72276572766915890129711b16907ef3065ac630.tar.bz2
cbb-gcc-4.6.4-72276572766915890129711b16907ef3065ac630.tar.xz
libtool: midipix targets: fix generation of import libraries.
signed-off by Z. Gilboa; see copying.midipix (9cd0746c) for additional information.
-rw-r--r--ltmain.sh16
1 files changed, 9 insertions, 7 deletions
diff --git a/ltmain.sh b/ltmain.sh
index ff28f7854..744264797 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -2332,17 +2332,19 @@ func_mode_install ()
# this only affects symbols prefixed by __emutls_[vt], which presumably
# are only marked for export due to --export-all-symbols being the default.
- grep -n 'IMPORTS' "$implib_ver_def_name" || imp_lines='all'
+ grep -vE '"$excluded_symbols"' "$implib_ver_def_name" | grep -v '\.' > "$implib_def_name"
+ imp_lines=`grep -n 'IMPORTS' "$implib_def_name"`
- if [ "$imp_lines"x = allx ]; then
- cp "$implib_ver_def_name" "$implib_exp_def_name"
+ if [ x"$imp_lines" = x ]; then
+ imp_lines=`wc -l "$implib_def_name"`
+ imp_lines=`echo "$imp_lines" | cut -d' ' -f1`
else
- grep -vE '"$excluded_symbols"' "$implib_ver_def_name" | grep -v '\.' > "$implib_def_name"
- imp_lines=`grep -n 'IMPORTS' "$implib_def_name" | cut -d':' -f1`
- imp_lines=`expr $imp_lines - 1`
- head -n$imp_lines "$implib_def_name" > "$implib_exp_def_name"
+ imp_lines=`echo "$imp_lines" | cut -d':' -f1`
+ imp_lines=`expr $imp_lines - 1`;
fi
+ head -n$imp_lines "$implib_def_name" > "$implib_exp_def_name"
+
"$host"-dlltool -d "$implib_exp_def_name" -D "$dso_name" -l "$implib_name"
cp -t "$destdir" "$implib_name"
;;