8bc2721574
from brad
189 lines
7.0 KiB
Plaintext
189 lines
7.0 KiB
Plaintext
$OpenBSD: patch-external_gcc_fastjar_ltmain_sh,v 1.1 2011/09/22 21:15:31 jasper Exp $
|
|
--- external/gcc/fastjar/ltmain.sh.orig Tue Jan 3 10:27:01 2006
|
|
+++ external/gcc/fastjar/ltmain.sh Wed Sep 21 01:41:32 2011
|
|
@@ -1859,6 +1859,7 @@ EOF
|
|
finalize_deplibs="$deplib $finalize_deplibs"
|
|
else
|
|
deplibs="$deplib $deplibs"
|
|
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
|
|
fi
|
|
continue
|
|
;;
|
|
@@ -2076,20 +2077,20 @@ EOF
|
|
# It is a libtool convenience library, so add in its objects.
|
|
convenience="$convenience $ladir/$objdir/$old_library"
|
|
old_convenience="$old_convenience $ladir/$objdir/$old_library"
|
|
- tmp_libs=
|
|
- for deplib in $dependency_libs; do
|
|
- deplibs="$deplib $deplibs"
|
|
- if test "X$duplicate_deps" = "Xyes" ; then
|
|
- case "$tmp_libs " in
|
|
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
|
|
- esac
|
|
- fi
|
|
- tmp_libs="$tmp_libs $deplib"
|
|
- done
|
|
elif test "$linkmode" != prog && test "$linkmode" != lib; then
|
|
$echo "$modename: \`$lib' is not a convenience library" 1>&2
|
|
exit $EXIT_FAILURE
|
|
fi
|
|
+ tmp_libs=
|
|
+ for deplib in $dependency_libs; do
|
|
+ deplibs="$deplib $deplibs"
|
|
+ if test "X$duplicate_deps" = "Xyes" ; then
|
|
+ case "$tmp_libs " in
|
|
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
|
|
+ esac
|
|
+ fi
|
|
+ tmp_libs="$tmp_libs $deplib"
|
|
+ done
|
|
continue
|
|
fi # $pass = conv
|
|
|
|
@@ -2272,7 +2273,7 @@ EOF
|
|
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then
|
|
if test "$installed" = no; then
|
|
notinst_deplibs="$notinst_deplibs $lib"
|
|
- need_relink=yes
|
|
+ test -z "$DESTDIR" && need_relink=yes
|
|
fi
|
|
# This is a shared library
|
|
|
|
@@ -2411,7 +2412,8 @@ EOF
|
|
fi
|
|
;;
|
|
relink)
|
|
- if test "$hardcode_direct" = yes; then
|
|
+ if test "$hardcode_direct" = yes &&
|
|
+ test "$hardcode_direct_absolute" = no; then
|
|
add="$dir/$linklib"
|
|
elif test "$hardcode_minus_L" = yes; then
|
|
add_dir="-L$dir"
|
|
@@ -2467,7 +2469,8 @@ EOF
|
|
add_dir=
|
|
add=
|
|
# Finalize command for both is simple: just hardcode it.
|
|
- if test "$hardcode_direct" = yes; then
|
|
+ if test "$hardcode_direct" = yes &&
|
|
+ test "$hardcode_direct_absolute" = no; then
|
|
add="$libdir/$linklib"
|
|
elif test "$hardcode_minus_L" = yes; then
|
|
add_dir="-L$libdir"
|
|
@@ -3092,6 +3095,20 @@ EOF
|
|
major=
|
|
versuffix=
|
|
verstring=""
|
|
+ else
|
|
+ # XXX
|
|
+ tmp=`echo $libname|sed -e 's,+,_,g' -e 's,-,_,g' -e 's,\.,_,g'`
|
|
+ eval tmp2=\$${tmp}_ltversion
|
|
+ if ! test -z "${SHARED_LIBS_LOG}"; then
|
|
+ if ! test -f ${SHARED_LIBS_LOG}; then
|
|
+ echo "# SHARED_LIBS+= <libname> <obsd version> # <orig version>" >${SHARED_LIBS_LOG}
|
|
+ fi
|
|
+ tmp4=`echo $libname|sed -e 's/^lib//'`
|
|
+ printf "SHARED_LIBS +=\t%-20s %-8s # %s\n" "$tmp4" "$tmp2" "$versuffix" >>${SHARED_LIBS_LOG}
|
|
+ fi
|
|
+ if test -n "$versuffix" && test -n "$tmp2"; then
|
|
+ versuffix=".$tmp2"
|
|
+ fi
|
|
fi
|
|
|
|
# Check to see if the archive will have undefined symbols.
|
|
@@ -5365,6 +5382,10 @@ relink_command=\"$relink_command\""
|
|
esac
|
|
install_prog="$install_prog $arg"
|
|
done
|
|
+ case " $install_prog " in
|
|
+ *[\\\ /]cp\ *) extra_mode=;;
|
|
+ *) extra_mode='-m 644';;
|
|
+ esac
|
|
|
|
if test -z "$install_prog"; then
|
|
$echo "$modename: you must specify an install program" 1>&2
|
|
@@ -5519,8 +5540,8 @@ relink_command=\"$relink_command\""
|
|
test -n "$relink_command" && srcname="$realname"T
|
|
|
|
# Install the shared library and build the symlinks.
|
|
- $show "$install_prog $dir/$srcname $destdir/$realname"
|
|
- $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
|
|
+ $show "$install_prog $extra_mode $dir/$srcname $destdir/$realname"
|
|
+ $run eval "$install_prog $extra_mode $dir/$srcname $destdir/$realname" || exit $?
|
|
if test -n "$stripme" && test -n "$striplib"; then
|
|
$show "$striplib $destdir/$realname"
|
|
$run eval "$striplib $destdir/$realname" || exit $?
|
|
@@ -5553,8 +5574,8 @@ relink_command=\"$relink_command\""
|
|
# Install the pseudo-library for information purposes.
|
|
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
|
|
instname="$dir/$name"i
|
|
- $show "$install_prog $instname $destdir/$name"
|
|
- $run eval "$install_prog $instname $destdir/$name" || exit $?
|
|
+ $show "$install_prog $extra_mode $instname $destdir/$name"
|
|
+ $run eval "$install_prog $extra_mode $instname $destdir/$name" || exit $?
|
|
|
|
# Maybe install the static library, too.
|
|
test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
|
|
@@ -5589,8 +5610,8 @@ relink_command=\"$relink_command\""
|
|
|
|
# Install the libtool object if requested.
|
|
if test -n "$destfile"; then
|
|
- $show "$install_prog $file $destfile"
|
|
- $run eval "$install_prog $file $destfile" || exit $?
|
|
+ $show "$install_prog $extra_mode $file $destfile"
|
|
+ $run eval "$install_prog $extra_mode $file $destfile" || exit $?
|
|
fi
|
|
|
|
# Install the old object if enabled.
|
|
@@ -5598,8 +5619,8 @@ relink_command=\"$relink_command\""
|
|
# Deduce the name of the old-style object file.
|
|
staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
|
|
|
|
- $show "$install_prog $staticobj $staticdest"
|
|
- $run eval "$install_prog \$staticobj \$staticdest" || exit $?
|
|
+ $show "$install_prog $extra_mode $staticobj $staticdest"
|
|
+ $run eval "$install_prog $extra_mode \$staticobj \$staticdest" || exit $?
|
|
fi
|
|
exit $EXIT_SUCCESS
|
|
;;
|
|
@@ -5828,40 +5849,6 @@ relink_command=\"$relink_command\""
|
|
# Exit here if they wanted silent mode.
|
|
test "$show" = : && exit $EXIT_SUCCESS
|
|
|
|
- $echo "----------------------------------------------------------------------"
|
|
- $echo "Libraries have been installed in:"
|
|
- for libdir in $libdirs; do
|
|
- $echo " $libdir"
|
|
- done
|
|
- $echo
|
|
- $echo "If you ever happen to want to link against installed libraries"
|
|
- $echo "in a given directory, LIBDIR, you must either use libtool, and"
|
|
- $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
|
|
- $echo "flag during linking and do at least one of the following:"
|
|
- if test -n "$shlibpath_var"; then
|
|
- $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
|
|
- $echo " during execution"
|
|
- fi
|
|
- if test -n "$runpath_var"; then
|
|
- $echo " - add LIBDIR to the \`$runpath_var' environment variable"
|
|
- $echo " during linking"
|
|
- fi
|
|
- if test -n "$hardcode_libdir_flag_spec"; then
|
|
- libdir=LIBDIR
|
|
- eval flag=\"$hardcode_libdir_flag_spec\"
|
|
-
|
|
- $echo " - use the \`$flag' linker flag"
|
|
- fi
|
|
- if test -n "$admincmds"; then
|
|
- $echo " - have your system administrator run these commands:$admincmds"
|
|
- fi
|
|
- if test -f /etc/ld.so.conf; then
|
|
- $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
|
|
- fi
|
|
- $echo
|
|
- $echo "See any operating system documentation about shared libraries for"
|
|
- $echo "more information, such as the ld(1) and ld.so(8) manual pages."
|
|
- $echo "----------------------------------------------------------------------"
|
|
exit $EXIT_SUCCESS
|
|
;;
|
|
|