2001-01-26 17:42:44 +01:00
|
|
|
$NetBSD: patch-ab,v 1.15 2001/01/26 16:42:45 skrll Exp $
|
2000-06-01 11:36:45 +02:00
|
|
|
|
2001-01-26 17:42:44 +01:00
|
|
|
--- ltmain.in.orig Sat May 27 02:53:15 2000
|
2001-01-15 16:18:23 +01:00
|
|
|
+++ ltmain.in
|
2000-06-04 19:56:15 +02:00
|
|
|
@@ -819,6 +819,7 @@
|
|
|
|
old_convenience=
|
|
|
|
deplibs=
|
|
|
|
linkopts=
|
|
|
|
+ wllinkopts=
|
|
|
|
|
|
|
|
if test -n "$shlibpath_var"; then
|
|
|
|
# get the directories listed in $shlibpath_var
|
|
|
|
@@ -1154,6 +1155,25 @@
|
2000-06-01 11:36:45 +02:00
|
|
|
continue
|
|
|
|
;;
|
|
|
|
|
|
|
|
+ -Wl,*)
|
|
|
|
+ args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
|
|
|
|
+ arg=
|
|
|
|
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
|
|
|
|
+ for flag in $args; do
|
|
|
|
+ IFS="$save_ifs"
|
|
|
|
+ case "$flag" in
|
|
|
|
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
|
|
|
|
+ flag="\"$flag\""
|
|
|
|
+ ;;
|
|
|
|
+ esac
|
|
|
|
+ arg="$arg $wl$flag"
|
2000-06-04 19:56:15 +02:00
|
|
|
+ linkopts="$linkopts $flag"
|
|
|
|
+ wllinkopts="$wllinkopts $wl$flag"
|
2000-06-01 11:36:45 +02:00
|
|
|
+ done
|
|
|
|
+ IFS="$save_ifs"
|
|
|
|
+ arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
|
|
|
|
+ ;;
|
|
|
|
+
|
|
|
|
# Some other compiler flag.
|
|
|
|
-* | +*)
|
|
|
|
# Unknown arguments in both finalize_command and compile_command need
|
2001-01-26 17:42:44 +01:00
|
|
|
@@ -1656,7 +1676,7 @@
|
|
|
|
|
|
|
|
# Check that each of the things are valid numbers.
|
|
|
|
case "$current" in
|
|
|
|
- 0 | [1-9] | [1-9][0-9]*) ;;
|
|
|
|
+ 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
|
|
|
|
*)
|
|
|
|
$echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
|
|
|
|
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
|
|
|
|
@@ -1665,7 +1685,7 @@
|
|
|
|
esac
|
|
|
|
|
|
|
|
case "$revision" in
|
|
|
|
- 0 | [1-9] | [1-9][0-9]*) ;;
|
|
|
|
+ 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
|
|
|
|
*)
|
|
|
|
$echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
|
|
|
|
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
|
|
|
|
@@ -1674,7 +1694,7 @@
|
|
|
|
esac
|
|
|
|
|
|
|
|
case "$age" in
|
|
|
|
- 0 | [1-9] | [1-9][0-9]*) ;;
|
|
|
|
+ 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
|
|
|
|
*)
|
|
|
|
$echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
|
|
|
|
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
|
2000-11-26 12:22:40 +01:00
|
|
|
@@ -1772,7 +1792,7 @@
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Remove version info from name if versioning should be avoided
|
|
|
|
- if test "$avoid_version" = yes && test "$need_version" = no; then
|
|
|
|
+ if test "$avoid_version" = yes; then
|
|
|
|
major=
|
|
|
|
versuffix=
|
|
|
|
verstring=""
|
|
|
|
@@ -1799,6 +1819,9 @@
|
|
|
|
# rhapsody is a little odd...
|
|
|
|
deplibs="$deplibs -framework System"
|
|
|
|
;;
|
|
|
|
+ *-*-netbsd*)
|
|
|
|
+ # Don't link with libc until the a.out ld.so is fixed.
|
|
|
|
+ ;;
|
|
|
|
*)
|
|
|
|
# Add libc to deplibs on all other systems.
|
|
|
|
deplibs="$deplibs -lc"
|
2001-01-15 16:18:23 +01:00
|
|
|
@@ -2103,6 +2126,16 @@
|
|
|
|
$run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
|
|
|
|
fi
|
|
|
|
|
2001-01-09 19:37:46 +01:00
|
|
|
+ # Check whether we need to link in c++rt0.o on a.out because of
|
|
|
|
+ # constructors/destructors
|
|
|
|
+ if test -n "$ctor_check_cmd"; then
|
|
|
|
+ eval cmd=\"$ctor_check_cmd\"
|
|
|
|
+ #$show "$cmd"
|
|
|
|
+ if $run eval "$cmd" ; then
|
|
|
|
+ cppopts="$cpprt0"
|
|
|
|
+ fi
|
2001-01-15 16:18:23 +01:00
|
|
|
+ fi
|
|
|
|
+
|
|
|
|
if test -n "$convenience"; then
|
|
|
|
if test -n "$whole_archive_flag_spec"; then
|
|
|
|
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
|
|
|
|
@@ -2146,6 +2179,7 @@
|
|
|
|
if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
|
|
|
|
eval flag=\"$thread_safe_flag_spec\"
|
|
|
|
linkopts="$linkopts $flag"
|
|
|
|
+ wllinkopts="$wllinkopts $wl$flag"
|
2000-06-04 19:56:15 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Do each of the archive commands.
|